Checkt op basis van BAG verblijfsobject-ids of het verblijfsobject een monument en/of beschermd stadsgezicht is.
Project description
Monumenten
Een Python package voor het ophalen van monumentgegevens van Nederlandse overheids-API's. Momenteel is het mogelijk om de status van rijksmonumenten en beschermde gezichten op te halen.
Door middel van de package is het mogelijk om, indienst gewenst, voor tienduizenden verblijfsobjecten per seconde monumentgegevens op te halen. Er zijn geen API-keys nodig.
Installatie
pip install monumenten
Gebruik
Python-native 🐍
import asyncio
from monumenten import MonumentenClient
async def main():
bag_verblijfsobject_ids = [
"0599010000360091",
"0599010000486642",
"0599010000281115",
]
async with MonumentenClient() as client:
result = await client.process_from_list(bag_verblijfsobject_ids)
print(result)
# in een .py file"
if __name__ == "__main__":
asyncio.run(main())
# in een .ipynb file (notebook):
await main()
# OUTPUT
{
'0599010000360091': {
'is_rijksmonument': True,
'rijksmonument_nummer': '524327',
'rijksmonument_url': 'https://monumenten.nl/monument/524327',
'is_beschermd_gezicht': False,
'beschermd_gezicht_naam': None
},
'0599010000486642': {
'is_rijksmonument': False,
'rijksmonument_nummer': None,
'rijksmonument_url': None,
'is_beschermd_gezicht': False,
'beschermd_gezicht_naam': None
},
'0599010000281115': {
'is_rijksmonument': False,
'rijksmonument_nummer': None,
'rijksmonument_url': None,
'is_beschermd_gezicht': True,
'beschermd_gezicht_naam': 'Kralingen - Midden'
}
}
Met pandas 🐼
import asyncio
import pandas as pd
from monumenten import MonumentenClient
async def main():
input_df = pd.DataFrame(
{
"bag_verblijfsobject_id": [
"0599010000360091",
"0599010000486642",
"0599010000360022",
"0599010000360096",
"0599010000183527",
"0599010400025880",
"0599010000281115",
]
}
) # of lees van een csv of een ander bestand in
async with MonumentenClient() as client:
result = await client.process_from_df(
df=input_df, verblijfsobject_id_col="bag_verblijfsobject_id"
)
result.to_csv("monumenten.csv", index=False)
# in een .py file"
if __name__ == "__main__":
asyncio.run(main())
# in een .ipynb file (notebook):
await main()
bag_verblijfsobject_id | is_rijksmonument | rijksmonument_nummer | rijksmonument_url | is_beschermd_gezicht | beschermd_gezicht_naam |
---|---|---|---|---|---|
0599010000360091 | True | 524327 | https://monumenten.nl/monument/524327 | False | |
0599010000486642 | False | False | |||
0599010000360022 | True | 524327 | https://monumenten.nl/monument/524327 | False | |
0599010000360096 | True | 524327 | https://monumenten.nl/monument/524327 | False | |
0599010000183527 | True | 32807 | https://monumenten.nl/monument/32807 | True | Rotterdam - Scheepvaartkwartier |
0599010400025880 | False | False | |||
0599010000281115 | False | True | Kralingen - Midden |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file monumenten-0.1.1.tar.gz
.
File metadata
- Download URL: monumenten-0.1.1.tar.gz
- Upload date:
- Size: 15.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41ca67aa2a9d19bbbf400d45e6225839fd550ff73c6dfbcd8727dd79f44c00c9 |
|
MD5 | 0bc6d109696dcaaf804ab0039e6b4ab3 |
|
BLAKE2b-256 | 723587f1f9f9f4a4085b6ff34291b4933101f5c6eb4eb7ecbc86a7d0442418f4 |
Provenance
The following attestation bundles were made for monumenten-0.1.1.tar.gz
:
Publisher:
publish-to-pypi.yml
on woonstadrotterdam/monumenten
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
monumenten-0.1.1.tar.gz
- Subject digest:
41ca67aa2a9d19bbbf400d45e6225839fd550ff73c6dfbcd8727dd79f44c00c9
- Sigstore transparency entry: 149522526
- Sigstore integration time:
- Predicate type:
File details
Details for the file monumenten-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: monumenten-0.1.1-py3-none-any.whl
- Upload date:
- Size: 11.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96e8cde8a71611516f7e674465f0c271be739cc7f4ae8ba0cd84837f32b86dee |
|
MD5 | 3fbb18f7cbc321fcf86eb5b595552174 |
|
BLAKE2b-256 | 792b1236994b03c3849bf982ef2d36d738b5bc442076da94ebbd2f732d3401c7 |
Provenance
The following attestation bundles were made for monumenten-0.1.1-py3-none-any.whl
:
Publisher:
publish-to-pypi.yml
on woonstadrotterdam/monumenten
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
monumenten-0.1.1-py3-none-any.whl
- Subject digest:
96e8cde8a71611516f7e674465f0c271be739cc7f4ae8ba0cd84837f32b86dee
- Sigstore transparency entry: 149522528
- Sigstore integration time:
- Predicate type: