This file contains 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
'''cleaning data for Feds | |
to execute, in correct directory type "python3 cleaningFedData.py" | |
- for when I'm ready to do other categories | |
myarray.append([year, row[5], row[6], row[4], 'married filed seperately', 'nominal']) | |
myarray.append([year, row[9], row[10], row[8], 'single', 'nominal']) | |
myarray.append([year, row[13], row[14], row[12], 'head of household', 'nominal']) | |
''' | |
import csv |
This file contains 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
body { | |
margin: 20px 0px 0px 50px; | |
} | |
.formattext { | |
text-align: right; | |
} | |
.formatresult { | |
text-align: left; |
This file contains 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
body { | |
margin: 20px 0px 0px 50px; | |
} | |
.formattext { | |
text-align: right; | |
} | |
.formatresult { | |
text-align: left; |
This file contains 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
Goal: practice getting data from other sources and making a map using d3 and topo.json | |
Code adapted from Mike Bostock's example: "Let's make a map": http://bost.ocks.org/mike/map/. | |
Much of the code was copied directly. | |
Adapted where appropriate to get data about Scandinavia and to highlight only Sweden on the map. | |
One challenge was handling the many very small territories under Scandinavian rule around the world, | |
with different country codes. | |
Source data from Natural Earth Data: http://www.naturalearthdata.com/ |
This file contains 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
{ | |
"children": [ | |
{ | |
"children": [ | |
{ | |
"rate": -0.4066358024691358, | |
"value": 769, | |
"name": "Black or African American, Non-Hispanic" | |
}, | |
{ |
This file contains 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
body { | |
font-family: sans-serif; | |
} | |
.segments polygon { | |
shape-rendering: geometricPrecision; | |
} | |
.axis path, | |
.axis line { |
This file contains 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
<!-- Bostock's slider brush: http://bl.ocks.org/mbostock/6452972--> | |
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<head> | |
<link href='http://fonts.googleapis.com/css?family=Raleway' rel='stylesheet' type='text/css'> | |
<link rel="stylesheet" href="slider.css"> | |
</head> | |
<body> | |
<p>Adapted from Bostock's <a href="http://bl.ocks.org/mbostock/6452972">slider example</a></p> | |
<script src="http://d3js.org/d3.v3.min.js"></script> |
This file contains 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
billionseconds.zanarmstrong.com |
This file contains 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
body { | |
background-color: #393939; | |
font-family: 'Raleway', sans-serif; | |
} | |
.area { | |
fill: lightsteelblue; | |
stroke-width: 0; | |
} |
This file contains 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
body { | |
font-color: gray; | |
} | |
.squares { | |
stroke: gray; | |
stroke-width: .3; | |
} | |
p { |
OlderNewer