Created
October 26, 2016 09:31
-
-
Save ramiroaznar/8f46ac73ee372bd06d583a6d43d7be2f to your computer and use it in GitHub Desktop.
How to create category + bubble maps with Turbo Carto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
*, | |
7 as italians, | |
3 as french, | |
19 as spanish | |
FROM | |
populated_places | |
WHERE | |
name ILIKE 'Barcelona' | |
UNION ALL | |
SELECT | |
*, | |
10 as italians, | |
12 as french, | |
4 as spanish | |
FROM | |
populated_places | |
WHERE | |
name ILIKE 'Tarragona' | |
UNION ALL | |
SELECT | |
*, | |
5 as italians, | |
7 as french, | |
14 as spanish | |
FROM | |
populated_places | |
WHERE | |
name ILIKE 'Madrid' | |
UNION ALL | |
SELECT | |
*, | |
15 as italians, | |
2 as french, | |
1 as spanish | |
FROM | |
populated_places | |
WHERE | |
name ILIKE 'Zaragoza' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#layer { | |
line-width: 0.1; | |
marker-allow-overlap: true; | |
} | |
#layer::italians { | |
marker-width: ramp([italians], range(20, 50), jenks(4)); | |
marker-fill: green; | |
marker-allow-overlap: true; | |
marker-opacity: 0.5; | |
} | |
#layer::french { | |
marker-width: ramp([french], range(20, 50), jenks(4)); | |
marker-fill: blue; | |
marker-allow-overlap: true; | |
marker-opacity: 0.5; | |
} | |
#layer::spanish { | |
marker-width: ramp([spanish], range(20, 50), jenks(4)); | |
marker-fill: red; | |
marker-allow-overlap: true; | |
marker-opacity: 0.5; | |
} |
Author
ramiroaznar
commented
Oct 26, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment