
Security News
npm ‘is’ Package Hijacked in Expanding Supply Chain Attack
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.
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.
To install map-nl, simply run:
pip install map-nl
or a similar command for your dependency manager.
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.
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
FAQs
Quickly create maps of the Netherlands in Python
We found that map-nl demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.
Security News
A critical flaw in the popular npm form-data package could allow HTTP parameter pollution, affecting millions of projects until patched versions are adopted.
Security News
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.