mpjashby/crimemapping

Explain the function sequence st_transform() |> st_buffer() |> st_transform()

Closed this issue · 2 comments

At:

You don't need to understand what each of these R functions does – we will cover
them all in a future tutorial.
```{r exercise6, exercise=TRUE, exercise.setup = "exercise5-setup", exercise.lines=13}
# Define the area included in the map, based on a 500m buffer around the data
map_boundary <- homicides %>%
st_bbox() %>%
st_as_sfc() %>%
st_as_sf() %>%
st_transform(26967) %>%
st_buffer(500 * 3.3) %>%
st_transform(4326) %>%

the tutorial tells students this will be explained later, but it doesn't appear to be actually explained anywhere. A possible answer is in this answer to a question on Moodle.

This isn't needed in Week 2 following the transition from ggmap() to ggspatial() for base maps, but I will keep this issue open until the end of term in case it is needed elsewhere.

This hasn't been needed anywhere else in the tutorials, so this can be closed with no further action.