Skip to content

Instantly share code, notes, and snippets.

View zanarmstrong's full-sized avatar

zan zanarmstrong

View GitHub Profile
@zanarmstrong
zanarmstrong / cleaningFedData.py
Last active April 28, 2016 02:00
(wip) visualizing federal marginal tax rates
'''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
@zanarmstrong
zanarmstrong / d3formatting.css
Last active October 22, 2023 07:29
formatting numbers example
body {
margin: 20px 0px 0px 50px;
}
.formattext {
text-align: right;
}
.formatresult {
text-align: left;
@zanarmstrong
zanarmstrong / d3formatting.css
Last active November 27, 2023 06:39
d3 time formatting example
body {
margin: 20px 0px 0px 50px;
}
.formattext {
text-align: right;
}
.formatresult {
text-align: left;
@zanarmstrong
zanarmstrong / README.txt
Last active November 8, 2015 19:45
practicing making a map
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/
@zanarmstrong
zanarmstrong / TBchangeInCases2006to2012.json
Last active May 27, 2021 09:40
Zoomable Treemaps w/ Color
{
"children": [
{
"children": [
{
"rate": -0.4066358024691358,
"value": 769,
"name": "Black or African American, Non-Hispanic"
},
{
@zanarmstrong
zanarmstrong / cometChart.css
Last active November 8, 2015 19:47
comet chart (prototype)
body {
font-family: sans-serif;
}
.segments polygon {
shape-rendering: geometricPrecision;
}
.axis path,
.axis line {
@zanarmstrong
zanarmstrong / index.html
Last active April 13, 2018 11:47
slider: days of the year
<!-- 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>
@zanarmstrong
zanarmstrong / CNAME
Last active November 8, 2015 19:53
billion second bday
billionseconds.zanarmstrong.com
@zanarmstrong
zanarmstrong / addingWaves.css
Last active November 8, 2015 20:05
adding waves
body {
background-color: #393939;
font-family: 'Raleway', sans-serif;
}
.area {
fill: lightsteelblue;
stroke-width: 0;
}
@zanarmstrong
zanarmstrong / everyIcon.css
Last active September 8, 2015 03:58
Homage to John Simon's Every Icon
body {
font-color: gray;
}
.squares {
stroke: gray;
stroke-width: .3;
}
p {