Charter Documentation
The Charter repository is a set of three tools for analysing and visualising data in JavaScript and HTML:
- Analyser: Processes data from CSV files and allows it to be analysed
- Charter: Takes in formatted data and uses it to visualise data in HTML
- Stats: A set of utility functions for analysing data
Charter is made available under the Hippocratic Licence.
Most of the examples in this documentation can be edited in place (look for the pencil icon), and their outputs will be displayed alongside. You can use console.log
and console.table
to display data, or just return
what you want to see.
The example data used in this documentation, found in the files city example.csv
, city example 2.csv
, and city example 3.csv
, looks like this:
NAME | COUNTRY | POPULATION | CAPITAL | PUBLIC_TRANSPORT | MAYOR_2012 | MAYOR_2018 |
---|---|---|---|---|---|---|
Auckland | New Zealand | 1614 | Bus,Train | Len Brown | Phil Goff | |
Taupō | Aotearoa | 32.907 | Bus,Train | Rick Cooper | David Trewavas | |
Hamburg | Germany | 1810 | Bus,Train,Ferry | Olaf Scholz | Katharina Fegebank,Peter Tschentscher | |
Sydney | Australia | 4841 | Bus,Train,Ferry | Clover Moore | Clover Moore | |
Hamilton | New Zealand | 161.2 | Bus | Julia Hardaker | Andrew King | |
Wellington | New Zealand | 381.9 | true | Bus,Train,Ferry,Cable Car | Celia Wade-Brown | Justin Lester |
Christchurch | New Zealand | 363.926 | Bus | Bob Parker | Lianne Dalziel | |
Dunedin | New Zealand | 114.347 | Bus | Dave Cull | Dave Cull | |
Tauranga | New Zealand | 110.338 | Bus | Stuart Crosby | Greg Brownless |
Name | Country | Population (thousands) |
---|---|---|
Semarang | Indonesia | "1,556" |
Islamabad | Pakistan | 1015 |
New Taipei City | Taiwan | "3,972" |
Nagoya | Japan | 2296 |
YEAR | POPULATION |
---|---|
1991 | 3516000 |
1992 | 3552200 |
1993 | 3597800 |
1994 | 3648300 |
1995 | 3706700 |
1996 | 3762300 |
1997 | 3802700 |
1998 | 3829200 |
1993 | 3851100 |
2000 | 3873100 |
2001 | 3916200 |
2002 | 3989500 |
2003 | 4061600 |
2004 | 4114300 |
2005 | 4161000 |
2006 | 4209100 |
2007 | 4245700 |
2008 | 4280300 |
2009 | 4332100 |
2010 | 4373900 |
2011 | 4399400 |
2012 | 4425900 |
2013 | 4475800 |
2014 | 4554600 |
2015 | 4647300 |
2016 | 4747200 |
2017 | 4844400 |