R Markdown

Here you will find visual representations of data on mask wearing habits from a survey conducted by the New York Times between July 2 and July 14, 2020. The orginal data sets can be found at: https://github.com/nytimes/covid-19-data.

My interest in this data is a result of being a participant in a Problem Solving Initiative course through UM Law School this semester. My group has been asked to produce a policy memo on the impending COVID-19 vaccine and if a mandate (and at what level) is possible. Part of our analysis will look at public perception. In Michigan, our governor enforced a mask mandate. This data is helpful to gauge public perception of a mask mandate as a comparative look at the feasibility of a vaccine mandate.

Factoring the Data - Pt 1

After I cleaned my data, I had to factor the CATEGORY column (survey responses) so that the descriptive data was visible.

## 
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
## 
##     last_plot
## The following object is masked from 'package:stats':
## 
##     filter
## The following object is masked from 'package:graphics':
## 
##     layout
## [1] "COUNTY"   "CATEGORY" "VALUE"
##      NEVER     RARELY FREQUENTLY     ALWAYS  SOMETIMES 
##         83         83         83         83         83

Factoring the Data - Pt 2

I wanted to create another factor to be able to visualize data about specific counties among Michigan’s 83 total counties. I am from SE Michigan so I selected 5 counties in the area that I thought might give a diverse picture of mask-wearing habits (ie. a very liberal Washtenaw County and a very rural Hillsdale county).

Then I found a formula (all on my own!!) to change these variables from their FIPS code (which is largely unrecognizable to the general public) to the county name.

## [1] "26059" "26075" "26093" "26161" "26163"
## [1] "Hillsdale"  "Jackson"    "Livingston" "Washtenaw"  "Wayne"

Graph 1: Frequency of Categorical Responses in the State of Michigan to the question “How often do you wear a mask in public when you expect to be within six feet of another person?”

Graph 2: Isolated Counties Plot

In this graph you can pick out the differences in mask-wearing habits in Hillsdale, Jackson, Livingston, Washtenaw, and Wayne counties set against the rest of Michigan.

Graph 3: Interactive Plot

Scroll over data points to get even more information! Thank you for viewing my Rmarkdown webpage! :)

Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.