- Data are in the
data
folder (this also contains the script for anonymising original data files) - Analysis code is in the
ChoroplethMagnitude.qmd
(quarto) file
We provide resources for re-creating the computational environment (R version, package versions) used for all data wrangling, data visualization, statistical modelling, and reporting. This will generate a fully interactive RStudio session, which will be running from a Docker container.
- Download Docker Desktop and launch it
- Clone this repository to your local machine
- Rename the local repository
choroplethmagnitude
(Docker won't accept uppercase letters in the directory name) - Use the command line to navigate to the repository
- Type
docker build -t choroplethmagnitude .
(wherechoroplethmagnitude
is the repository name). This builds the Docker image. - Type
docker run --rm -p 8787:8787 -e PASSWORD=password choroplethmagnitude
to launch the Docker container. - In your browser's address bar, type
localhost:8787
- Enter
rstudio
as the username andpassword
as the password. - Open
ChoroplethMagnitude.qmd
and press Render to generateChoroplethMagnitude.pdf
Note: Computationally intensive statistical models have been saved in ChoroplethMagnitude_cache
. To speed-up rendering, these cached models are loaded instead of executing the code that generated them. To generate models from scratch, change the eval_models
parameter in line 5 to true
.