This repo contains example code for creating a choropleth map using R programming and the following primary packages: {sf}, {ggplot2}. It retrieves and cleans data from internet sources, derives "pretty" break intervals for the primary variable (life expectancy), then outputs a png. The {classInt} package provides functions to define breaks using other methods, such as "jenks."
- Clone the project from GitHub into a local folder
- Open the RProject in RStudio or open the folder in Positron
- If {renv} does not bootstrap/install itself, install manually using
install.packages("renv")renv::init()-> Choose option 1 to restore project
- Click on
run.Rin Files pane to open the source script - Run all
{renv} documentation: Collaborating with renv
