Skip to main content

Creates SVG choropleths of Chilean regions

Project description

It creates a SVG Choropleth of a Chilean region.

Description

You need a Dictionary or a Pandas.Series with the values. The index or key can be the Comuna name and the value an int. The package uses “clcomuna” to get the comuna code, and it creates bins for the values. You can specify the comuna region, even if your data has comunas for the hole country.

Installation

pip3 install clchoropleth

Requirements

  • clcomuna

  • pandas

  • bf4 (BeautifulSoup)

  • Python3.3+

Usage:

>>> import clchoropleth

Example

import clchoropleth
arica = {'ARICA': 27, 'CAMARONES': 13, 'GENERAL LAGOS': 10, 'PUTRE': 8}
data = clchoropleth.prepare_data(arica)
clchoropleth.run(data, "arica.svg", "15")

This should save an SVG file similar to this:

arica.png

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

clchoropleth-1.0.tar.gz (32.6 kB view hashes)

Uploaded Source

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