Skip to content

Instantly share code, notes, and snippets.

@joannecheng
joannecheng / doc.mkd
Last active January 28, 2017 02:01
Beyond the Bar Graph: Live coding example

Visualizing Rails Issues

Live coding demo from talk at Kod.io @ Linz 2014.

@joannecheng
joannecheng / README.md
Last active May 19, 2016 11:35 — forked from mbostock/.block

This example uses topojson.neighbors to compute neighboring congressional districts (from the 113th congress) from geographic boundaries by detecting shared edges (arcs). The red district is the hovered district, and the orange district is the neighboring districts.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@joannecheng
joannecheng / _.md
Created November 16, 2013 16:41
Tributary inlet
@joannecheng
joannecheng / gem_counts.csv
Created November 12, 2013 17:26
Gem usage counts in Gemfiles, an example. Source: github public code search: "https://github.com/search?q=%22gem+{gemname}%22+path%3AGemfile"
count date_collected gem
14314 2013-11-12 paperclip
9417 2013-11-12 carrierwave
367 2013-11-12 clearance
40062 2013-11-12 devise
1142 2013-11-12 poltergeist
2124 2013-11-12 capybara-webkit
5368 2013-11-12 shoulda-matchers
49259 2013-11-12 factory_girl
@joannecheng
joannecheng / scala-processing.mkd
Last active December 5, 2016 23:43
Make Processing sketches with scala on OSX

Setting up Processing for Scala

(on OSX)

  • Install Processing
  • Move Processing.app/ to your preferred destination (mine is in /Applications/)
  • set scala classpath to include your-install-location/Processing.app/Contents/Resources/Java/core/library/core.jar. I created a little runner called run-sketch that looks like this:
export PROCESSING_CLASS_PATH=$CLASSPATH:/Applications/Processing.app/Contents/Resources/Java/core/library/core.jar
@joannecheng
joannecheng / data_vis_talk_abstract.mkd
Last active May 19, 2016 11:35
Data vis talk (WWC December 2013)

Data visualization is an effective method of communication that's been growing in popularity in the past few years. We have been exposed to beautiful infographics, interactive news articles, and stories based around raw numbers and statistics. In this talk, I'll describe the technologies and techniques I use to create visualizations and the things I've learned during my quest to be part of this field. We'll talk about programming, design, statistics, and journalism and how they intersect in data visualization. After the talk, we'll take a look at data sourced from the meetup* and create visualizations of our own.

* Please fill out this form before the meet up date.

@joannecheng
joannecheng / _.md
Created October 25, 2013 01:32
Closer to the real thing
require 'csv'
rows = CSV.read("Medicare_Provider_Charge_Inpatient_DRG100_FY2011.csv")[1..-1]
column_names = %w(drg_definition provider_name state average_total_payments_to_provider)
puts column_names.to_csv
rows.each do |row|
puts [row[0], row[2], row[5], row[-1]].to_csv
end
@joannecheng
joannecheng / inpatient2011.R
Last active May 19, 2016 11:36
Quick visualization of hospital price vs medicare coverage. http://visualizing.org/contests/visualizing-hospital-price-data
inpatient <- read.csv('/Users/joannecheng/dev/viz/healthcarechallenge/Medicare_Provider_Charge_Inpatient_DRG100_FY2011.csv')
drgs <- unique(inpatient$DRG.Definition)
for(i in 1:length(drgs)) {
treatment <- toString(drgs[i])
dg <- inpatient[inpatient['DRG.Definition']==treatment,]
boxplot((Average.Covered.Charges - Average.Total.Payments)*Total.Discharged~Provider.State,
data=dg, las=2, xlab='State', ylab='Total Unpaid',
main=treatment)