Compute continous cartograms (anamorphic maps)
Project description
Compute continous cartograms (anamorphic maps)
This is a Python package to compute cartograms from geopandas.GeoDataFrames, using the algorithm presented in Dougenik et al. (1985). It is the ‘sister project’ and Python implementation of our QGIS plugin which continues to be available.
Installation
cartogram is available from the PyPi package
repository, install it, for instance, using pip:
pip install cartogram
Quick start
Input data
You will need a polygon data set in any format readable by
geopandas that
features a numeric attribute column to use as the relative target values to base
the cartogram distortion on.
If you want to have a quick try-out, see the population data for Austrian
provinces in the tests/data directory of this repository.
Cartogram creation
import cartogram
import geopandas
df = geopandas.read_file("input-data.gpkg")
c = cartogram.Cartogram(df, column="population")
c.to_file("output-data.gpkg")
Documentation
Find more detailed examples and an API reference at https://python-cartogram.readthedocs.io/.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cartogram-1.0.2.tar.gz.
File metadata
- Download URL: cartogram-1.0.2.tar.gz
- Upload date:
- Size: 57.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81ed9fa1c5b68d9c8cb7b96a9c3676e1830f71e1dc4ca765ce432a37e19b55e8
|
|
| MD5 |
e263edf0d4cc57e783930fb4d4df0355
|
|
| BLAKE2b-256 |
c5fa133f14f1e6c2ee67192cfa0275949992ce44594cb3972cfc656f969dbf15
|
Provenance
The following attestation bundles were made for cartogram-1.0.2.tar.gz:
Publisher:
release.yml on austromorph/python-cartogram
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cartogram-1.0.2.tar.gz -
Subject digest:
81ed9fa1c5b68d9c8cb7b96a9c3676e1830f71e1dc4ca765ce432a37e19b55e8 - Sigstore transparency entry: 831609258
- Sigstore integration time:
-
Permalink:
austromorph/python-cartogram@b29d7623249cccda80c94b4c86581662edcf2e4c -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/austromorph
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b29d7623249cccda80c94b4c86581662edcf2e4c -
Trigger Event:
push
-
Statement type:
File details
Details for the file cartogram-1.0.2-py3-none-any.whl.
File metadata
- Download URL: cartogram-1.0.2-py3-none-any.whl
- Upload date:
- Size: 17.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
590a89837d64c5403c3f99cbc977a0585f8dc52d1d0b04822d27ecfc547e4eca
|
|
| MD5 |
60fb43ea2a0ebffae6845d075a4b27f7
|
|
| BLAKE2b-256 |
7d9f95a56aadb39c4367fc91e8a0c39272d9b4557ab4ccd3dc9a8c0f72195c1e
|
Provenance
The following attestation bundles were made for cartogram-1.0.2-py3-none-any.whl:
Publisher:
release.yml on austromorph/python-cartogram
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cartogram-1.0.2-py3-none-any.whl -
Subject digest:
590a89837d64c5403c3f99cbc977a0585f8dc52d1d0b04822d27ecfc547e4eca - Sigstore transparency entry: 831609279
- Sigstore integration time:
-
Permalink:
austromorph/python-cartogram@b29d7623249cccda80c94b4c86581662edcf2e4c -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/austromorph
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b29d7623249cccda80c94b4c86581662edcf2e4c -
Trigger Event:
push
-
Statement type: