Skip to main content

Creates SVG maps from geojsons, shapefiles and geodataframes

Project description

svgmapper

svgmapper generates SVG maps from .geojson files, Esri shapefiles, and geopandas geodataframes. Below is a bried overview of how to use svgmapper and a description of its classes and methods.

Creating a map

from svgmapper import Map, Layer

Map(
    name="Map of US and Canada",
    css='map.css',
    epsg='epsg:2163',
    size=(504, 504),
    layers=[
        Layer(
            name='usa-states',
            path='north-america/usa-states.geojson'
        ),
        Layer(
            name='ca-provinces',
            path='north-america/canada-provinces.geojson'
        )
    ]
).save('north-america.svg')

The code snippet above initializes a new map object with the specified Layers (the drawing order of which is determined by the Layer's index in the provided list). That Map is then saved to the specified location in the save() method. The output map looks like below:

SVG map of Canada provinces and US states

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

svgmapper-0.1.5.tar.gz (19.6 kB view details)

Uploaded Source

Built Distribution

svgmapper-0.1.5-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

Details for the file svgmapper-0.1.5.tar.gz.

File metadata

  • Download URL: svgmapper-0.1.5.tar.gz
  • Upload date:
  • Size: 19.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.7 Darwin/23.3.0

File hashes

Hashes for svgmapper-0.1.5.tar.gz
Algorithm Hash digest
SHA256 80467bd22a76f233ab165043d9675073143c2778ced3037ad868098c7257b48f
MD5 b6479a8b4bf30cda9ae5b7004bf02260
BLAKE2b-256 6e2ccb688278764e9c22c165b792c832777f4f6bc097f31540c1b080a5228701

See more details on using hashes here.

File details

Details for the file svgmapper-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: svgmapper-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 20.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.7 Darwin/23.3.0

File hashes

Hashes for svgmapper-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 6dbfe10a7f42a10a145121abb17adf87afa5d1062b0fb59d411fede7ca99332b
MD5 375a03a9022d3e057ee32d24e428aeb5
BLAKE2b-256 7b72379dbb2a5a576f7bc2f495445690a37fecef8992127c572c6d7dacc7d137

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