Faux-3d SVG globe using d3.geo.orthographic and a few radial gradients. Labels offset or hidden based on radians from current map center to enhance the effect.
Uncomment svg.append("g").attr("class","countries") for hover-able country outlines.
Faux-3d SVG globe using d3.geo.orthographic and a few radial gradients. Labels offset or hidden based on radians from current map center to enhance the effect.
Uncomment svg.append("g").attr("class","countries") for hover-able country outlines.
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> | |
<title>d3.js Spinny Globe from Mike Bostock's SVG Open 2011 keynote</title> | |
<script src="http://mbostock.github.com/d3/d3.js"></script> | |
<script src="http://mbostock.github.com/d3/d3.geo.js"></script> | |
<link type="text/css" rel="stylesheet" href="http://mbostock.github.com/d3/talk/20111018/style.css"/> | |
<link type="text/css" rel="stylesheet" href="http://mbostock.github.com/d3/talk/20111018/colorbrewer/colorbrewer.css"/> | |
<style type="text/css"> |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<link rel="stylesheet" href="style.css"> | |
</head> | |
<body> | |
<svg id="defs"> | |
<defs> | |
<linearGradient id="gradBlue" x1="0%" y1="0%" x2="100%" y2="0%"> |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<link rel="stylesheet" href="style.css"> | |
</head> | |
<body> | |
<svg id="defs"> | |
<defs> | |
<linearGradient id="gradBlue" x1="0%" y1="0%" x2="100%" y2="0%"> |
A scatterplot using d3js. It maps social trust against ease of doing business in various countries. For tooltips, it makes use of Justin Donaldson's fork of the jQuery plugin tipsy. Data come from the Pew Global Attitudes project and the Doing Business rankings. For a live example see my post on it or http://bl.ocks.org/4481531
<html> | |
<head> | |
<title>Interactive Line Graph</title> | |
<script src="http://d3js.org/d3.v2.js"></script> | |
<!-- | |
using JQuery for element dimensions | |
This is a small aspect of this example so it can be removed fairly easily if needed. | |
--> | |
<script src="http://code.jquery.com/jquery-1.7.2.min.js"></script> | |
<script src="sample_data.js"></script> |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Map</title> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script> | |
<style type="text/css"> | |
svg { | |
background: #eee; | |
} | |
This is a reimplementation of the Grouped Bar Chart by Mike Bostock. Although useful, I found the original's minimal comments and inverted axes hard to follow, so I created the version you see here.