Estos límites municipales de Guatemala se extraen de un archivo GeoJSON guardado en una tabla en CartoDB. Shapefile original fue recogido de GADM, la base de datos de global áreas administrativas.
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
license: gpl-3.0 |
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 RECURSIVE dims AS (SELECT 2*sqrt(sum(ST_Area(the_geom))) as d, sqrt(sum(ST_Area(the_geom)))/20 as w, count(*) as rows FROM osm_export_polygon WHERE the_geom IS NOT NULL), | |
geoms AS (SELECT the_geom, ST_YMax(the_geom)-ST_YMin(the_geom) as height FROM osm_export_polygon WHERE the_geom IS NOT NULL ORDER BY ST_YMax(the_geom)-ST_YMin(the_geom) DESC), | |
geomval AS (SELECT the_geom, row_number() OVER (ORDER BY height DESC) as id from geoms), | |
positions(the_geom,x_offset,y_offset,new_row,row_offset) AS ( | |
(SELECT the_geom, 0.0::float, 0.0::float, FALSE, 2 from geomval limit 1) | |
UNION ALL | |
( | |
SELECT | |
(SELECT the_geom FROM geomval WHERE id = p.row_offset), | |
CASE WHEN |
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
// delete console.log | |
querySelectorAttempt._timerIDs = [] | |
function querySelectorAttempt(selectors, callback, _attempts){ | |
if (!Array.isArray(selectors)) selectors = selectors.toString().split(/\s*,\s*/) | |
console.log('querySelectorAttempt', selectors, _attempts) | |
if (_attempts == null) _attempts = 20; | |
var elements | |
selectors.forEach(function(selector){ | |
if (elements && elements.length > 0) return; | |
elements = document.querySelectorAll(selector); |
Create an empty table, rename it to baltimore_economic_data
Get Boundaries, filter by Baltimore's FIPS (24510)