Mapping the health centres
Objectives
The aim of this session is to introduce how to load, manipulate, and visualise spatial data in R. More specifically in this session you will:
- load spatial data using the
sfpackage - manipulate the spatial data by creating buffers around points
- visualise the data using
tmap.
But can you make a map?
Word has begun to spread about the fantastic new analyst in town. Your colleague returns and says that they’ve been trying to identy areas that are further than 5km from a health centre for the past few months, but it should be possible given the data they sent you. They go on to ask “Do you think you’d be able to use your R skills to create a map showing those areas?” You’re not certain that you can, but eager to please you say “Yes!”. Now you’ve got to figure out how to put your spatial skills to good use…
Task
Identify and visualise the areas that are further than 5km from a health service.
Before starting to code, write down the steps required for your analysis. Try to think in terms of the sf commands.
To complete the task you need to follow these broad instructions.
- Load and project the spatial datasets.
- Create a buffer around the health centres.
- Identify the areas that are not in the buffer.
- Visualise the areas on a map.
Below are details of the resources sent to you. Take a look at the resources and start to identify what parts will be useful to complete the task.
Once you have written your analysis steps, open an R script to start writing code and if you’re stuck then see here for more detailed hints of the commands to use.
Resources
Map
The map shows the location of health facilities in all areas of Haiti.
Data
You have the health centre data and a shapefile for admin level 2. Here are the codebooks for the data.
Health centres
adm2.shp