Skip to content

Latest commit

 

History

History
39 lines (21 loc) · 1.64 KB

charts.md

File metadata and controls

39 lines (21 loc) · 1.64 KB

Summary

Pillow-based charting.

Dependencies

Required: pillow, toolz, pillar, utils.

Optional: pandas (for dataframe-based charts), dates (for flexible time charts).

Documentation

Three chart types are currently supported: bar charts, time charts and grid charts. For usage information, see the docstrings and sample scripts.

Bar charts

bar_chart: generate a bar chart; supports grouped, stacked and percentage stacked charts. Sample script: ukelections.py.

uk elections bar chart

Time charts

time_chart: generate a time chart; supports numeric and date timelines. Sample script: g7.py.

time chart example

Grid charts

grid_chart: generate an image grid chart; essentially a convenient wrapper for Image.from_array. Sample scripts: periodic.py and 40under40.py.

grid chart example

grid chart example

Map charts

map_chart: generate a map chart; essentially a convenient wrapper for Image.replace_color/select_color. Input is a map template with each region having a unique color. Regions can be named (see generate_name_csv) and label bounding boxes can be defined (see generate_labelbox_csv).

grid chart example