Index geo-coordinates at the given resolution into H3 addresses.

geo_to_h3(latlng, res)

# S3 method for numeric
geo_to_h3(latlng, res = 7)

# S3 method for matrix
geo_to_h3(latlng, res = 7)

# S3 method for data.frame
geo_to_h3(latlng, res = 7)

# S3 method for sf
geo_to_h3(latlng, res = 7)

Arguments

latlng

geo-coordinates as lat/lng pairs or object of class sf

res

resolution between 0 and 15

Value

character vector

Examples

road_safety_greater_manchester[1:3, ] %>% geo_to_h3()
#> [1] "87195186bffffff" "871951b36ffffff" "8719424a9ffffff"