a series of unfortunate maps, and how to fix them
TRANSCRIPT
A SERIES OF UNFORTUNATE MAPSAND HOW TO FIX THEM WITH CARTO BUILDER
SUPPORT TEAM MANAGER & SOLUTIONS ENGINEERJORGE SANZ - [email protected]
HOW TO VISUALIZE ALL NON-DOMINANT CATEGORIES
FROM A 10M DATASET
PROBLEMS1. COUNT(*) = 9,855,4202. COUNT(DISTINCT category) = 2943. COUNT(*) WHERE category ~* ‘telefonica’ = 4,141,7124. Row order
Density map with a 30 % subsampleand screen blending
v0
Category map with a 30 % subsample
v 1
ORDERING1. Normalize categories.2. Create a simple table like this one:
3. JOIN the original dataset with this new table, using the category column as foreign key.4. ORDER the table by category column setting ASC in order to show the categories with less rows first.
category order
telefonica 1
vodafone 2
orange 3
yoigo 4
other 5
STYLINGYou can change marker opacity to change the visual prominence of a category
Markers on top can be more transparent than the ones at the bottom
HOW TO SHOW MANY POINTS THAT SHARE
THE SAME LOCATION
PROBLEMS 1. POINTS SHARING SAME LOCATION2. NO INTERACTIVITY
HEATMAP
SPIDERINGCLUSTERING
STACKING CHIPS1. PostGIS:
● GROUP BY the_geom● ORDER BY y-axis● Generate p value
2. CartoCSS (or Javascript):● Translate● Offset based on zoom
level
JSON on SQL and loops on popups
AGGREGATING POINTS
1. Aggregate one field:● json_agg()
2. Aggregate several fields:● json_agg(row_to_json())
HOW TO SYMBOLIZE DIFFERENT ATTRIBUTES ON THE
SAME LAYER GEOMETRY
PROBLEMS 1. TOO MANY VARIABLES WITHOUT HIERARCHY2. SAME LAYER GEOMETRY
Tools to filter data in real-time to identify trends & relationships
WIDGETS
Visualize the multi-dimensional nature of your data in real-time
AUTO-STYLE
TURBO CARTO
polygon-fill: ramp([masters_degree],cartocolor(PurpOr),quantiles(5));
Thematic map styling with a single line of code
TURBO CARTO
[masters_degree <= 0.451523545706371] {polygon-fill: #6c2167;}[masters_degree <= 0.200426439232409] {polygon-fill: #a24186;}[masters_degree <= 0.137369033760186] {polygon-fill: #ca699d;}[masters_degree <= 0.0843373493975904] {polygon-fill: #e498b4;}[masters_degree <= 0.0418410041841004] {polygon-fill: #f3cbd3;}
Designed specifically for use with CARTO basemaps or not...
CARTO COLORS
Data driven color schemesCARTO COLORS
SEQUENTIAL
DIVERGING
QUALITATIVE
CONCLUSIONS
SUPPORT TEAM MANAGER & SOLUTIONS ENGINEER
THANKS!
A SERIES OF UNFORTUNATE MAPShttp://bit.ly/170719-unfortunate-maps
JORGE SANZ - [email protected]