Skip to main content

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)

# in een .py file"
if __name__ == "__main__":
    asyncio.run(main())

# in een .ipynb file (notebook):
await 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': None
    },
    {
        'bag_verblijfsobject_id': '0599010000486642',
        'is_rijksmonument': False,
        'rijksmonument_nummer': None,
        'rijksmonument_url': None,
        'is_beschermd_gezicht': False,
        'beschermd_gezicht_naam': None
    },
    {
        'bag_verblijfsobject_id': '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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

monumenten-0.1.0.tar.gz (15.2 kB view details)

Uploaded Source

Built Distribution

monumenten-0.1.0-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file monumenten-0.1.0.tar.gz.

File metadata

  • Download URL: monumenten-0.1.0.tar.gz
  • Upload date:
  • Size: 15.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for monumenten-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6a7177bc6fc87ada8ed32d6a6d81e1019782d7c16a2f41b0c0d42ee402d29c65
MD5 0b6feede20b144135d3b4e2ac7f95c48
BLAKE2b-256 177f7c66e8b6609d2a5377ec555ac1c84e67bc2c349c21363c2d3dafefeda1bc

See more details on using hashes here.

Provenance

The following attestation bundles were made for monumenten-0.1.0.tar.gz:

Publisher: GitHub
  • Repository: woonstadrotterdam/monumenten
  • Workflow: publish-to-pypi.yml
Attestations:
  • Statement type: https://in-toto.io/Statement/v1
    • Predicate type: https://docs.pypi.org/attestations/publish/v1
    • Subject name: monumenten-0.1.0.tar.gz
    • Subject digest: 6a7177bc6fc87ada8ed32d6a6d81e1019782d7c16a2f41b0c0d42ee402d29c65
    • Transparency log index: 145090442
    • Transparency log integration time:

File details

Details for the file monumenten-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: monumenten-0.1.0-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

Hashes for monumenten-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 398b9facae9075bb7860bccd1dcdd272383b80d6180ff46a23d9502b41ac6370
MD5 04e6d920b5c081b8b75e0571a3bf9223
BLAKE2b-256 eb63c86469d117a60fba7df3497255a1a217edc866947d390a0035eb7f40ab44

See more details on using hashes here.

Provenance

The following attestation bundles were made for monumenten-0.1.0-py3-none-any.whl:

Publisher: GitHub
  • Repository: woonstadrotterdam/monumenten
  • Workflow: publish-to-pypi.yml
Attestations:
  • Statement type: https://in-toto.io/Statement/v1
    • Predicate type: https://docs.pypi.org/attestations/publish/v1
    • Subject name: monumenten-0.1.0-py3-none-any.whl
    • Subject digest: 398b9facae9075bb7860bccd1dcdd272383b80d6180ff46a23d9502b41ac6370
    • Transparency log index: 145090443
    • Transparency log integration time:

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page