Skip to content

Instantly share code, notes, and snippets.

@leeannoneal
leeannoneal / airlinesData.csv
Last active August 29, 2015 14:27 — forked from toxford/airlinesData.csv
4airlines
date Airtran Alaska American Delta ExpressJet Frontier Hawaiian JetBlue SkyWest Southwest United USAirways VirginAmerica
20140101 7.4 3.3 6.8 6.0 7.1 7.1 5.2 8.6 5.4 8.0 8.7 6.0 3.5
20140201 5.2 2.9 6.0 5.8 8.5 6.1 6.2 8.8 5.2 7.7 9.1 5.8 3.8
20140301 5.3 3.2 5.4 5.3 6.8 4.6 5.0 6.5 4.6 8.0 7.2 5.8 2.7
20140401 3.9 2.3 4.8 4.6 5.9 4.1 3.5 5.6 4.2 7.5 5.2 5.1 2.4
20140501 4.5 2.5 6.0 5.0 6.3 4.5 3.8 6.0 4.7 8.4 6.5 5.7 2.7
20140601 4.9 3.5 7.4 5.8 7.3 5.5 3.2 6.0 5.4 9.4 8.7 6.7 3.8
20140701 4.7 3.3 7.1 4.6 6.5 4.1 4.0 8.4 5.2 9.1 7.5 7.0 3.1
20140801 4.5 3.7 7.2 4.9 6.3 3.9 3.7 6.6 5.0 7.4 7.0 5.5 3.4
20140901 3.3 3.0 5.6 4.1 6.0 3.5 4.6 3.5 4.0 5.4 5.3 4.7 3.1
@leeannoneal
leeannoneal / README.md
Last active August 29, 2015 14:26 — forked from mbostock/.block
Pie Padding II

D3 3.5’s d3.layout.pie and d3.svg.arc support angular padding to separate adjacent arcs. Increasing the padAngle increases the separation between arcs, but preserves their relative area, which is necessary for accurate perception.

The sides of adjacent arcs are normally parallel. When the specified padding angle is large (relative to the angular width of each arc), the arcs are truncated into wedges. This may be avoided by increasing the inner radius.

@leeannoneal
leeannoneal / index.html
Created July 9, 2015 20:09
sales points 5 | add range to axes
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Cleaning Up</title>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"></script>
<style type="text/css">
@leeannoneal
leeannoneal / bigcontracts.csv
Created June 19, 2015 19:41
hcc horiz 16 | Adjust left side padding, widen the SVG, change rect hover color to blue
We can make this file beautiful and searchable if this error is corrected: It looks like row 5 should actually have 13 columns, instead of 6. in line 4.
Id,VendorLong,VendorShort,VendorProper,Vendor,Subject,DocumentType,AwardDate,InitialCompleteDAte,CompleteDateInclAmendments,InitialContractAmount,ContractAmountInclAmendments,Difference
W220029-CO#07,"Manhattan Construction Company
2120 Montrose Blvd, Houston, TX 77006",Manhattan Construction Company,Manhattan Construction Company,Manhattan A,,Contracts,2/26/2015,8/29/2015,8/29/2015,687908,107681896,106993988
W220029-CO#06,"Manhattan Construction Company
2120 Montrose Blvd, Houston, TX 77006",Manhattan Construction Company,Manhattan Construction Company,Manhattan B,,Contracts,12/9/2014,8/31/2015,8/31/2015,2134781,106993988,104859207
W220029-CO#05,"Manhattan Construction Company
2120 Montrose Blvd, Houston, TX 77006",Manhattan Construction Company,Manhattan Construction Company,Manhattan C,,Contracts,8/13/2014,8/20/2014,8/20/2014,187094,104859207,104672113
W220029-CO#04,"MANHATTAN CONSTRUCTION CO.
2120 Montrose Blvd., Houston, TX 77006",Manhattan Construction Company,Manhattan Construction Company,Manhattan D,
Descriptor TotalFruit Apples Bananas Berries Grapes Melons Oranges OtherCitrus StoneFruit TropicalFruit AppleJuice OrangeJuice
White: All 268.72 24.98 27.17 10.21 18.61 30.67 9.02 24.36 16.98 11.93 18.59 69.45
White: At home 202.7 16.33 19.98 7.86 14.25 24.47 5.72 15.38 12.97 6.68 13.67 57.2
White: Away from home 66.02 8.64 7.19 2.34 4.36 6.2 3.31 8.98 4.01 5.25 4.91 12.24
Black: All 319.31 16.74 22.9 7.38 25.62 20.73 9.18 35.29 9.77 23.43 29.36 93.74
Black: At home 217.11 10.37 15.68 4.55 18.82 13.28 5.26 21.65 6.9 16.78 20.63 64.8
Black: Away from home 102.2 6.38 7.23 2.83 6.81 7.43 3.91 13.64 2.87 6.65 8.73 28.93
Hispanic: All 321.95 27.57 33 7.68 12.55 27.72 25.6 22.79 9.4 24.28 27.89 89.39
Hispanic: At home 236.59 18.76 27.23 5.89 9.02 18.58 19.62 13.83 6.01 16.56 21.29 67.7
Hispanic: Away from home 85.36 8.82 5.78 1.79 3.54 9.14 5.99 8.95 3.39 7.71 6.6 21.69
Year Month Ninjured Nkilled NinjuredPer1000000 NkilledPer1000000
2012.0 7.0 764.0 5.0 89.97678622469536 0.5888533129888439
2012.0 8.0 773.0 12.0 91.03672218807527 1.4132479511732254
2012.0 9.0 822.0 12.0 96.80748465536594 1.4132479511732254
2012.0 10.0 885.0 11.0 104.22703639902538 1.2954772885754566
2012.0 11.0 929.0 7.0 109.4089455533272 0.8243946381843815
2012.0 12.0 1180.0 15.0 138.96938186536718 1.7665599389665319
2013.0 1.0 996.0 20.0 117.29957994737771 2.3554132519553757
2013.0 2.0 881.0 10.0 103.7559537486343 1.1777066259776878
2013.0 3.0 898.0 7.0 105.75805501279638 0.8243946381843815
@leeannoneal
leeannoneal / index.html
Created April 29, 2015 14:12
Rural schools in Texas | Load data
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Top-heavy school districts</title>
<script type="text/javascript" src="http://d3js.org/d3.v3.min.js"></script>
</head>
<body>
<svg width="400" height="400">
<circle cx="100" cy="60" r="40" stroke="#A18F5A" stroke-width="4" fill="#E6CC80" />
@leeannoneal
leeannoneal / ruralschools.csv
Created March 20, 2015 15:10
Spending, test scores for rural school districts in Texas
We can make this file beautiful and searchable if this error is corrected: It looks like row 3 should actually have 21 columns, instead of 16. in line 2.
County Number,County Name,Region Number,Region Name,District Number,District Name,STAAR All Subjects: Level II (Percent),4-Year Completion Rate (Grade 9-12): Graduated (Percent),4-Year Completion Rate (Grade 9-12): Received GED (Percent),4-Year Completion Rate (Grade 9-12): Continued HS (Percent),4-Year Completion Rate (Grade 9-12): Dropped Out (Percent),Annual Dropout Rate (Grade 9-12),Spending by Object Total Expenditures (Per Student),Spending by Function Instruction (Per Student),Spending by Function Instruction (Percent),Spending by Function Central Administration (All Funds),Spending by Function Central Administration (Per Student),Spending by Function Central Administration (Percent),Revenue Total Revenues (All Funds),Revenue Total Revenues (Per Student),Total Enrollment (Count)
128,Karnes,20,San Antonio,128904,Falls City ISD,95,100.00,0.00,0.00,0.00,0.00,10827,5619,57.64,269580,750.92,7.70367898,5479540,15263,359
58,Dawson,17,Lubbock,58905,Klondike ISD,95,100.00,0.00,0.00,0.00,0.00,28842,6200,47.49,31