Skip to content
This repository was archived by the owner on Nov 16, 2021. It is now read-only.
This repository was archived by the owner on Nov 16, 2021. It is now read-only.

['Buurtcombinatie_code'] onjuist gehardcode waardoor KeyError ontstaat #11

Description

@swaandekkers
folium.GeoJson(geo_json_data, style_function=lambda feature: {
        'fillColor': colormap(test_dict[feature['properties']['Buurtcombinatie_code']]),
        'color': 'black',
        'weight': 2,
        'dashArray': '5, 5',
        'fillOpacity': 0.9
    }).add_to(m) 

['Buurtcombinatie_code'] staat hier gehardcode, terwijl dit niet in alle gevallen (stadsdelen, buurten, wijken, gebieden) klopt. Voor stadsdeel moet het bijvoorbeeld ['Stadsdeel_code'] zijn. Als je het nu runt voor stadsdeel krijg je daardoor een 'KeyError: 'Buurtcombinatie_code''.

Dit gebeurt in:
data-processing/src/datapunt_processing/data_visualization/GeoJSON_and_choropleth-Amsterdam.ipynb

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions