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
ERROR: Error running python shp_normalizer script: /usr/bin/python -Wignore /home/src/cartodb/cartodb/lib/importer/misc/shp_normalizer.py "/tmp/20120314-24180-kf8q8i.com2011.shp" importing_1331741285_com2011 | |
ERROR: | |
ERROR: Error running python shp_normalizer script: /usr/bin/python -Wignore /home/src/cartodb/cartodb/lib/importer/misc/shp_normalizer.py "/tmp/20120314-24180-kf8q8i.com2011.shp" importing_1331741285_com2011 | |
ERROR: Table error, #<RuntimeError: Error running python shp_normalizer script: /usr/bin/python -Wignore /home/src/cartodb/cartodb/lib/importer/misc/shp_normalizer.py "/tmp/20120314-24180-kf8q8i.com2011.shp" importing_1331741285_com2011> | |
', "updated_at" = '2012-03-14 17:08:04.571844+0100', "created_at" = '2012-03-13 17:48:10.934778+0100' WHERE ("id" = 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
WITH | |
hgrid AS ( | |
SELECT CDB_HexagonGrid( | |
ST_Transform(ST_MakeEnvelope(-180, -89, 180, 89, 4326), 3857), -- extent of the grid | |
CDB_XYZ_Resolution({z}) * 15 -- size of each cell | |
) as cell | |
) | |
SELECT count(i.<%=prop%>) as points_count |
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
--DROP FUNCTION axh_kmeans_geom_sort(geometry[], integer, integer); | |
CREATE OR REPLACE FUNCTION axh_kmeans_geom_sort(the_geom geometry[], clusters integer DEFAULT NULL, iterations integer DEFAULT NULL) | |
RETURNS SETOF GEOMETRY | |
AS $$ | |
DECLARE | |
h GEOMETRY; -- rectangle cell | |
c INTEGER; -- |
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
--DROP FUNCTION axh_kmeans_geom_sort(geometry[], integer, integer); | |
CREATE OR REPLACE FUNCTION axh_kmeans_geom_sort(the_geom geometry[], clusters integer DEFAULT NULL, iterations integer DEFAULT NULL) | |
RETURNS SETOF GEOMETRY | |
AS $$ | |
DECLARE | |
h GEOMETRY; -- rectangle cell | |
c INTEGER; -- |
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 start_time = Date.now(); | |
http.get(url, function(res) { | |
res.body = ''; | |
if ( res.statusCode != 200 ) { | |
res.on('data', function(chunk) { | |
// Save only first chunk, to reduce cost of the operation | |
if ( res.body.length == 0 ) res.body += chunk; | |
}); | |
} | |
res.on('end', function() { |
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
https://strk.cartodb.com/tiles/layergroup/662381ebb78b01d284a9bf18bcb74324:0/{z}/{x}/{y}.png?cache_policy=persist |
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 lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>CartoDB Point Clustering</title> | |
<meta name="description" content=""> | |
<meta name="author" content=""> | |
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> | |
<link rel="stylesheet" href="http://libs.cartocdn.com/cartodb.js/v3/themes/css/cartodb.css" /> | |
<!--[if lte IE 8]> |
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 clusters AS ( | |
SELECT | |
ST_Collect(the_geom_webmercator) as g, | |
count(*) as count | |
FROM the_tornados WHERE the_geom_webmercator && !bbox! | |
GROUP BY ST_SnapToGrid(the_geom_webmercator, greatest(!pixel_width!,!pixel_height!)*48) | |
) | |
SELECT row_number() over () as cartodb_id, | |
count, | |
least(100, greatest(count,10)) as size, |
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 trip AS ( | |
SELECT ST_MakeLine(the_geom_webmercator ORDER BY cartodb_id ASC) as g | |
FROM jackerouak | |
), | |
params AS ( | |
SELECT | |
greatest(st_xmax(g)-st_xmin(g), st_ymax(g)-st_ymin(g))/20 as maxlen_old, | |
CDB_XYZ_Resolution(4)*10 as maxlen | |
FROM trip | |
), |
OlderNewer