We also have a maps repo and a beeswarm repo and some census charts which is a work in progress.
The wiki instructions on how to use each template.
If you download the zip of the repo, you'll find a folder for every template. These templates runs off core libraries in the folder lib
and images in images
. Each visualisation is customisable using the options in the config.json
file. It reads data from a data.csv
file.
Chart type | Graphic | Code | Accessible |
---|---|---|---|
Area - stacked | View | </> |
β |
Area - stacked - small multiple | View | </> |
β |
Bar | View | </> |
β |
Bar - small multiple | View | </> |
β |
Bar - grouped | View | </> |
β |
Bar - grouped with confidence intervals - small multiple | View | </> |
β |
Bar - grouped with confidence intervals - small multiple - linear x-axis | View | </> |
β |
Bar - stacked | View | </> |
β |
Bar and map | View | </> |
β |
Bump | View | </> |
β |
Circle - category | View | </> |
β |
Circle - timeline | View | </> |
β |
Column | View | </> |
β |
Column - grouped | View | </> |
β |
Column - grouped - small multiple | View | < /> | β |
Column - stacked | View | </> |
β |
Column - stacked - small multiple | View | </> |
β |
Column - grouped and stacked - small multiple | View | </> |
β |
Column - stacked with negatives | View | </> | β |
Column and line | View | </> |
β |
Connected dot plot | View | </> |
β |
Connected dot plot - buttons | View | </> |
β |
Dot plot with jiggle | View | </> |
β |
Heatmap | View | </> |
β |
Histogram | View | </> |
β |
Line | View | </> |
β |
Line - small multiple | View | </> |
β |
Line - ordinal | View | </> |
β |
Line - ordinal band | View | </> |
β |
Line - shaded area | View | </> |
β |
Line - stacked | View | </> |
β |
Line - dropdown | View | </> |
β |
Marimekko | View | </> |
β |
Quiz | View | </> |
β |
Sankey | View | </> |
β |
Scatter - canvas | View | </> |
β |
Scatter - voronoi | View | </> |
β |
Scatter - voronoi - dropdown | View | </> |
β |
Scatter - groups | View | </> |
β |
Slope | View | </> |
β |
Slope - small multiple | View | </> |
β |
Slope - voronoi | View | </> |
β |
Split bar | View | </> |
β |
Split bar - small multiple | View | </> |
β |
Split bar - varied x scales | View | </> |
β |
Waffle - circle | View | </> |
β |
These charts use D3v4. Head over to the D3v3 branch if that's your thing.
These colours are from the ONS Brand Guidelines, and are shown here for convenience. We are in the process of updating the templates to match these colour palettes.
["#206095", "#27A0CC", "#003C57", "#118C7B", "#A8BD3A", "#871A5B", "#F66068", "#746CB1", "#22D0B6"]
["#206095", "#27A0CC", "#871A5B", "#A8BD3A", "#F66068"]
If using these colours for direct labelling, some need to be made darker to meet contrast guidelines. For text at least 14pt in bold or 18pt in regular text, these colours are 3:1 contrast against white.
Spring green
#A8BD3A
> #8A9B2E
Highlight orange
#F39431
> #F56927
The primary and alternate palettes, with these adjustments for labelling applied, are as follows:
["#206095", "#27A0CC", "#003C57", "#118C7B", "#8A9B2E", "#871A5B", "#F66068", "#746CB1", "#1AA590"]
["#206095", "#27A0CC", "#871A5B", "#8A9B2E", "#F66068"]
Sometimes names for statistical categories are very technical or specific, and for good reason, because you need to be clear about what data represents. However, these names are often too wordy or difficult for the general public to comprehend and a short version communicates the numbers to the public more effectively.
This is a place to put shortened names to avoid duplicating work, plus we should try to be consistent. If you think a name needs changing, they are always up for discussion.
SIC code name | Short name |
---|---|
Manufacturing | Manufacturing |
Water Supply, Sewerage, Waste Management And Remediation Activities | Water |
Construction | Construction |
Wholesale And Retail Trade; Repair Of Motor Vehicles And Motorcycles | Retail |
Transportation And Storage | Transport and storage |
Financial and Insurance Activities | Finance |
Accommodation And Food Service Activities | Hospitality |
Information And Communication | Information and communication |
Real Estate Activities | Property |
Professional, Scientific And Technical Activities | Professional and scientific |
Administrative And Support Service Activities | Administration |
Public admin and Defence; Compulsory Social Security | Public administration |
Education | Education |
Human Health And Social Work Activities | Health |
Arts, Entertainment And Recreation | Arts and recreation |
Other Service Activities | Other services |
As used in this example.