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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: svgmapper-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 c350d28189957a6fb08d20888ea41b9ccafb1ef704324c41ac2da84506d5ff43
MD5 789af04196cccb7f3d13ccd836d48579
BLAKE2b-256 864f46a802d8c856eb4cb583c7b571dde53a38186ebc467e5d70b53fba3f4252

See more details on using hashes here.

File details

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

File metadata

  • Download URL: svgmapper-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 33b2d826c21b24a8062d673a2e6c90bb1eeb95abded9229b52d8d49de1a1574f
MD5 9ee1064b468a0ca45e5962e698cd943e
BLAKE2b-256 cbb4e7f35cd7821383371ff9347c7f998f9bbffe5d1ece9fb24ca94ae4376efb

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