Skip to content

Instantly share code, notes, and snippets.

View espinielli's full-sized avatar

Enrico Spinielli espinielli

View GitHub Profile
@espinielli
espinielli / index.html
Last active December 11, 2015 01:38 — forked from mbostock/.block
Polar clock
<!DOCTYPE html>
<meta charset="utf-8">
<style>
#clock {
position: relative;
background: #222;
width: 960px;
height: 800px;
}
@espinielli
espinielli / README.md
Last active December 12, 2015 01:28 — forked from mbostock/.block
Solar Terminator on Butterfly Map Projection

Forked from Mike Bostock's Solar Terminator gist. Changed map projection to Waterman's Butterfly.

It would be nice to:

  • fade transition from day to night
  • use satellite image as background (one for day area, the other with lights for the night area)
  • plot the position of the Sun [done] and the Moon, like here or here
  • use astronomical symbols for Sun [done] and Moon (there are SVG versions...)
@espinielli
espinielli / Makefile
Last active February 4, 2017 20:56 — forked from mbostock/.block
Random World Tour with flags
#
# NOTE: flags_names has been _manually_ edited to match Wikipedia commons' names
# with respect to country flags file names
#
all: world-country-flags
.PHONY : flags_ids
flags_ids:
generate_flags_ids.sh > flags_ids
@espinielli
espinielli / README.md
Last active December 13, 2021 23:56 — forked from mbostock/.block
Cahill-Keyes map projection

Cahill-Keyes map projection (I modified Waterman butterfly projection in the geo.polyhedron D3 plugin to have incisions at 17° (Thanks Jason for the great inspiration!).

Gene Keyes's first 5 principles:

  • principal format to an M-shape, joined at south Atlantic
  • principal dividing meridian to 20° W
  • incisions at equator and poles at 17°
  • proportionality of geocells
  • circular parallels for the polar regions

The NASA Blue Marble is reprojected using d3.geo.kavrayskiy7’s invert function.

# OSX for Hackers (Mavericks/Yosemite)
#
# Source: https://gist.github.com/brandonb927/3195465
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Ask for the administrator password upfront
@espinielli
espinielli / README.md
Last active August 29, 2015 14:16 — forked from mbostock/.block
Polygons merge with a hole.
@espinielli
espinielli / README.md
Last active August 29, 2015 14:19 — forked from jasondavies/README.md
bug when switching to horizontal

When switching to horizontal the axis is not correctly positioned: bug.

A demonstration of D3’s vertically-oriented bullet charts, based on this example.

@espinielli
espinielli / README.md
Last active August 29, 2015 14:19 — forked from jasondavies/README.md
Switch to horizontal bug: fixed
@espinielli
espinielli / Another R script for plotting ship paths.md
Last active December 11, 2015 17:30 — forked from bmschmidt/Plotting Ship Paths
Plotting (historical) ship paths