Created
March 3, 2012 12:48
-
-
Save javierarce/1965929 to your computer and use it in GitHub Desktop.
11870.com hotels density map in Madrid
This file contains hidden or 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
// SQL query | |
SELECT count(cartodb_id) as ct, ST_Transform(ST_Buffer(ST_SnapToGrid(the_geom,0.002),0.001, ‘quad_segs=2 endcap=square’),3857) as the_geom_webmercator FROM hoteles_playground GROUP BY ST_SnapToGrid(the_geom,0.002) | |
// Carto code | |
#hoteles_playground{ | |
polygon-fill:#FF6600; | |
polygon-opacity:.7; | |
} | |
#hoteles_playground[ct<=40]{ | |
polygon-fill:#BD0026} | |
#hoteles_playground[ct<=20]{ | |
polygon-fill:#F03B20} | |
#hoteles_playground[ct<=13]{ | |
polygon-fill:#FD8D3C} | |
#hoteles_playground[ct<=7]{ | |
polygon-fill:#FEB24C} | |
#hoteles_playground[ct<=3]{ | |
polygon-fill:#FED976} | |
#hoteles_playground[ct<=2]{ | |
polygon-fill:#FFFFB2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment