This R Shiny application was submitted to the RStudio Shiny Contest 2021. Check out the running app online: https://nz-stefan.shinyapps.io/commute-explorer-2/.
The data behind this application is available in the Datafinder hosted by Stats NZ. Additionally, I used the Statistal Area 2 2018 data set which contains shape files of the statistical areas referenced in the commuter data set. I simplified the polygons in those shape files to reduce the amount of data to display in the browser for this application. I also processed the Geographic Areas File 2020 to group statistical areas into the main NZ regions.
The app is deployed through RStudio's webservice shinyapps.io.
The development environment of this project is encapsulated in a Docker container.
- Install Docker. Follow the instructions on https://docs.docker.com/install/
- Make docker run without sudo
Log out and log back in so that your group membership is re-evaluated
sudo groupadd docker sudo usermod -aG docker $USER
- Clone the GIT repository
git clone https://github.com/nz-stefan/commute-explorer-2.git
- Setup development Docker container
You should see lots of container build messages
cd commute-explorer-2 bin/setup-environment.sh
- Spin up the container
bin/start_rstudio.sh
- Open http://localhost:8791 in your browser to start a new RStudio session
- Install R packages required for this app. Type the following instructions into the R session window of RStudio
The installation will take a few minutes. The package library will be installed into the
renv::restore()
renv/library
directory of the project path. - Open the file
app/global.R
and hit the "Run app" button in the toolbar of the script editor (or typeshiny::runApp("app")
in the R session window). The Shiny app should open in a new window. You may need to instruct your browser to not block popup windows for this URL.