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
{ | |
time: 0.049 | |
total_rows: 5 | |
rows: [ | |
{ | |
updated_at: "2011-09-06T14:20:05.721Z" | |
created_at: "2011-09-06T14:20:05.669Z" | |
cartodb_id: 1 | |
name: "Hawai" | |
address: "Calle de Pérez Galdós 9, Madrid, Spain" |
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 twitter = require('ntwitter'); | |
var http = require('http'); | |
var cartodb_username = '' // your CartoDB username | |
, cartodb_password = '' // your CartoDB password | |
, cartodb_consumer_key = '' // Your CartoDB API Key ('YOUR KEY') | |
, cartodb_consumer_secret = '' // Your CartoDB API Secret ('YOUR SECRET') | |
, cartodb_private_query = '' // An SQL query to run eg. 'SELECT cartodb_id FROM cables LIMIT 20' | |
, cartodb_request_url = 'https://' + cartodb_username + '.cartodb.com/oauth/request_token' | |
, cartodb_access_url = 'https://' + cartodb_username + '.cartodb.com/oauth/access_token' |
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
#simplified_ecorgions{ | |
line-width:0; | |
line-opacity:1; | |
polygon-opacity:0.7; | |
polygon-fill:transparent; | |
} | |
#simplified_ecorgions[wwf_mhtnum=1] { | |
polygon-fill:rgb(0,128,0); | |
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 | |
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
SELECT ST_Transform(ST_Union(ST_Buffer(the_geom::geography,100000)::geometry),3857) as the_geom_webmercator FROM nuclear_plants_spain |
OlderNewer