Skip to main content

Quickly create maps of the Netherlands in Python

Project description

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. While that is already possible without map-nl, this package aims to make the process as simple as possible. It automatically downloads the geojson files, so all you need to provide is a dataset wtih 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.


Documentation - Contributing


Quickstart

Installation

To add map-nl to your project, run one of the following commands:

# Install with poetry
poetry add map-nl

# Install with pip
pip install map-nl

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.001).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.


Repository initiated with fpgmaas/cookiecutter-poetry.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

map_nl-0.0.3.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

map_nl-0.0.3-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file map_nl-0.0.3.tar.gz.

File metadata

  • Download URL: map_nl-0.0.3.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.6 Linux/6.2.0-1016-azure

File hashes

Hashes for map_nl-0.0.3.tar.gz
Algorithm Hash digest
SHA256 b50246e721e0a561ab61771b285ffc8df970024d41dd6742639fbac3391e6901
MD5 ea44d5a045b50673ceecedc2b87d9850
BLAKE2b-256 1c9f82664f68e7d19df38a259ea4c465bfee9cb3e911b3c9b81b7072245446d7

See more details on using hashes here.

File details

Details for the file map_nl-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: map_nl-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 11.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.6 Linux/6.2.0-1016-azure

File hashes

Hashes for map_nl-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 31896d479d1d584f71b96a0d1682af53c51209598ecc48ef8c539a68135967ae
MD5 c68b0d908b88865d367bcb3a00b9f09a
BLAKE2b-256 3edb39767e06844e7a8c2c25c4a20006abd1cdbac2d068a3ec5f84c7ffc285dc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page