Skip to content

Instantly share code, notes, and snippets.

@cliff145
cliff145 / index.html
Created November 4, 2015 21:43
Intermediate - Module 1 - Michelin Stars
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Bar Chart</title>
<script type="text/javascript" src="http://d3js.org/d3.v3.js"></script>
<style type="text/css">
body {
margin: 0;
@cliff145
cliff145 / index.html
Created September 26, 2015 17:29
Module 6 - Renewable Energy
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Renewable Energy Line Graph</title>
<script type="text/javascript" src="http://d3js.org/d3.v3.js"></script>
<style type="text/css">
body {
background-color: white;
@cliff145
cliff145 / hospitalStaffingMod5.csv
Created September 20, 2015 11:07
Module 5 - Scatterplot
Facility BeginDate EndDate County ControlType HoursType Cost ProductiveHoursPatient
Penn 1/1/2013 8/31/2013 Sacramento Investor Daily Cost Centers 143043 12.25
Cooper 1/1/2013 8/31/2013 Sacramento Investor Management & Supervision 116488 10.6
Jefferson 1/1/2013 10/30/2013 Alameda Non-Profit Daily Cost Centers 224760 9.08
Aria 1/1/2013 10/8/2013 Los Angeles Investor Daily Cost Centers 91751 8.94
Wills Eye 1/1/2013 10/30/2013 Alameda Non-Profit Registered Nurse 234420 8.49
LA Medical 1/1/2013 7/15/2013 Los Angeles Non-Profit Ancillary Cost Centers 144211 7.99
Rothman Institute 1/1/2013 7/15/2013 Los Angeles Non-Profit Daily Cost Centers 133839 7.25
St. Joe's Hospital 1/1/2013 10/30/2013 Alameda Non-Profit Technician & Specialist 72535 6.76
Mayo Clinic 1/1/2013 10/30/2013 Alameda Non-Profit General Services Cost Centers 236735 6.67
@cliff145
cliff145 / hospitalStaffing.csv
Created September 15, 2015 13:45
Module 4 - Hospitals' Productive Hours per Patient
Facility BeginDate EndDate County ControlType HoursType ProductiveHours ProductiveHoursPatient
KINDRED HOSPITAL - SACRAMENTO 1/1/2013 8/31/2013 Sacramento Investor Daily Cost Centers 97,925 12.25
KINDRED HOSPITAL - SACRAMENTO 1/1/2013 8/31/2013 Sacramento Investor Management & Supervision 84,775 10.6
SAN LEANDRO HOSPITAL 1/1/2013 10/30/2013 Alameda Non-Profit Daily Cost Centers 172,742 9.08
PACIFIC HOSPITAL OF LONG BEACH 1/1/2013 10/8/2013 Los Angeles Investor Daily Cost Centers 345,127 8.94
SAN LEANDRO HOSPITAL 1/1/2013 10/30/2013 Alameda Non-Profit Registered Nurse 161,559 8.49
VERDUGO HILLS HOSPITAL 1/1/2013 7/15/2013 Los Angeles Non-Profit Ancillary Cost Centers 202,102 7.99
VERDUGO HILLS HOSPITAL 1/1/2013 7/15/2013 Los Angeles Non-Profit Daily Cost Centers 183,345 7.25
SAN LEANDRO HOSPITAL 1/1/2013 10/30/2013 Alameda Non-Profit Technician & Specialist 128,689 6.76
SAN LEANDRO HOSPITAL 1/1/2013 10/30/2013 Alameda Non-Profit General Services Cost Centers 126,937 6.67
@cliff145
cliff145 / hospitalStaffing.csv
Created September 13, 2015 16:47
Getting there...but not quite
KINDRED HOSPITAL - SACRAMENTO 1/1/2013 8/31/2013 Sacramento Investor Daily Cost Centers 97,925 12.25
KINDRED HOSPITAL - SACRAMENTO 1/1/2013 8/31/2013 Sacramento Investor Management & Supervision 84,775 10.6
SAN LEANDRO HOSPITAL 1/1/2013 10/30/2013 Alameda Non-Profit Daily Cost Centers 172,742 9.08
PACIFIC HOSPITAL OF LONG BEACH 1/1/2013 10/8/2013 Los Angeles Investor Daily Cost Centers 345,127 8.94
SAN LEANDRO HOSPITAL 1/1/2013 10/30/2013 Alameda Non-Profit Registered Nurse 161,559 8.49
VERDUGO HILLS HOSPITAL 1/1/2013 7/15/2013 Los Angeles Non-Profit Ancillary Cost Centers 202,102 7.99
VERDUGO HILLS HOSPITAL 1/1/2013 7/15/2013 Los Angeles Non-Profit Daily Cost Centers 183,345 7.25
SAN LEANDRO HOSPITAL 1/1/2013 10/30/2013 Alameda Non-Profit Technician & Specialist 128,689 6.76
SAN LEANDRO HOSPITAL 1/1/2013 10/30/2013 Alameda Non-Profit General Services Cost Centers 126,937 6.67
@cliff145
cliff145 / hospitalStaffing.csv
Created September 12, 2015 14:08
Stuck with Y-Axis Mapping
KINDRED HOSPITAL - SACRAMENTO 1/1/2013 8/31/2013 Sacramento Investor Daily Cost Centers 97,925 12.25
KINDRED HOSPITAL - SACRAMENTO 1/1/2013 8/31/2013 Sacramento Investor Management & Supervision 84,775 10.6
SAN LEANDRO HOSPITAL 1/1/2013 10/30/2013 Alameda Non-Profit Daily Cost Centers 172,742 9.08
PACIFIC HOSPITAL OF LONG BEACH 1/1/2013 10/8/2013 Los Angeles Investor Daily Cost Centers 345,127 8.94
SAN LEANDRO HOSPITAL 1/1/2013 10/30/2013 Alameda Non-Profit Registered Nurse 161,559 8.49
VERDUGO HILLS HOSPITAL 1/1/2013 7/15/2013 Los Angeles Non-Profit Ancillary Cost Centers 202,102 7.99
VERDUGO HILLS HOSPITAL 1/1/2013 7/15/2013 Los Angeles Non-Profit Daily Cost Centers 183,345 7.25
SAN LEANDRO HOSPITAL 1/1/2013 10/30/2013 Alameda Non-Profit Technician & Specialist 128,689 6.76
SAN LEANDRO HOSPITAL 1/1/2013 10/30/2013 Alameda Non-Profit General Services Cost Centers 126,937 6.67
@cliff145
cliff145 / hospitalStaffing.csv
Last active September 7, 2015 15:55
Hospital's Productive Hours per Patient, CA (2013)
KINDRED HOSPITAL - SACRAMENTO 1/1/2013 8/31/2013 Sacramento Investor Daily Cost Centers 97,925 12.25
KINDRED HOSPITAL - SACRAMENTO 1/1/2013 8/31/2013 Sacramento Investor Management & Supervision 84,775 10.6
SAN LEANDRO HOSPITAL 1/1/2013 10/30/2013 Alameda Non-Profit Daily Cost Centers 172,742 9.08
PACIFIC HOSPITAL OF LONG BEACH 1/1/2013 10/8/2013 Los Angeles Investor Daily Cost Centers 345,127 8.94
SAN LEANDRO HOSPITAL 1/1/2013 10/30/2013 Alameda Non-Profit Registered Nurse 161,559 8.49
VERDUGO HILLS HOSPITAL 1/1/2013 7/15/2013 Los Angeles Non-Profit Ancillary Cost Centers 202,102 7.99
VERDUGO HILLS HOSPITAL 1/1/2013 7/15/2013 Los Angeles Non-Profit Daily Cost Centers 183,345 7.25
SAN LEANDRO HOSPITAL 1/1/2013 10/30/2013 Alameda Non-Profit Technician & Specialist 128,689 6.76
SAN LEANDRO HOSPITAL 1/1/2013 10/30/2013 Alameda Non-Profit General Services Cost Centers 126,937 6.67
@cliff145
cliff145 / hospitalStaffing.csv
Last active August 31, 2015 12:31
Hospital Staffing + Have a Day
KINDRED HOSPITAL - SACRAMENTO 1/1/2013 8/31/2013 Sacramento Investor Daily Cost Centers 97,925 12.25
KINDRED HOSPITAL - SACRAMENTO 1/1/2013 8/31/2013 Sacramento Investor Management & Supervision 84,775 10.6
SAN LEANDRO HOSPITAL 1/1/2013 10/30/2013 Alameda Non-Profit Daily Cost Centers 172,742 9.08
PACIFIC HOSPITAL OF LONG BEACH 1/1/2013 10/8/2013 Los Angeles Investor Daily Cost Centers 345,127 8.94
SAN LEANDRO HOSPITAL 1/1/2013 10/30/2013 Alameda Non-Profit Registered Nurse 161,559 8.49
VERDUGO HILLS HOSPITAL 1/1/2013 7/15/2013 Los Angeles Non-Profit Ancillary Cost Centers 202,102 7.99
VERDUGO HILLS HOSPITAL 1/1/2013 7/15/2013 Los Angeles Non-Profit Daily Cost Centers 183,345 7.25
SAN LEANDRO HOSPITAL 1/1/2013 10/30/2013 Alameda Non-Profit Technician & Specialist 128,689 6.76
SAN LEANDRO HOSPITAL 1/1/2013 10/30/2013 Alameda Non-Profit General Services Cost Centers 126,937 6.67
@cliff145
cliff145 / betterlifeindex.csv
Created August 29, 2015 22:56
Better Life Test
We can make this file beautiful and searchable if this error is corrected: It looks like row 6 should actually have 25 columns, instead of 13 in line 5.
Country,Dwellings without basic facilities,Housing expenditure,Rooms per person,Household net adjusted disposable income,Household net financial wealth,Employment rate,Job security,Long-term unemployment rate,Personal earnings,Quality of support network,Educational attainment,Student skills,Years in education,Air pollution,Water quality,Consultation on rule-making,Voter turnout,Life expectancy,Self-reported health,Life satisfaction,Assault rate,Homicide rate,Employees working very long hours,Time devoted to leisure and personal care
Australia,1.1,20,2.3,31197,38482,72,4.4,1.06,46585,93,74,512,18.8,13,93,10.5,93,82,85,7.4,2.1,0.8,14.23,14.41
Austria,1,21,1.6,29256,48125,73,3.4,1.07,43837,95,82,500,16.9,27,95,7.1,75,81.1,69,7.5,3.4,0.5,8.61,14.46
Belgium,1.9,20,2.3,27811,78368,62,4.5,3.37,47276,91,71,509,18.8,21,84,4.5,89,80.5,74,7.1,6.6,1.2,4.41,15.71
Brazil,6.7,21,1.4,10310,6875,67,4.8,2.17,7909,90,43,402,16.3,18,67,4,79,73.4,69,7.2,7.9,25.5,10.74,14.97
Canada,0.2,22,2.5,30212,63261,72,6.6,0.9,44017,94,89,522
@cliff145
cliff145 / Hospital Staffing - CA - 2013.csv
Created August 27, 2015 14:17
The dataset contains hours worked by hospital employee classification and by hospital cost center groupings, as well as adjusted patient days for all licensed, comparable hospitals in California. State mental hospitals and psychiatric health facilities are excluded. (2013 - sample)
We can make this file beautiful and searchable if this error is corrected: It looks like row 10 should actually have 8 columns, instead of 6 in line 9.
Facility Name,Begin Date,End Date,County Name,Type of Control,Hours Type, Productive Hours ,Productive Hours per Adjusted Patient Day
KINDRED HOSPITAL - SACRAMENTO,1/1/2013,8/31/2013,Sacramento,Investor,Daily Cost Centers," 97,925 ",12.25
KINDRED HOSPITAL - SACRAMENTO,1/1/2013,8/31/2013,Sacramento,Investor,Management & Supervision," 84,775 ",10.6
SAN LEANDRO HOSPITAL,1/1/2013,10/30/2013,Alameda,Non-Profit,Daily Cost Centers," 172,742 ",9.08
PACIFIC HOSPITAL OF LONG BEACH,1/1/2013,10/8/2013,Los Angeles,Investor,Daily Cost Centers," 345,127 ",8.94
SAN LEANDRO HOSPITAL,1/1/2013,10/30/2013,Alameda,Non-Profit,Registered Nurse," 161,559 ",8.49
VERDUGO HILLS HOSPITAL,1/1/2013,7/15/2013,Los Angeles,Non-Profit,Ancillary Cost Centers," 202,102 ",7.99
VERDUGO HILLS HOSPITAL,1/1/2013,7/15/2013,Los Angeles,Non-Profit,Daily Cost Centers," 183,345 ",7.25
SAN LEANDRO HOSPITAL,1/1/2013,10/30/2013,Alameda,Non-Profit,Technician & Specialist," 128,689 ",6.76
SAN LEANDRO HOSPITAL,1/1/2013,10/30/2013,Alameda,Non-Profit,General Ser