geomarker-io / appc

Daily, high resolution, near real-time, model-based ambient air pollution exposure assessments in R
http://geomarker.io/appc/
Other
0 stars 0 forks source link

example data set of s2 and dates #21

Closed cole-brokamp closed 8 months ago

cole-brokamp commented 9 months ago

To use for both examples and in tests

create children polygons inside contiguous_us()

randomly sample some

s2::s2_point_on_surface()

aggregate back and then choose random number of dates for each point

make into named list that can be used with examples:

ex_data <- ...
get_merra_data(x = names(ex_data), dates = ex_data)
cole-brokamp commented 9 months ago
d <- list(
  "8841b39a7c46e25f" = as.Date(c("2023-05-18", "2023-11-06")),
  "8841a45555555555" = as.Date(c("2023-06-22", "2023-08-15"))
  )

get_merra_data(x = s2::as_s2_cell(names(d)), dates = d)

make this an object? s2d object? s2dts ?

include method to create from list of starting and ending dates for each s2 geohash?

cole-brokamp commented 9 months ago

just use aqs data from one year?

cole-brokamp commented 8 months ago
purrr::map2(
      as.Date(x$start_date), as.Date(x$end_date),
      \(.s, .e) seq(from = .s, to = .e, by = 1)
    )

as an example of how to convert tibble with start dates and end dates for each s2 cell location