Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠

Davo Galavotti davo

🏠
View GitHub Profile
@davo
davo / Make
Last active Aug 29, 2015
Parcelario CABA, GeoJSON a TopoJSON
View Make
# Requiere GDAL y TopoJSON
# brew install gdal
# npm install -g topojson
all: \
parcelario-topojson.json
parcelario.zip:
curl -o parcelario.zip 'https://recursos-data.buenosaires.gob.ar/ckan2/parcelas/parcelas.zip'
View README.md

A demonstration of how to calculate the areas of Voronoi regions clipped by geographic features using D3.

[D3’s implementation](Sutherland–Hodgman algorithm) of the Sutherland–Hodgman algorithm only works for convex clip polygons, but we exploit the fact that Voronoi regions are guaranteed to be convex, and use each Voronoi region as a clip polygon, with the projected geographic boundary as a subject polygon.

In response to a question by Gonzalo Bellver.

@davo
davo / README.md
Last active Aug 29, 2015 — forked from jasondavies/README.md
Voronoi CABA
View README.md

A demonstration of how to calculate the areas of Voronoi regions clipped by geographic features using D3.

[D3’s implementation](Sutherland–Hodgman algorithm) of the Sutherland–Hodgman algorithm only works for convex clip polygons, but we exploit the fact that Voronoi regions are guaranteed to be convex, and use each Voronoi region as a clip polygon, with the projected geographic boundary as a subject polygon.

In response to a question by Gonzalo Bellver.

@davo
davo / Merge.sql
Last active Aug 29, 2015
Merge polygons via PostGIS Query on CartoDB
View Merge.sql
SELECT ST_Union(ST_makeValid( ST_SnapToGrid(the_geom_webmercator ,0.0001))) FROM barrios GROUP BY barrios.the_geom_webmercator
View meta-tags.md

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
View README.md

Shows multiple overlaid Voronoi diagrams, given multiple point sets.

@davo
davo / _.md
Created Aug 26, 2014
Reusable Line Chart
View _.md
@davo
davo / _.md
Created Aug 26, 2014
MoveToFront();
View _.md
View _.md
@davo
davo / _.md
Created Sep 1, 2014
Word wrap with foreignObject
View _.md