--- title: "Hints" date: "2019-09-03" publishDate: "2019-08-20" output: html_document: highlight: default toc: false toc_float: false number_sections: false ---

Hints

  1. Load packages tidyverse, sf, and tmap.
  2. Use the read_csv function to load the health centre csv file.
  3. Use the st_read function to load the shape files of the admin 2 boundaries.
  4. Use the st_as_sf function, type ?st_as_sf into the console to get more details. You will need to say which columns are the coordinates and tell the function what crs is needed.
  5. Use st_transform to reproject the data. For Haiti, the EPSG code for UTM is either 44132 or 32618. Use the internet or trial and error in R to see which code it is.
  6. Use st_buffer to create a buffer around the health centres locations.
  7. st_union can be used to turn many spatial object into a single spatial object.
  8. Use the same process as in step six but on the admin 2 spatial data frame.
  9. st_difference will calculate the difference between two areas this will give you the regions that are further than 5km from a health facility.
  10. Use tmap to create a map. tm_shape(), tm_polygons(), and tm_dots().

For further help see our solution.

Return to the practical.