Skip to content

Instantly share code, notes, and snippets.

@phoebebright
phoebebright / README.md
Created September 19, 2013 18:27 — forked from dwtkns/README.md

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.

@phoebebright
phoebebright / index.html
Created September 19, 2013 10:24 — forked from johan/index.html
<!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

@phoebebright
phoebebright / index.html
Created November 21, 2012 10:36 — forked from benjchristensen/index.html
Interactive Line Graph (D3)
<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>
@phoebebright
phoebebright / index.html
Created October 11, 2012 08:47 — forked from eoiny/index.html
D3 Choropleth Map Ireland
<!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;
}
@phoebebright
phoebebright / README.mkd
Created August 30, 2012 16:25
Grouped bar

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.