Last active
May 19, 2016 11:36
-
-
Save joannecheng/6870790 to your computer and use it in GitHub Desktop.
Quick visualization of hospital price vs medicare coverage. http://visualizing.org/contests/visualizing-hospital-price-data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment