Created
November 20, 2015 03:15
-
-
Save d3byex/4c5e4038599858e7fa5c to your computer and use it in GitHub Desktop.
D3byEX 5.4: Mapping and Conversion
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> | |
<head> | |
<meta name="description" content="D3byEX 5.4" /> | |
<meta charset="utf-8"> | |
</head> | |
<body> | |
<script src="http://d3js.org/d3.v3.min.js"></script> | |
<script> | |
var url = "https://gist.githubusercontent.com/d3byex/e5ce6526ba2208014379/raw/8fefb14cc18f0440dc00248f23cbf6aec80dcc13/walking_dead_s5.csv"; | |
d3.csv(url, function (error, data) { | |
var mappedAndConverted = data.map(function(d) { | |
return { | |
Episode: +d.Episode, | |
USViewers: +d.USViewers, | |
Title: d.Title | |
}; | |
}); | |
console.log(mappedAndConverted); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment