Skip to content

EndlessHoper/AmsterdamAddressUtil

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

AddressUtil

Why make this?

I did not like the documentation of the Amsterdam Data API, and I wanted to make a script that would be easy to use for a personal project of mine.

Description

AddressUtil.py is a Python script that retrieves geographical information based on Dutch postcodes or street names using the PDOK Locatieserver API and the Amsterdam Data API. It provides the corresponding "gebied" (neighborhood) in Amsterdam for the given input.

Features

  • Accepts both postcodes and street names as input.
  • Retrieves area information from the PDOK Locatieserver API.
  • Fetches detailed data from the Amsterdam Data API.

Installation

  1. Ensure you have Python installed on your machine.
  2. Install the required packages using pip:
    pip install requests

Usage

  1. Run the script:
    python AddressUtil.py
  2. When prompted, enter a Dutch postcode or street name:
    Please enter the address (ideally just the postcode): 1103JT
    
  3. The script will output the corresponding area:
    The gebied for postcode 1103JT is: [Area Name]
    

Error Handling

  • The script handles various errors, including:
    • Invalid input (empty postcode or street name).
    • API query errors.
    • No data found for the given input.

Can I use this for my own project?

Yes, no problem.

Thanks

Thanks to PDOK for the Locatieserver API and the Amsterdam gemeente for the Amsterdam Data API.

About

Turn a (partial) Amsterdam address into gebied (neighbourhood)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages