visualising data on interactive maps
DESCRIPTION
Women in Data Meetup, February 2014 The talk introduces a visualisation grammar called spruce-leaf. Spruce-leaf is a declarative format for creating interactive leaflet maps. The talk is aimed at developers and non-developers alike - no programming knowledge is necessary. With spruce-leaf you can describe the visualisation in JSON format: merge your shapefile (e.g. map of CCG areas in the UK) with CSV data, colour the features, add legend and hover-on information box.TRANSCRIPT
![Page 1: Visualising Data on Interactive Maps](https://reader034.vdocuments.site/reader034/viewer/2022051609/546f0465b4af9f1d0c8b458f/html5/thumbnails/1.jpg)
Visualising data on interactive maps
Anna Pawlicka Data Engineer
![Page 2: Visualising Data on Interactive Maps](https://reader034.vdocuments.site/reader034/viewer/2022051609/546f0465b4af9f1d0c8b458f/html5/thumbnails/2.jpg)
A picture is worth 1000 words
![Page 3: Visualising Data on Interactive Maps](https://reader034.vdocuments.site/reader034/viewer/2022051609/546f0465b4af9f1d0c8b458f/html5/thumbnails/3.jpg)
A picture is worth 1000 words
![Page 4: Visualising Data on Interactive Maps](https://reader034.vdocuments.site/reader034/viewer/2022051609/546f0465b4af9f1d0c8b458f/html5/thumbnails/4.jpg)
Leaflet.js
• Open-source Java-Script library
• Mobile phone friendly
• Interactive
![Page 5: Visualising Data on Interactive Maps](https://reader034.vdocuments.site/reader034/viewer/2022051609/546f0465b4af9f1d0c8b458f/html5/thumbnails/5.jpg)
Spruce-leaf
• Visualisation grammar for choropleth maps
• Uses JSON format to describe data and map
• Joins geography with your data
• Colours the areas according to some values in your data
• Adds legend and info box
![Page 6: Visualising Data on Interactive Maps](https://reader034.vdocuments.site/reader034/viewer/2022051609/546f0465b4af9f1d0c8b458f/html5/thumbnails/6.jpg)
Data
• You will need:
• Geometry: TopoJSON file
• Data to map: CSV file
• Both need a common identifier
![Page 7: Visualising Data on Interactive Maps](https://reader034.vdocuments.site/reader034/viewer/2022051609/546f0465b4af9f1d0c8b458f/html5/thumbnails/7.jpg)
Colours
• Things to consider:
• Number of data classes
• Nature of your data: sequential, diverging, qualitative
• Perfect tool for all that: ColorBrewer
![Page 8: Visualising Data on Interactive Maps](https://reader034.vdocuments.site/reader034/viewer/2022051609/546f0465b4af9f1d0c8b458f/html5/thumbnails/8.jpg)
Specification
![Page 9: Visualising Data on Interactive Maps](https://reader034.vdocuments.site/reader034/viewer/2022051609/546f0465b4af9f1d0c8b458f/html5/thumbnails/9.jpg)
Example
![Page 10: Visualising Data on Interactive Maps](https://reader034.vdocuments.site/reader034/viewer/2022051609/546f0465b4af9f1d0c8b458f/html5/thumbnails/10.jpg)
Links
• Spruce-leaf grammar: https://github.com/MastodonC/spruce-leaf
• Spruce-leaf examples: https://github.com/MastodonC/spruce-leaf-examples
• ColorBrewer: http://colorbrewer2.org/
• Geographies:
• http://www.ordnancesurvey.co.uk/
• http://geocommons.com/
• https://github.com/samuelleach/uk-atlas