if (FALSE) {
# Search for records using a bounding box of coordinates
b_box <- sf::st_bbox(c(xmin = 143, xmax = 148, ymin = -29, ymax = -28),
crs = sf::st_crs("WGS84"))
galah_call() |>
galah_identify("reptilia") |>
galah_bbox(b_box) |>
atlas_counts()
# Search for records using a bounding box in a `tibble` or `data.frame`
b_box <- tibble::tibble(xmin = 148, ymin = -29, xmax = 143, ymax = -21)
galah_call() |>
galah_identify("reptilia") |>
galah_bbox(b_box) |>
atlas_counts()
# Search for records within the bounding box of an `sf` object
galah_config(email = "your_email_here")
location <-
"POLYGON((143.32 -18.78,145.30 -20.52,141.52 -21.50,143.32 -18.78))" |>
sf::st_as_sfc()
galah_call() |>
galah_identify("vulpes") |>
galah_bbox(location) |>
atlas_occurrences()
# Search for records within the bounding box of a shapefile
galah_config(email = "your_email_here")
location <- sf::st_read("path/to/shapefile.shp")
galah_call() |>
galah_identify("vulpes") |>
galah_bbox(location) |>
atlas_occurrences()
}
Run the code above in your browser using DataLab