Skip to content

Instantly share code, notes, and snippets.

View espinielli's full-sized avatar

Enrico Spinielli espinielli

View GitHub Profile
@espinielli
espinielli / README.md
Last active April 12, 2016 11:40
Flights by entity (Jan - Feb 2016 vs Jan - Feb 2015)

TODOs:

  • position labels for negative bars on the right side, see this SO post
  • highlight relevant underlying bar when hovering on y-axis label, see commented out stroke styling on bars

Data about percent change of flights movement by entity (Jan - Feb 2016 vs Jan - Feb 2015) from [PRU website][2].

Inspired by Mike's [Bar Chart with Negative Values][1].

@espinielli
espinielli / README.md
Last active April 7, 2016 15:45
D3 tutorial V: Adding tooltips
@espinielli
espinielli / README.md
Last active February 14, 2017 13:46
Arc Bubble Connector Chart
@espinielli
espinielli / README.md
Last active February 19, 2016 16:32
SES RP2 FABs
@espinielli
espinielli / install_tesseract.sh
Created February 16, 2016 08:37 — forked from fractaledmind/install_tesseract.sh
install tesseract-ocr on a Mac
#!/usr/bin/env bash
# courtesy of : <https://ryanfb.github.io/etc/2014/11/13/command_line_ocr_on_mac_os_x.html>
# Check for Homebrew,
# Install if we don't have it
if test ! $(which brew); then
echo "Installing homebrew..."
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
# Ensure `homebrew` is up-to-date and ready
@espinielli
espinielli / README.md
Created February 15, 2016 11:22
Quantization vs. simplification in TopoJSON

Summary

Quantization removes information by reducing the precision of each coordinate, effectively snapping each point to a regular grid.

Simplification removes information by removing points applying a heuristic to make the least-perceptible change.

@espinielli
espinielli / README.md
Last active February 15, 2016 10:39
Scale and translate for D3 maps

When you want to plot a map you have to find out which scale and translation is needed for it to fit your plotting area.

The answer to this comes from Mike Bostok on SO:

http://stackoverflow.com/questions/14492284/#answer-14691788

The code below prints the relevant scale/translate values given the projection and bounding box of your map:

@espinielli
espinielli / En-Route_Traffic_FAB_FIR.csv
Last active April 8, 2016 14:46
FABs' En-route ATFM Delay Chroropleth
YEAR ENTITY_NAME FLT_ERT_1 DLY_ERT_1 DLY_ERT_A_1 DLY_ERT_C_1 DLY_ERT_D_1 DLY_ERT_E_1 DLY_ERT_G_1 DLY_ERT_I_1 DLY_ERT_M_1 DLY_ERT_N_1 DLY_ERT_O_1 DLY_ERT_P_1 DLY_ERT_R_1 DLY_ERT_S_1 DLY_ERT_T_1 DLY_ERT_V_1 DLY_ERT_W_1 DLY_ERT_NA_1
2015 NEFAB 1013252 38961 0 19602 0 182 0 0 0 0 193 5592 0 12190 0 0 1202 0
2016 UK-Ireland FAB 335984 64840 0 3466 0 0 0 0 0 0 674 57257 0 1225 0 0 2218 0
2015 Baltic FAB 789893 127978 0 108994 0 0 0 0 269 0 5409 0 0 5466 1940 0 5900 0
2015 UK-Ireland FAB 2355226 189796 0 34455 0 0 0 0 1954 0 25 0 0 50741 7432 0 95189 0
2016 NEFAB 149875 4260 0 3762 0 0 0 0 0 0 0 0 0 498 0 0 0 0
2016 FAB CE (SES RP2) 255671 23 0 0 0 0 0 0 0 0 23 0 0 0 0 0 0 0
2015 BLUE MED FAB 2326841 1481562 0 645336 0 0 0 5805 33576 500 4945 5840 161 736608 42615 0 6176 0
2016 DANUBE FAB 113568
2015 DK-SE FAB 1011225 12359 0 0 0 0 0 0 309 0 230 0 0 0 6738 0 5082 0
@espinielli
espinielli / README.md
Last active February 1, 2016 15:59
European FABs
@espinielli
espinielli / FIRs_NM.json
Last active January 25, 2016 08:54
test FIR merging and topology
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.