Skip to content

Instantly share code, notes, and snippets.

View rveciana's full-sized avatar
🐢

Roger Veciana i Rovira rveciana

🐢
View GitHub Profile
@rveciana
rveciana / README.md
Last active November 2, 2020 08:27
Circles bouncing inside a rectangle
@rveciana
rveciana / README.md
Last active December 20, 2015 20:48
Flag map with D3js

This example belongs to the GeoExamples blog entry Flag map with D3js.

Basically, gets the flag images from the Wikipedia by using Mike Bostock's queue.js library and adds them to the map.

The zone represented in the map

The region represented in the map is marked in red.

In this case, everything is drawn using the Canvas element.

@rveciana
rveciana / README.md
Last active December 20, 2015 20:49
Flag map with D3js - SVG

This example belongs to the GeoExamples blog entry Flag map with D3js.

Basically, gets the flag images from the Wikipedia by using Mike Bostock's queue.js library and adds them to the map.

The zone represented in the map

The region represented in the map is marked in red.

This version uses SVG.

@rveciana
rveciana / README.md
Last active February 18, 2018 12:18
Circles bouncing inside an SVG path

Example for the Stackoverflow question: How can I contain D3 JS animation within a container

The balls use a modified version of the D3.js Force Layout. Parts of the code, such as the collision function are taken from Mike Bostock's example Multi-Foci Force Layout.

The example lacks of a method to avoid the leak of circles when the collision algorithm and the container object detection act together.

@rveciana
rveciana / README.md
Last active December 24, 2015 16:59
Crisi sísmica de la costa de Vinaròs

Aquesta animació representa els sismes davant la costa de Vinaròs des de mitjans de setembre.

L'estrella indica la posició aproximada de la planta Castor, situada segons les diferents fonts a 22 quilòmetres de la costa davant de Vinaròs. Els números dins els cercles representen la magnitud del sisme en l'escala de Richter.

Les dades de les magnituds i epicentres estan tretes de la pàgina de l'Institut Geològic de Catalunya.

Entrada al blog per entendre la part tècnica.

@rveciana
rveciana / README.md
Last active December 25, 2015 09:29
Crime rate in Europe by EUROSTAT NUTS regions

This example belongs to the GeoExamples blog http://geoexamples.blogspot.com/2013/10/using-eurostats-data-with-d3js.html

The NUTS classification (Nomenclature of territorial units for statistics) is a hierarchical system for dividing up the economic territory of the EU. MAny of the EUROSTAT data is relative to these regions, and this data is a good candidate to be mapped.

The problem is that EUROSTAT provides some shapefiles in one hand, but without the actual names for the regions, nor other information, and some tables with the name and population for every region. This data has to be joined to be able to map properly.

In this example, the [criminality data](http://epp.eurostat.ec.europa.eu/portal/page/por

@rveciana
rveciana / README.md
Last active December 26, 2015 13:49
Touristic establishments by EUROSTAT NUTS regions

This example belongs to the GeoExamples blog http://geoexamples.blogspot.com/2013/10/using-eurostats-data-with-d3js.html

The NUTS classification (Nomenclature of territorial units for statistics) is a hierarchical system for dividing up the economic territory of the EU. Many of the EUROSTAT data is relative to these regions, and this data is a good candidate to be mapped.

The problem is that EUROSTAT provides some shapefiles in one hand, but without the actual names for the regions, nor other information, and some tables with the name and population for every region. This data has to be joined to be able to map properly.

In this example, the [number of establishments, bedrooms and bed-places data](http://epp

@rveciana
rveciana / README.md
Last active February 11, 2018 12:38
Animated arabic kufic calligraphy with D3

Kufic calligraphy has impressed me since long ago. This example is from the walls of the Gudi Khatun Mausoleum in Nakhchivan, Azerbaijan.

Gudi Khatun Mausoleum

The text is animated in the correct order to understand how the words are ordered. The meaning of the text is

There is no God but God, and Muhammad is His prophet. May God bless him.

First, I made the SVG image from the pictures I found. The elements must be lines so they can be animated this way. That's why kufic calligraphy is good for the example, since all the strokes have the same width.

@rveciana
rveciana / AquilineTwo-webfont.eot
Last active February 11, 2018 12:40
La Belle France
@rveciana
rveciana / README.md
Last active January 1, 2016 18:39
Base map for Haiyan typhoon track