Adapted from http://plnkr.co/edit/LneUEK?p=preview
Tests for rendering and animating SVG via ajax, embedded object, use tag, and inline.
A Pen by Alan David Garcia on CodePen.
Adapted from http://plnkr.co/edit/LneUEK?p=preview
Tests for rendering and animating SVG via ajax, embedded object, use tag, and inline.
A Pen by Alan David Garcia on CodePen.
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.
Some of these files are from the us-atlas:
make topo/us-10m.json
make topo/us-congress-10m.json
Others are from the world-atlas:
make topo/world-50m.json
make topo/world-110m.json
<!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) { |
<!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) { |
<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> |
US State Emissions Choropleth
<!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' /> |