Created
November 15, 2013 17:57
-
-
Save andrewxhill/7488739 to your computer and use it in GitHub Desktop.
Important bits for rainy cities visualization
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
With p AS ( | |
SELECT the_geom, the_geom_webmercator, cartodb_id, name, | |
(SELECT globvalue FROM last_1_hours ORDER BY the_geom <-> n.the_geom LIMIT 1) g, | |
(SELECT st_distance(the_Geom, n.the_geom) d FROM last_1_hours ORDER BY the_geom <-> n.the_geom LIMIT 1) d | |
FROM ne_10m_populated_places_simple_1 n | |
) | |
SELECT * FROM p WHERE d < 0.1 ORDER BY g ASC |
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
Map{ | |
buffer-size: 256; | |
} | |
#ne_10m_populated_places_simple_1::labels [d<0.02]{ | |
text-name: [name] + ' (' + [g] + ')'; | |
text-face-name: 'DejaVu Sans Book'; | |
text-fill: #FFFFFF; | |
text-allow-overlap: true; | |
text-halo-fill: #2c388d ; | |
text-halo-radius: 5; | |
text-size: 8; | |
text-opacity: 0.6; | |
[g>0.0001]{ text-size:10; [zoom<5]{text-size:6;}} | |
[g>0.001]{ text-size: 12;text-opacity: 0.7; [zoom<5]{text-size:8;}} | |
[g>0.01]{ text-size: 15;[zoom<5]{text-size:10;} } | |
[g>0.1]{ text-size: 18;text-opacity: 0.85;[zoom<5]{text-size:13;}} | |
[g>1]{ text-size: 22;text-opacity: 1; [zoom<5]{text-size:16;} } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment