Skip to content

Instantly share code, notes, and snippets.

View adg29's full-sized avatar
📱

Alan Garcia adg29

📱
View GitHub Profile
@adg29
adg29 / Test of animating external and inline svg file.markdown
Last active August 29, 2015 14:22
Test of animating external and inline svg file
@adg29
adg29 / bad-trip.svg
Last active August 29, 2015 14:22
vivus.js SVG animation from file
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@adg29
adg29 / Programmatic Zoom In + Out to Topojson Bounding Box.markdown
Last active August 29, 2015 14:22
Programmatic Zoom In + Out to Topojson Bounding Box

Programmatic Zoom In + Out to Topojson Bounding Box

Adds zoom in + out buttons to topojson features. Adapted from mbostock’s block #9656675

Uses zoom transitions to smoothly interpolate between different views. This example also allows you to freely pan and zoom with the mouse (or touch).

http://bl.ocks.org/mbostock/9656675

A Pen by Alan David Garcia on CodePen.

@adg29
adg29 / README.md
Last active April 27, 2017 17:50 — forked from mbostock/.block
TopoJSON Resources

Some of these files are from the us-atlas:

  • us.json - make topo/us-10m.json
  • us-congress-113.json - make topo/us-congress-10m.json

Others are from the world-atlas:

  • world-50m.json - make topo/world-50m.json
  • world-110m.json - make topo/world-110m.json
@adg29
adg29 / index.html
Last active August 29, 2015 14:22
Vega Scatter Plot of Nuclear Energy Plants Per Town Per State
<!DOCTYPE html>
<meta charset="utf-8">
<link href="http://trifacta.github.com/vega/css/vega.css" rel="stylesheet">
<script src="http://d3js.org/d3.v3.min.js"></script>
<script src="http://trifacta.github.com/vega/vega.js"></script>
<script>
function parse(spec) {
vg.parse.spec(spec, function(chart) {
@adg29
adg29 / index.html
Last active August 29, 2015 14:22
Vega Scatter Plot of Nuclear Energy Plants License Duration Per State
<!DOCTYPE html>
<meta charset="utf-8">
<link href="http://trifacta.github.com/vega/css/vega.css" rel="stylesheet">
<script src="http://d3js.org/d3.v3.min.js"></script>
<script src="http://trifacta.github.com/vega/vega.js"></script>
<script>
function parse(spec) {
vg.parse.spec(spec, function(chart) {
@adg29
adg29 / index.html
Last active August 29, 2015 14:22
Vega Scatter Plot of Nuclear Energy as Percent of all Energy by State
<html>
<head>
<title></title>
<link href="http://trifacta.github.com/vega/css/vega.css" rel="stylesheet">
<script src="http://d3js.org/d3.v3.min.js"></script>
<script src="http://trifacta.github.com/vega/vega.js"></script>
</head>
<body>
<div id="vis"></div>
</body>
@adg29
adg29 / README.md
Last active April 27, 2017 17:51 — forked from amrit/README.md
US State Emissions Choropleth

US State Emissions Choropleth

@adg29
adg29 / README.md
Last active April 27, 2017 18:01 — forked from mbostock/.block
U.S. Counties TopoJSON

A demo of TopoJSON on a U.S. counties shapefile from the U.S. census bureau. The same TopoJSON file can also be used to show states.

@adg29
adg29 / index.html
Last active August 16, 2018 13:39 — forked from zross/index.html
Animate path on Leaflet map using D3
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7/leaflet.css" />
<script src="http://d3js.org/d3.v3.min.js" type="text/javascript"></script>
<script src="http://cdn.leafletjs.com/leaflet-0.7/leaflet.js"></script>
<script src='https://api.tiles.mapbox.com/mapbox.js/v1.6.4/mapbox.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox.js/v1.6.4/mapbox.css' rel='stylesheet' />