Skip to content

Instantly share code, notes, and snippets.

@geraldo
geraldo / .block
Last active October 24, 2019 09:05
d3-geomap choropleth with labels
license: mit
@geraldo
geraldo / .block
Last active May 22, 2023 15:56
d3-geomap choropleth with labels
license: mit
{
"nodes": [
{"id": "Robot 1", "group": 1},
{"id": "Robot 2", "group": 1},
{"id": "Robot 3", "group": 1},
{"id": "Robot 4", "group": 2},
{"id": "Robot 5", "group": 2},
{"id": "Robot 6", "group": 2}
],
"links": [
@geraldo
geraldo / esb_menu.json
Created June 3, 2019 09:03
ESB tree menu
{"name": "Eixos Tem\u00e0tics", "children": [{"name": "Entorns", "children": [{"name": "Condicions de l'habitatge", "children": [{"text": "", "code": "AM149R", "name": "R\u00e8gim de tinen\u00e7a de l\u00b4habitatge"}, {"text": "", "code": "AM153R", "name": "Nombre d\u00b4habitacions de l'habitatge"}, {"text": "", "code": "AM152_1", "name": "Freq\u00fc\u00e8ncia d'utilitzaci\u00f3 d'aigua sense filtrar"}, {"text": "", "code": "AM152_2", "name": "Freq\u00fc\u00e8ncia d'utilitzaci\u00f3 d'aigua filtrar"}, {"text": "", "code": "AM152_3", "name": "Freq\u00fc\u00e8ncia d'utilitzaci\u00f3 d'aigua envasada"}, {"text": "", "code": "AM151_1", "name": "L'habitatge te goteres i humitats"}, {"text": "", "code": "AM151_2", "name": "L'habitatge te insectes i/o rates"}, {"text": "", "code": "AM151_3", "name": "L'habitatge te fums, gasos o contaminaci\u00f3 de l'aire"}, {"text": "", "code": "AM151_4", "name": "L'habitatge te sorolls procedents de l'exterior"}, {"text": "", "code": "AM154_3", "name": "L'habitatge disposa d'ai
@geraldo
geraldo / .block
Last active January 16, 2019 16:43
openlayers and d3js geojson
license: mit
@geraldo
geraldo / .block
Created January 16, 2019 16:08
geojson
license: mit
@geraldo
geraldo / .block
Last active January 16, 2019 16:08
geojson
license: mit
@geraldo
geraldo / parseQGS2.py
Last active August 27, 2018 10:53
QGIS 2 (python2) project file parser writing layer properties to JSON file
# If you are not inside a QGIS console you first need to import
# qgis and PyQt5 classes you will use in this script as shown below:
from qgis.core import *
from PyQt4.QtCore import QFileInfo
import json
# create a reference to the QgsApplication, setting the
# second argument to False disables the GUI
qgs = QgsApplication([], False)
@geraldo
geraldo / luangwa.geojson
Last active November 21, 2017 17:52
Luangwa River
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@geraldo
geraldo / README.md
Last active February 6, 2016 11:02
Choropleth: Population by neighbourhood in Barcelona

Choropleth: Population by neighbourhood in Barcelona

D3 map example showing population of neighbourhoods in Barcelona. Neighbourhoud polygons are loadad as topojson file, population is loadad as CSV file.