Skip to content

Instantly share code, notes, and snippets.

@XavierGimenez
XavierGimenez / .block
Last active October 10, 2018 07:54 — forked from mbostock/.block
Static Force Layout + dragging
license: gpl-3.0
@XavierGimenez
XavierGimenez / data.json
Last active July 31, 2018 09:09
Bar chart with custom shapes
[
{"area": "A ", "value": 30000},
{"area": "B ", "value": 4800},
{"area": "C ", "value": 40000},
{"area": "D ", "value": 30040},
{"area": "E ", "value": 120200},
{"area": "F", "value": 70000}
]
@XavierGimenez
XavierGimenez / index.html
Last active April 24, 2018 15:53
vega.js playground
<html>
<head>
<title></title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vega/3.0.0-rc4/vega.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vega-lite/2.0.0-beta.10/vega-lite.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vega-embed/3.0.0-beta.19/vega-embed.js"></script>
<style>
body {
font-family: sans-serif;
}
@XavierGimenez
XavierGimenez / .block
Created August 10, 2017 14:01 — forked from mbostock/.block
Difference Chart
license: gpl-3.0
@XavierGimenez
XavierGimenez / Readme.md
Last active August 7, 2017 07:49
Specialization Index chart

Custom chart to show the Specialization Index in a series of Universitites

Specialization Index

In bilbiometrics, the SI is an indicator that describes the intensity of research of an entity (e.g., an institution) in a given related field relative to the intensity of the country or world in the same field.

@XavierGimenez
XavierGimenez / Readme.md
Last active August 7, 2017 07:56
Parallel Sets

Parallel sets

Base code (WIP) for a proof of concept of a parallel set with progressive disclosure (drilling down a fixed hierarchy in a flow).

Reusing code (data transformation and alluvial graph) from the Raw project, github here.

Dataset from the Parallel Sets project

@XavierGimenez
XavierGimenez / Readme.md
Last active August 8, 2017 13:03
Animated timeline

animated timeline

Show age trends through time by animating a timeline, changing opacities, colors and widths proportional to the year within the temporal series. Timeline contains data a regional level, mouseover show national data for the same year and percentage differences between the two series

d3.js recreation of this example of (animated timelines from the flowingData blog)[http://flowingdata.com/2017/07/17/marrying-age-over-the-past-century/], made in R: GitHub Logo

@XavierGimenez
XavierGimenez / Readme.md
Last active July 27, 2017 11:57
vega.js playground

Vega.js example with small multiples, legends amb multiple marks.

By using the mark type group we can facet the data and create small multiples, as this:

"marks": [   
    {
       "name": "rankName2",
       "type": "group",

       "from": {
@XavierGimenez
XavierGimenez / .block
Last active March 9, 2023 12:09 — forked from mbostock/.block
Grouping nodes in a Force-Directed Graph
license: gpl-3.0
height: 600
@XavierGimenez
XavierGimenez / .block
Last active May 19, 2017 12:43 — forked from armollica/.block
Transcription collection from Inscription, distribution through time
height: 600