api_get_areacodes_from_latlon

functions

datapunt_processing.transform.geospatial.api_get_areacodes_from_latlon.getAreaCodes(item, lat, lon)
Get specific information like area codes based radius to nearest address based on lat/lon value
ex: https://api.data.amsterdam.nl/geosearch/search/?item=verblijfsobject&lat=52.3731750&lon=4.8924655&radius=50

It currently is coded to work to get: - “buurt” - “buurtcombinatie” - “stadsdeel”

datapunt_processing.transform.geospatial.api_get_areacodes_from_latlon.getAreaCodesforDataFrame(df, item)

Get specific information like area codes based radius to nearest address based on lat/lon value for each row in pandas DF. Args:

df with column “lon” and “lat” item, which is “buurt”, “buurtcombinatie” or “stadsdeel”
Returns:
df with two new columns that describe name and code of the item “
datapunt_processing.transform.geospatial.api_get_areacodes_from_latlon.getJson(url)

Get a json from an url

Args:

url: give an api url:

https://api.data.amsterdam.nl/bag/gebieden/stadsdeel
Returns:
a parsed json result or an error message