Skip to content

Instantly share code, notes, and snippets.

View danasilver's full-sized avatar

Dana Silver danasilver

View GitHub Profile
@danasilver
danasilver / athletes.csv
Created February 20, 2014 01:48
Sochi 2014 Athletes Data
age birthdate gender height name weight gold_medals silver_medals bronze_medals total_medals sport country
17 1996-04-12 Male 1.72 Aaron Blunck 68 0 0 0 0 Freestyle Skiing United States
27 1986-05-14 Male 1.85 Aaron March 85 0 0 0 0 Snowboard Italy
21 1992-06-30 Male 1.78 Abzal Azhgaliyev 68 0 0 0 0 Short Track Kazakhstan
21 1992-05-25 Male 1.68 Abzal Rakimgaliev 0 0 0 0 Figure Skating Kazakhstan
21 1992-07-30 Male 1.86 Adam Barwood 82 0 0 0 0 Alpine Skiing New Zealand
21 1992-12-18 Male 1.75 Adam Cieslar 57 0 0 0 0 Nordic Combined Poland
18 1995-04-22 Male 1.7 Adam Lamhamedi 76 0 0 0 0 Alpine Skiing Morocco
23 1990-09-13 Male 1.78 Adam Zampa 80 0 0 0 0 Alpine Skiing Slovakia
17 1996-07-01 Female 1.63 Adelina Sotnikova 0 0 0 0 Figure Skating Russian Fed.
@danasilver
danasilver / README.md
Last active August 29, 2015 13:57
U.S. Map

A simple demonstration of TopoJSON and interactivity. Mouseover to show the state's abbreviation and the latitude and longitude of the point.

In addition to D3, this visualization relies on TopoJSON. The map uses an Albers USA projection, for which Alaska is scaled by 0.35x, giving it a lie factor of 3. On mousemoves, the corresponding state abbreviation in the data is shown, and the latitude and longitude is computed by inverting the mouse position.

@danasilver
danasilver / README.md
Last active August 29, 2015 13:57
GitHub Language Bar Chart
@danasilver
danasilver / README.md
Created March 13, 2014 21:06
U.S. Income Choropleth

A choropleth of the average per capita income by state according to the 2010 U.S. census. Hover over a state for more information.

@danasilver
danasilver / README.md
Created March 26, 2014 21:28
Orange Trees

Circumference of orange trees over time.

Data comes from R's "Orange" dataset. Legend created with d3.legend.js (MIT License).

For CS465 at Middlebury College.

@danasilver
danasilver / README.md
Last active August 29, 2015 13:59
Last Letter of First Names

A D3 recreation of David Taylor's visualization The meteoric rise of boys' names ending in 'n'.

The chart shows the number of children born with names ending in each letter. Adjust the slider to change the year. Toggle the checkboxes to show boys, girls, or both.

@danasilver
danasilver / .gitignore
Last active August 29, 2015 14:00
Mercator
ne_10m_admin_0_countries.*
@danasilver
danasilver / data.csv
Last active August 29, 2015 14:05
Bar chart with linear x scale
hours votes
0 3
1 5
2 3
3 7
4 1
5 5
6 0
7 6
8 4
@danasilver
danasilver / gist:6004934
Created July 16, 2013 01:02
Log user out of a Facebook app without logging out of facebook.com

Calling FB.logout() is effective, but it will also log the user out of facebook entirely, prompting him or her to enter an email and password to get back into your app.

Call FB.api({ method: 'Auth.revokeAuthorization' }); instead, which just revokes the Facebook auth token for your app. When the user goes to log in again, he or she will just have to click the "Okay" button to authorize your app again. This will, of course remove the app from the users list of apps on Facebook, but they chose to revoke access in the first place, so this is expected and (hopefully) welcome behavior.

@danasilver
danasilver / .block
Last active March 4, 2016 03:10
Sharpen
height: 504
license: MIT