MAPMAKING FOR ACADEMICS
introduction
TO
Cartodb
maia sauren maia@thoughtworks.com
steve.bennett@unimelb.edu.au
Slides: health
.researchmaps.net
Sign up: cartodb.com/academic
Objectives
By the end of today, you will be able to:
-
Turn
data
with latitudes & longitudes...
- that you provide as a spreadsheet
- or get from somewhere else
- into
dots
...
- that you can click on for more info
- that are colour coded
- or icon-coded
- ...on a
map...
- that you choose from a lovely selection
- which you can share with the world.
Introduction
Data visualisation
(CartoDB)
Basemap
(Tilemill)
(Tilemill)
Get an account
cartodb.com/academic
All data is public. All maps are public.
health
.researchmaps.net
Load sample data (exercise)
Fiona's fictitious Italian outbreak
gis.researchmaps.net/sample/sullitis.csv
About sullitis.csv
22 rows
Lat & Long (for geocoding)
Name (string - good for labels)
Cases (numeric - good for choropleths)
Type (fixed vocab - good for categories)
Tables: How do I...?(EXERCISE)
-
Change a column type to "number"
-
Edit a cell
- Add a row
- Delete a row
-
Sort by a column
- Add a column
Map view (EXERCISE)
Pick a basemap. Any basemap.
What the buttons do
New layer
Select this layer
Custom SQL (advanced queries)
Wizards (visualisation type)
Info windows (when you click)
Custom CSS (advanced styling)
Legends (HTML required)
Filters
Add row
Info windows
Too easy
EXERCISE: make an appropriate info window
Visualisation
1 visualisation = 1+ layers
1 layer: 1 map
1, 2 = switch layers
Why visualisations?
Share
Re-order layers
Combine styles
One dataset, several visualisations
Visualisations for small data
Simple
Category
Colours
Custom markers
Stroke/Fill/font
Exercise: make an ugly visualisation of 'sulla'
visualisations for bigger data
IntensityDensity
More sample data! (exercise)
Buckets
1,2,3,4,5,6,7,8,9,10
3 buckets
1,2,3 4,5,6,7 8,9,10
(sort of)
Multi layer visualisation (exercise)
Title
Category or Choropleth?
"Bronze", "Copper", "Stoneware" → Category
1.2, 5.3, 2.4 → Choropleth
Cluster, Intensity or Density?
Experiment!
Custom styling
CartoCSS
CartoCSS doc:
https://www.mapbox.com/carto/api/2.3.0/
Geocoding
Creating lat/longs
Where before there were none
Geocoding
37 Flinders Lane, Melbourne → -37.81478, 144.97289
addresses cost $$$
Provide your own lat/lon:
Match admin regions (polygons) *
a free way with GOogle sheets
1. Follow all instructions here:
https://github.com/mapbox/geo-googledocs
2. Geocode stuff in Google Sheets
3. Import
Adding data
Add feature. Click. Done. Click. Edit data. Save and close.
Or...
Add row
Then lat/long
More data!
CartoDB supports:
AURIN, data.gov.au, CartoDB "common data", Google...
Advanced
Basic SQL
Filter, group, aggregate, calculate
SELECT * FROM sulla WHERE name LIKE 'P%'
SELECT * FROM sulla WHERE name LIKE 'P%'
Not basic SQL
Any basemap
Sharing
More help?
CartoDB documentation
gis.stackexchange.com
maia@thoughtworks.com
steve.bennett@unimelb.edu.au
CartoDB for health
By stevage
CartoDB for health
- 1,118