Data is from CDC's wonder dataset
This is code illustrates how to create a "comet chart" in R. See this research paper for more information about comet charts: http://research.google.com/pubs/pub42901.html
body { | |
margin: 20px 0px 0px 50px; | |
} | |
.formattext { | |
text-align: right; | |
} | |
.formatresult { | |
text-align: left; |
body { | |
margin: 20px 0px 0px 50px; | |
} | |
.formattext { | |
text-align: right; | |
} | |
.formatresult { | |
text-align: left; |
AYGA,GKA,GOROKA,GOROKA,PAPUA NEW GUINEA,06,04,54,S,145,23,30,E,5282 | |
AYLA,LAE,,LAE,PAPUA NEW GUINEA,00,00,00,U,00,00,00,U,0000 | |
AYMD,MAG,MADANG,MADANG,PAPUA NEW GUINEA,05,12,25,S,145,47,19,E,0020 | |
AYMH,HGU,MOUNT HAGEN,MOUNT HAGEN,PAPUA NEW GUINEA,05,49,34,S,144,17,46,E,5388 | |
AYNZ,LAE,NADZAB,NADZAB,PAPUA NEW GUINEA,06,34,11,S,146,43,34,E,0239 | |
AYPY,POM,PORT MORESBY JACKSONS INTERNATIONAL,PORT MORESBY,PAPUA NEW GUINEA,09,26,36,S,147,13,12,E,0146 | |
AYRB,RAB,,RABAUL,PAPUA NEW GUINEA,00,00,00,U,00,00,00,U,0000 | |
AYWK,WWK,WEWAK INTERNATIONAL,WEWAK,PAPUA NEW GUINEA,03,35,01,S,143,40,09,E,0019 | |
BGAM,N/A,,ANGMAGSSALIK,GREENLAND,00,00,00,U,00,00,00,U,0000 | |
BGAS,N/A,,ANGISSOQ,GREENLAND,00,00,00,U,00,00,00,U,0000 |
Data is from CDC's wonder dataset
This is code illustrates how to create a "comet chart" in R. See this research paper for more information about comet charts: http://research.google.com/pubs/pub42901.html
Data from CDC's wonder dataset on infant deaths. Please see data collection information and restrictions here: http://wonder.cdc.gov/lbd.html
{ | |
"children": [ | |
{ | |
"children": [ | |
{ | |
"rate": -0.4066358024691358, | |
"value": 769, | |
"name": "Black or African American, Non-Hispanic" | |
}, | |
{ |
body { | |
background-color: #323232; | |
} | |
p { | |
color: white; | |
font-family: 'Raleway', sans-serif; | |
} | |
.mainPath { |
var img = new Image(); | |
var canvas = document.getElementById('canvas'); | |
var ctx = canvas.getContext('2d'); | |
let coords = []; | |
img.onload = function() { | |
ctx.drawImage(img, 0, 0); |
D3 Bingo is meant to be a fun challenge to inspire you to explore parts of D3 (and engaging with the D3 community) that you might not have done yet... and to celebrate what you have done so far!
To play D3 Bingo, fork this gist on blockbuilder.
In the data.js file, add a URL for any projects that you have that fulfil a challenge. Then save. Your bingo card on bl.ocks will now show your completed squares. If you click on a square, it will open the URL for that project.
You can see my completed bingo card here as an example.
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<link rel="stylesheet" href="overlay.css"> | |
<link href='http://fonts.googleapis.com/css?family=Raleway:400,700' rel='stylesheet' type='text/css'> | |
<body> | |
<div id = "description"> | |
<h2>Is Africa bigger than North America?</h2> | |
<p><strong>Yes!</strong> In fact, North America, including United States, Canada, Mexico, and Greenland, could easily fit inside Africa with plenty of room left to add Central America, Argentina, Chile, and Bolivia too.</p> | |
<p>Most of the maps we use day to day distort the relative sizes of countries, making countries near the equator look relatively small and countries near the north and south pole look relatively huge. However, we can compare the true sizes of countries by using a different type of map.</p> | |
<div><button name="Sweden,Madagascar">Sweden vs Madagascar</button><button name="Australia,Antarctica">Australia vs Antarctica</button><button name="Europe,Brazil">Europe vs Brazil</button><button name="US,Australia">United States vs Australia</b |