Skip to content

Instantly share code, notes, and snippets.

@kintero
kintero / README.md
Created February 9, 2016 22:33 — forked from kerryrodden/.block
Sequences sunburst

This example shows how it is possible to use a D3 sunburst visualization (partition layout) with data that describes sequences of events.

A good use case is to summarize navigation paths through a web site, as in the sample synthetic data file (visit_sequences.csv). The visualization makes it easy to understand visits that start directly on a product page (e.g. after landing there from a search engine), compared to visits where users arrive on the site's home page and navigate from there. Where a funnel lets you understand a single pre-selected path, this allows you to see all possible paths.

Features:

  • works with data that is in a CSV format (you don't need to pre-generate a hierarchical JSON file, unless your data file is very large)
  • interactive breadcrumb trail helps to emphasize the sequence, so that it is easy for a first-time user to understand what they are seeing
  • percentages are shown explicitly, to help overcome the distortion of the data that occurs wh
@kintero
kintero / paises.csv
Last active March 13, 2025 19:03 — forked from brenes/README.md
CSV de paises, con nombre en castellano, ingles, codigo ISO y prefijo telefónico del país, más continentes.
nombre name nom iso2 iso3 phone_code continente
Afganistán Afghanistan Afghanistan AF AFG 93 Asia
Albania Albania Albanie AL ALB 355 Europa
Alemania Germany Allemagne DE DEU 49 Europa
Algeria Algeria Algérie DZ DZA 213 África
Andorra Andorra Andorra AD AND 376 Europa
Angola Angola Angola AO AGO 244 África
Anguila Anguilla Anguilla AI AIA 1 264 América
Antártida Antarctica L'Antarctique AQ ATA 672 Antártida
Antigua y Barbuda Antigua and Barbuda Antigua et Barbuda AG ATG 1 268 América
@kintero
kintero / cartogram.py
Last active August 29, 2015 14:23 — forked from gka/cartogram.py
"""
Generator for packed circle cartograms
"""
import proj, gisutils
class Cartogram:
def loadCSV(self, url, key='id', value='val', lon='lon', lat='lat'):
import csv
doc = csv.reader(open(url))
@kintero
kintero / data.csv
Last active August 29, 2015 14:15 — forked from jkeirstead/data.csv
category value sector
UK production emissions 632 UK
Carbon flows from EU 88 EU
Carbon flows to EU -61 EU
Carbon flows from other Annex 1 82 Annex 1
Carbon flows to other Annex 1 -39 Annex 1
Carbon flows from non-Annex 1 104 Other non-Annex 1
Carbon flows from non-Annex 1 64 China
Carbon flows to non-Annex 1 -25 Non-Annex 1
UK consumption emissions 845 UK