Skip to main content

map nl

map-nl

Release Build status codecov Commit activity License

map-nl is a Python package to help you quickly create PC4 maps of the Netherlands, i.e. maps based on the numerical part of Dutch postal codes. While that is already possible without map-nl, this package aims to make the process a lot easier. It automatically downloads the geojson files, so all you need to provide is a dataset with two columns: One containing PC4 codes and one with a related value to plot on the map. map-nl then uses folium to plot the map.

For an example map created with map-nl, see here.


Documentation - Contributing


Quickstart

Installation

To install map-nl, simply run:

pip install map-nl

or a similar command for your dependency manager.

Usage

To create a choropleth map of the average WOZ-value in the Netherlands, you could run the following:

import pandas as pd
from map_nl import ChoroplethMapNL

df = pd.read_csv("https://raw.githubusercontent.com/fpgmaas/map-nl/main/data/woz-pc4.csv")

m = ChoroplethMapNL(geojson_simplify_tolerance=0.0001).plot(
    df, pc4_column_name="pc4", value_column_name="WOZ", legend_name="Average WOZ Value"
)
m.save("map.html")

This will download the geojson file to the .map_nl directory, simplify the geojson file to reduce the disk size of the plot, plot the map and save it to disk.

For more details, see the documentation.

Attribution & License

By default, a geojson file with PC4 polygons is downloaded from Opendatasoft.com. The file is provided by Central Bureau voor de Statistiek & Basisregistratie Kadaster and usage of this file falls under the CC BY 4.0 license.


Repository initiated with fpgmaas/cookiecutter-poetry.

Icon created by Roundicons - Flaticon

Metadata

Release files for map-nl 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for map-nl 0.1.0
File Size Uploaded
map_nl-0.1.0.tar.gz 9.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for map-nl 0.1.0
File Interpreter ABI Platform
map_nl-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 21.5 kB

Release files / map_nl-0.1.0.tar.gz

Download URL map_nl-0.1.0.tar.gz
Size 9.8 kB
Tags Source
SHA-256 checksum
How to use checksums
73500b579eb7fbb5c1d09995baf29f3a02ff74ee14e6535d6e3ebeba1f6d0c70
BLAKE2b-256 checksum
How to use checksums
251c72261c8b8ce1c19970d54fd6095fec54669b4796dfd3b30014425fe5e1b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.11.6 Linux/6.2.0-1016-azure

Release files / map_nl-0.1.0-py3-none-any.whl

Download URL map_nl-0.1.0-py3-none-any.whl
Size 11.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6c115aad91312fb1221d373638f8d1f6a5cbd4e3c6e694cff838d86b8c4c692a
BLAKE2b-256 checksum
How to use checksums
18918b411ddc5bda5bd8179a0605ca36ff1ef5fea799517b3683885e49849592
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.11.6 Linux/6.2.0-1016-azure

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page