Module 39 Rmarkdown dashboards with flexdashboard
1. Install Rmarkdown.
2. Start a new Rmarkdown file. In RStudio, pick the “From Template” option. Pick flexdashboard. Name your file “dashboard.Rmd”.
3. Set up your work space by loading the ggplot2
, dplyr
, flexdashboard
, leaflet.extras
, leaflet
, and lubridate
packages.
3. Read in some violence data by running
if(!file.exists('violence.RData')){
download.file('https://github.com/databrew/intro-to-data-science/blob/main/data/GEDEvent_v21_1.RData?raw=true', 'violence.RData')
}
load('violence.RData')
vio <- GEDEvent_v21_1; rm(GEDEvent_v21_1)
4. Take a look at some details on the data here: https://ucdp.uu.se/downloads/ged/ged211.pdf
5. Take a look at the head of your data. What is the unit of observation?
6. Make a dashboard showing some interesting aspect of violence. It should include at least 3 panels, of which at least 1 should be a map. Be creative.