For my capstone statistics project as a Statistics major at Amherst College, I taught myself how to work with geospatial data and ultimately created an interactive map of the trails near Amherst College.
The major deliverables from this project were:
- A Shiny app that contains a Leaflet map of the trails surrounding Amherst College (accessible at https://nfrontero20.shinyapps.io/leaflet/)
- An Rda (R data object) named app-objects.rda that contains four layers of geospatial data:
amherst_college_trails
,bike_trails
,elevation_contours
, andtrail_lengths
.
The repository contains all code that was used to generate the Shiny app, as well as the report. An explanation of the files used to create the Shiny app is as follows:
- "data-raw" folder contains the raw data
- create-renamed-data.rmd contains code that creates renamed copies of the raw data files and saves them in the "data" folder
- create-objects.rmd saves the data layers needed for the Leaflet map to an Rdata file named app-objects.rda in the "shiny" folder
- "shiny" folder contains all of the code needed to run the Shiny app, including:
- ui.R
- server.R
- Global.R, a special R file that allows for the Rdata file to be read in, giving the app access to all needed data
- app-objects.rda