⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script type="text/javascript" src="http://github.com/simplegeo/polymaps/raw/v2.2.0/polymaps.min.js"></script> | |
<script type="text/javascript" src="http://github.com/mbostock/polymaps/raw/586fbb0346548a5559b6edea8aab76ac51334da5/lib/crimespotting/crimespotting.js"></script> | |
<style type="text/css"> | |
@import url("http://github.com/simplegeo/polymaps/raw/v2.2.0/examples/example.css"); | |
html, body { |
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 | |
ST_Buffer( | |
st_centroid(ST_Union(the_geom_webmercator)), | |
st_distance( | |
st_centroid(ST_Union(the_geom_webmercator)), | |
ST_EndPoint(ST_LongestLine( | |
ST_Union(the_geom_webmercator), | |
ST_Union(the_geom_webmercator) | |
)) | |
) |
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 | |
ST_Buffer( | |
st_centroid(ST_Union(the_geom_webmercator)), | |
st_distance( | |
st_centroid(ST_Union(the_geom_webmercator)), | |
ST_EndPoint(ST_LongestLine( | |
ST_Union(the_geom_webmercator), | |
ST_Union(the_geom_webmercator) | |
)) | |
) |
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
Just a quick sketch to explain how to use labels in CartoDB: | |
http://dl.dropbox.com/u/193220/CartoDB/labels.png | |
Something like this should work while we sort out exactly how to release this: | |
#populated_places_points_2{ | |
marker-fill:#0099FF; | |
marker-line-color:white; | |
marker-line-width:1; |
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 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) | |
#hoteles_playground{ | |
polygon-fill:#FF6600; | |
polygon-opacity:.7; | |
} | |
#hoteles_playground[ct<=40]{ | |
polygon-fill:#BD0026} | |
#hoteles_playground[ct<=20]{ | |
polygon-fill:#F03B20} |
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
#hoteles_madrid_11870 { | |
marker-fill:#0099FF; | |
marker-line-color:white; | |
marker-line-width:0; | |
marker-opacity:1; | |
marker-line-opacity:1; | |
marker-placement:point; | |
marker-type:ellipse; | |
marker-allow-overlap:true; | |
} |
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
--Upload your new raster data | |
--In my case the data goes into a table, night_light | |
--In some cases, I find it useful to downsample the total number of variables in a band, or in some cases merge data from multiple bands into one. | |
--Here is an example how one such process would work | |
UPDATE night_light SET rast = ST_MapAlgebraExpr(rast,'8BUI','CASE WHEN [rast] = 0 THEN 10 WHEN [rast] = 255 THEN 11 ELSE floor([rast]/32)::int END'); | |
--Create a new table, light_polygons | |
--Add a numeric column called, rast_value |
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
var a = new Array(); | |
var n; | |
var posicion = 0; | |
// Crear una función que, al enviarle el número de diapositivas (ej:15), devuelva un array ordenado con ej(15) diapositivas. | |
function crearPresentacion(n){ | |
for (var i=0; i<=n; i++){ | |
a[i]=i; | |
} | |
return "creado"; |
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
//Crear simulador numérico de presentaciones | |
var a = new Array(); | |
var posicion = 0; | |
var n = 20; | |
var t; | |
// Crea una lista de diapositivas | |
function lista(_n){ | |
n = _n; | |
for (i=0; i<= _n; i++){ |
OlderNewer