These are the materials for an introduction to D3.js workshop for the National day of Civic Hacking (Code for SF) attendees.
We will be using the following two tools to works through these exercises:
- bl.ocks.org: D3.js Gist renderer and online community
- Building Blocks: In-browser interactive D3.js bl.ock editor
I would love your feedback on the materials in the Gitter forum or in the Github issues.
And please do not hesitate to reach out to me directly via email at jondinu@gmail.com or over twitter @clearspandex
- Part 1 (you are here 👇): Bar chart of median rent over time for the Civic Center neighborhood in SF
- Part 2: Improving the bar chart of median rent by using a line chart instead
The data is from Zillow and is calculated according to their methodology.
The files are comma separated with headers with each column representing a given neighborhood in SF:
Month | Mission | Bernal Heights | Excelsior | ... |
---|---|---|---|---|
2014-01 | 4.21124828532236 | 2.32484076433121 | 1.50130548302872 | ... |
2014-02 | 4.13333333333333 | 2.54726368159204 | 1.225 | ... |
2014-03 | 4.54921422663358 | 2.70212765957447 | 2.25225225225225 | ... |
... | ... | ... | ... | ... |
Archival event link: National Day of Civic Hacking 2015: San Francisco
<style> @import url(http://fonts.googleapis.com/css?family=Crimson+Text:700italic,400,700,400italic); div.gist-readme { font: "Helvetica Neue",Helvetica,Arial,sans-serif; color: #666; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; } .gist-readme pre { width: 200%; margin-left: -50%; overflow: hidden; } .gist-readme p.small { color: #bbb; font-size: 14px; line-height: 1.5; display: block; } .gist-readme blockquote { padding-left: 15px; border-left: 4px solid #5694f1; color: #aaa; } .gist-readme span.code { font-family: Menlo, Monaco, Courier; background-color: #EEE; font-size: 14px; } .gist-readme pre { font-family: Menlo, Monaco, Courier; white-space: pre-wrap; padding: 20px; font-size: 14px; } .gist-readme code { padding: .25em .5em; font-size: 85%; color: #bf616a; background-color: #f9f9f9; border-radius: 3px; border: 1px solid #eee; } .gist-readme table { width: 100%; margin: 40px 0; border-collapse: collapse; font-size: 13px; line-height: 1.5em; } .gist-readme th, .gist-readme td { text-align: left; padding-right: 20px; vertical-align: top; } .gist-readme table td, .gist-readme td { border-spacing: none; border-style: solid; padding: 10px 15px; border-width: 1px 0 0 0; } .gist-readme tr > td { border-top: 1px solid #eaeaea; } .gist-readme tr:nth-child(odd) > td { background: #fcfcfc; } .gist-readme thead th, .gist-readme th { text-align: left; padding: 10px 15px; height: 20px; font-size: 13px; font-weight: bold; color: #444; border-bottom: 1px solid #dadadc; cursor: default; white-space: nowrap; } </style>