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 rijksmonumenten en beschermd gezichten op te halen.
Door middel van dit 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)
if __name__ == "__main__":
asyncio.run(main())
# OUTPUT
[
{
'bag_verblijfsobject_id': '0599010000360091',
'is_rijksmonument': True,
'rijksmonument_nummer': '524327',
'rijksmonument_url': 'https://monumenten.nl/monument/524327',
'is_beschermd_gezicht': False,
'beschermd_gezicht_naam': nan
},
{
'bag_verblijfsobject_id': '0599010000486642',
'is_rijksmonument': False,
'rijksmonument_nummer': nan,
'rijksmonument_url': nan,
'is_beschermd_gezicht': False,
'beschermd_gezicht_naam': nan
},
{
'bag_verblijfsobject_id': '0599010000281115',
'is_rijksmonument': False,
'rijksmonument_nummer': nan,
'rijksmonument_url': nan,
'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)
if __name__ == "__main__":
asyncio.run(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.0a1.tar.gz
.
File metadata
- Download URL: monumenten-0.1.0a1.tar.gz
- Upload date:
- Size: 14.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f6aef08c6c9cfc597d5d0aee076e2066aef7682ce7ce991538a42977b10d8bb8 |
|
MD5 | c787e2aecc1e8ff29dbec08f0cad36dc |
|
BLAKE2b-256 | bc157fd6a9c3d088ed821284ae190d1fffc1c678f18964ed2c8282c968bcb082 |
Provenance
The following attestation bundles were made for monumenten-0.1.0a1.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.0a1.tar.gz
- Subject digest:
f6aef08c6c9cfc597d5d0aee076e2066aef7682ce7ce991538a42977b10d8bb8
- Sigstore transparency entry: 145064786
- Sigstore integration time:
- Predicate type:
File details
Details for the file monumenten-0.1.0a1-py3-none-any.whl
.
File metadata
- Download URL: monumenten-0.1.0a1-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 | 8d961dac92373582791c6cccc71f6cf34bae7c88255f7b4fffbb1f7f6162ddda |
|
MD5 | 0b2ed9d3e0afa15ff6d354c24ebf2869 |
|
BLAKE2b-256 | ee3ba2afbb1ead3649aac9c1c44dc3c002ef6d03753d2eedf7d117316e7088e5 |
Provenance
The following attestation bundles were made for monumenten-0.1.0a1-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.0a1-py3-none-any.whl
- Subject digest:
8d961dac92373582791c6cccc71f6cf34bae7c88255f7b4fffbb1f7f6162ddda
- Sigstore transparency entry: 145064787
- Sigstore integration time:
- Predicate type: