This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang=""> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> | |
<style> | |
.states { | |
fill: rgb(204, 204, 204); | |
stroke: #fff; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang=""> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> | |
<body> | |
<script src="https://d3js.org/d3.v6.min.js"></script> | |
<script src="https://d3js.org/topojson.v1.min.js"></script> | |
<script src="https://d3js.org/queue.v1.min.js"></script> | |
<script src="https://d3js.org/d3-scale-chromatic.v0.3.min.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Country | Year | Emissions | |
---|---|---|---|
China | 2012 | 522000 | |
United States | 2012 | 281000 | |
India | 2012 | 251000 | |
Mexico | 2012 | 111000 | |
Russia | 2012 | 64800 | |
France and Monaco | 2012 | 40300 | |
United Kingdom | 2012 | 24100 | |
South Africa | 2012 | 19900 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var svg = d3.select("svg"), | |
width = +svg.attr("width"), | |
height = +svg.attr("height"); | |
var pollution = new Map(); | |
var pollution_values = []; | |
var pollutant_countries = []; | |
var promises = [ | |
d3.csv("emissions.csv", function (d) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang=""> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> | |
<style> | |
.states { | |
fill: rgb(204, 204, 204); | |
stroke: #fff; | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var svg = d3.select("svg"), | |
width = +svg.attr("width"), | |
height = +svg.attr("height"); | |
var migration = new Map(); | |
var county_names = new Map(); | |
var path = d3.geoPath(); | |
var x = d3.scaleLinear().domain([1, 10]).rangeRound([600, 860]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
date | New York | San Francisco | Austin | |
---|---|---|---|---|
20111001 | 63.4 | 62.7 | 72.2 | |
20111002 | 58.0 | 59.9 | 67.7 | |
20111003 | 53.3 | 59.1 | 69.4 | |
20111004 | 55.7 | 58.8 | 68.0 | |
20111005 | 64.2 | 58.7 | 72.4 | |
20111006 | 58.8 | 57.0 | 77.0 | |
20111007 | 57.9 | 56.7 | 82.3 | |
20111008 | 61.8 | 56.8 | 78.9 | |
20111009 | 69.3 | 56.7 | 68.8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang=""> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> | |
<style> | |
body { | |
padding: 0; | |
margin: 0; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang=""> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> | |
<style> | |
body { | |
padding: 0; | |
margin: 0; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const country = "Country"; | |
const popGrowth = "Data.Health.Population Growth"; | |
var countries = [ | |
"Mexico", | |
"Argentina", | |
"United States", | |
"Denmark", | |
"Central Europe and the Baltics", | |
"Hungary", | |
"Romania", |
NewerOlder