<p><div><div><div><div data-width="100" data-show-faces="false" data-send="true" data-layout="button_count" data-height="21" data-href="https://www.r-bloggers.com/building-a-medicare-shiny-app-part-1/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="https://www.stoltzmaniac.com/building-a-medicare-shiny-app-part-1/"> R-Projects – Stoltzmaniac</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>Hello R community. if you’re up for some fun tinkering with a Shiny App please join me on a new project. I would love to see some collaboration in designing a Shiny Application which will help people make a decision about a healthcare provider. I have only just begun on this project but would to work with others.</p>
<p>This is just a quick look at the data, the roughest shiny app you’ve ever seen can be located on my <a target="_blank" rel="nofollow" href="https://stoltzmaniac.shinyapps.io/medicare_data/">shinyapps.io page</a></p>
<p>The first goal is to help people find a provider based off of City and State (or perhaps zipcode and latitude/longitude). This can take the form of a list, map, etc. I would also like people to be able to glean some information about the place they are going in comparison to the surrounding locations.</p>
<p>I was only able to put a an hour or so into this (and that was months ago) but have decided that it would be fun to start collaborating with anyone who is interested. Please make any pull requests and I’ll get to them!</p>
<p>The data can be found <a target="_blank" rel="nofollow" href="https://catalog.data.gov/dataset/healthcare-associated-infections-hospital-3ca5e">here</a> (supplied by data.gov)</p>
<p><a target="_blank" rel="nofollow" href="https://github.com/stoltzmaniac/Medicare">GitHub Repository</a></p>
<p><span></span></p>
<p>Here is a look at the data we’re dealing with after merging it with the zipcodes package!</p>
<pre># I merged it with the zipcode data
data = read.csv('../Infections/data/Healthcare_Associated_Infections_-_Hospital.csv')
data$zip = clean.zipcodes(data$ZIP.Code)
data(zipcode)
data=merge(data,zipcode,by.x=&quot;zip&quot;,by.y=&quot;zip&quot;)</pre>

<pre>head(data,3)</pre>

<pre>##     zip Provider.ID                    Hospital.Name
## 1 00603      400079 HOSP COMUNITARIO BUEN SAMARITANO
## 2 00603      400079 HOSP COMUNITARIO BUEN SAMARITANO
## 3 00603      400079 HOSP COMUNITARIO BUEN SAMARITANO
##                                   Address      City State ZIP.Code
## 1 CARR.2 KM.1.4 AVE. SEVERIANO CUEVAS #18 AGUADILLA    PR      603
## 2 CARR.2 KM.1.4 AVE. SEVERIANO CUEVAS #18 AGUADILLA    PR      603
## 3 CARR.2 KM.1.4 AVE. SEVERIANO CUEVAS #18 AGUADILLA    PR      603
##   County.Name Phone.Number                           Measure.Name
## 1   AGUADILLA   7876580000                  CAUTI: Observed Cases
## 2   AGUADILLA   7876580000                 CAUTI: Predicted Cases
## 3   AGUADILLA   7876580000 CAUTI: Number of Urinary Catheter Days
##        Measure.ID Compared.to.National         Score
## 1 HAI_2_NUMERATOR        Not Available Not Available
## 2 HAI_2_ELIGCASES        Not Available Not Available
## 3 HAI_2_DOPC_DAYS        Not Available Not Available
##                                                   Footnote
## 1 5 - Results are not available for this reporting period.
## 2 5 - Results are not available for this reporting period.
## 3 5 - Results are not available for this reporting period.
##   Measure.Start.Date Measure.End.Date Location      city state latitude
## 1         01/01/2015       12/31/2015       NA Aguadilla    PR 18.44862
## 2         01/01/2015       12/31/2015       NA Aguadilla    PR 18.44862
## 3         01/01/2015       12/31/2015       NA Aguadilla    PR 18.44862
##   longitude
## 1 -67.13422
## 2 -67.13422
## 3 -67.13422</pre>
<p>I made an ugly plot of the number of rows per state in order to get see if the data appears to make sense based off of my knowledge of the population of the states. I didn’t add the census data but that’s certainly a possibility for the future.</p>
<pre>tmp = data %>%
  filter(Score != 'Not Available') %>%
  group_by(State) %>%
  summarise(Rows = n()) %>%
  top_n(10)</pre>

<pre>## Selecting by Rows</pre>

<pre>p = ggplot(tmp,aes(x=reorder(State,Rows),y=Rows)) + 
  geom_bar(stat='identity',position='dodge') + 
  coord_flip() + 
  theme(legend.position = 'none') + 
  ggtitle('Number of Rows by State - Top 10')

ggplotly(p)</pre>
<p><img alt="plot of chunk unnamed-chunk-3" src="https://i0.wp.com/www.stoltzmaniac.com/wp-content/uploads/2017/05/unnamed-chunk-3-1.png?w=456&ssl=1" data-recalc-dims="1"></p>
<p>Let’s get started! I won’t have much time to start working on this until early June but I wanted to see if there is any interest out there first!</p>
<p>You can find this on my <a target="_blank" rel="nofollow" href="https://github.com/stoltzmaniac/Medicare">GitHub</a></p>
<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="https://www.stoltzmaniac.com/building-a-medicare-shiny-app-part-1/"> R-Projects – Stoltzmaniac</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a title="The R Project for Statistical Computing" rel="nofollow" href="https://www.r-project.org/">R</a> news and <a title="R tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/tutorial">tutorials</a> on topics such as: <a title="Data science" rel="nofollow" href="https://www.r-bloggers.com/search/data%20science">Data science</a>, <a title="Big Data" rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data">Big Data, <a title="R jobs" rel="nofollow" href="https://www.r-users.com/">R jobs</a>, visualization (<a title="ggplot and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2">ggplot2</a>, <a title="Boxplots using lattice and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/boxplot">Boxplots</a>, <a title="Maps and gis" rel="nofollow" href="https://www.r-bloggers.com/search/map">maps</a>, <a title="Animation in R" rel="nofollow" href="https://www.r-bloggers.com/search/animation">animation</a>), programming (<a title="RStudio IDE for R" rel="nofollow" href="https://www.r-bloggers.com/search/RStudio">RStudio</a>, <a title="Sweave and literate programming" rel="nofollow" href="https://www.r-bloggers.com/search/sweave">Sweave</a>, <a title="LaTeX in R" rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX">LaTeX</a>, <a title="SQL and databases" rel="nofollow" href="https://www.r-bloggers.com/search/SQL">SQL</a>, <a title="Eclipse IDE for R" rel="nofollow" href="https://www.r-bloggers.com/search/eclipse">Eclipse</a>, <a title="git and github, Version Control System" rel="nofollow" href="https://www.r-bloggers.com/search/git">git</a>, <a title="Large data in R using Hadoop" rel="nofollow" href="https://www.r-bloggers.com/search/hadoop">hadoop</a>, <a title="Web Scraping of google, facebook, yahoo, twitter and more using R" rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping">Web Scraping</a>) statistics (<a title="Regressions and ANOVA analysis tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/regression">regression</a>, <a title="principal component analysis tutorial" rel="nofollow" href="https://www.r-bloggers.com/search/PCA">PCA</a>, <a title="Time series" rel="nofollow" href="https://www.r-bloggers.com/search/time+series">time series</a>, <a title="finance trading" rel="nofollow" href="https://www.r-bloggers.com/search/trading">trading</a>) and more...
<img height="1" alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/cSy3RbslePo"></a></div>