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.2.tar.gz (19.4 kB view details)

Uploaded Source

Built Distribution

svgmapper-0.1.2-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: svgmapper-0.1.2.tar.gz
  • Upload date:
  • Size: 19.4 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.2.tar.gz
Algorithm Hash digest
SHA256 48bed9b69bf37dcf0996bc51ef8dd5b9377980e95ae512ffc0c495a55a2f5a0d
MD5 20736bc679e5fe6676c5d0936cbdc1cd
BLAKE2b-256 1595881d39797b368905e997cba6d2ce6b1ae678508b3d49412126094be4d3c8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: svgmapper-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 20.3 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f270a8ffdab3af5a0dd6aa631c47b8280a1ef3939380d21fcb683d6498cb81bf
MD5 3d317f724cd2e691d5d969df542924b3
BLAKE2b-256 537636be533b53f2588bb7d61c9387177ec435d547c074d109854b40f88a5775

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