-
Notifications
You must be signed in to change notification settings - Fork 8
Improved docs for as_epi_df()
#93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi Daniel! @dajmcdon I'd like to get some clarifications: Additional keys are referring to
Thank you! |
So, the metadata is simpler than you're imagining. Here's an example: attr(jhu_csse_county_level_subset, "metadata")
$geo_type
[1] "county"
$time_type
[1] "day"
$as_of
[1] "2022-05-23 14:35:45 PDT" Here's some example data from BC that sort of illustrates 1 and 2 (extra keys, misnamed columns) remotes::install_github("mountainmath/CanCovidData")
bc <- CanCovidData::get_british_columbia_case_data()
bc_dated <- bc %>%
count(`Reported Date`, `Health Authority`, `Age group`, `Sex`, name = "cases")
bc_dated
# A tibble: 49,955 × 5
`Reported Date` `Health Authority` `Age group` Sex cases
<date> <chr> <chr> <chr> <int>
1 2020-01-29 Out of Canada 40-49 M 1
2 2020-02-06 Vancouver Coastal 50-59 F 1
3 2020-02-10 Out of Canada 20-29 F 1
4 2020-02-10 Out of Canada 30-39 M 1
5 2020-02-18 Interior 30-39 F 1
6 2020-02-24 Fraser 30-39 F 1
7 2020-02-24 Fraser 40-49 M 1
8 2020-03-03 Fraser 50-59 M 1
9 2020-03-03 Vancouver Coastal 30-39 F 1
10 2020-03-03 Vancouver Coastal 60-69 F 1
# … with 49,945 more rows On 3, yes. Maybe, do county cases (so that |
@brookslogan Hey Logan! When calling |
The built-in geo guesser does not expect any mixed |
It would be helpful to add some documentation illustrating how to create an
epi_df
with additional keys.tsibble
that has an extra key. Show the meta datageo_value
ortime_value
(or both).covidcast
->epi_df
then add a column that adds a key.Related, are there other types of
additional_metadata
then keys?This could be done in the examples for
as_epi_df()
or in the mainepiprocess
vignette (or both).And just as a flag, note that in the
roxygen
one can use:#' @includeRmd man/rmd/<some-name>.Rmd details
The trailing
details
means to include the Rmd file in the@details
section (this is the default). You could also put it in any other section (e.g.@format
).The text was updated successfully, but these errors were encountered: