
6. SF & well-known text [REMOVE THIS QUESTION!]

Well-known Text is used to specify the geometry of the shape (states$geometry).
No one got this, so I'm giving you these points back.

7. geocoding

The class example was a bit tricky here. For the reverse-geocode to work, the data tibble should have latitude and longitude only.

You were pretty close. (-5)

```{r}
library(tidyverse)
library(sf)
library(ggspatial)
library(tidygeocoder)

address <- tibble::tribble(
~address,
"3201 Burton Street SE, Grand Rapids, MI, 49546"
)

address_geocoded <- address %>%
  geocode(address, method = 'osm', lat = latitude , long = longitude) %>%
  # Select the lat/long; don't convert to SF.
  select(latitude, longitude)
address_geocoded

reverse <- address_geocoded %>% 
  reverse_geocode(
    lat = latitude, long = longitude, 
    method = 'osm', address = address,
    full_results = TRUE) %>%
  select(address)
reverse
```

8. calvin-hope distance

```{r}
addresses<- tibble (address = c(
       "3201 Burton St SE, Grand Rapids, MI 49546",
       "141 E 12th St, Holland, MI 49423")) %>%
    geocode(address, method = "osm") %>%
    st_as_sf(coords = c("long","lat"))%>%
    st_set_crs(4326)

addresses %>%
   st_distance()%>%
   units:: set_units("miles")
```
