项目作者: mkearney

项目描述 :
API Wrapper for COVID Tracking Project
高级语言: R
项目地址: git://github.com/mkearney/covid19.git
创建时间: 2020-03-24T15:42:00Z
项目社区:https://github.com/mkearney/covid19

开源协议:Other

下载


covid19

Lifecycle:
experimental
CRAN
status


An API wrapper for covidtracking.com.

Installation

You can install the from Github with

  1. remotes::install_github("mkearney/covid19")

Endpoints

Endpoint functions calls all follow the convention of
covid19_{endpoint}. Exported functions and examples of output data are
grouped by similar endpoints and included below.

U.S.

  • covid19_us(): Counts (positive, negative, pos_neg
    (positive + negative), hospitalized, death, total) for entire
    the U.S.

    1. covid19_us()
    2. #> # A tibble: 1 x 25
    3. #> date states positive negative pending hospitalized_cu… hospitalized_cu…
    4. #> <date> <int> <int> <int> <int> <int> <int>
    5. #> 1 2021-03-07 56 28756184 74582825 11808 40212 878613
    6. #> # … with 18 more variables: in_icu_currently <int>, in_icu_cumulative <int>,
    7. #> # on_ventilator_currently <int>, on_ventilator_cumulative <int>,
    8. #> # date_checked <dttm>, death <int>, hospitalized <int>,
    9. #> # total_test_results <int>, last_modified <dttm>, recovered <lgl>,
    10. #> # total <int>, pos_neg <int>, death_increase <int>,
    11. #> # hospitalized_increase <int>, negative_increase <int>,
    12. #> # positive_increase <int>, total_test_results_increase <int>, hash <chr>
  • covid19_us_daily(): Counts (positive, negative, pos_neg
    (positive + negative), hospitalized, death, total, states)
    by day

    1. covid19_us_daily()
    2. #> # A tibble: 420 x 25
    3. #> date states positive negative pending hospitalized_cu… hospitalized_cu…
    4. #> <date> <int> <int> <int> <int> <int> <int>
    5. #> 1 2021-03-07 56 28756184 74582825 11808 40212 878613
    6. #> 2 2021-03-06 56 28714654 74450990 11783 41401 877887
    7. #> 3 2021-03-05 56 28654639 74307155 12213 42541 877384
    8. #> 4 2021-03-04 56 28585852 74035238 12405 44172 874603
    9. #> 5 2021-03-03 56 28520365 73857281 11778 45462 873073
    10. #> 6 2021-03-02 56 28453529 73590280 11196 46388 870901
    11. #> 7 2021-03-01 56 28399281 73334501 11748 46738 869030
    12. #> 8 2021-02-28 56 28351189 73216424 11708 47352 868006
    13. #> 9 2021-02-27 56 28296840 73012825 11731 48871 867127
    14. #> 10 2021-02-26 56 28225595 72807735 11945 51112 865699
    15. #> # … with 410 more rows, and 18 more variables: in_icu_currently <int>,
    16. #> # in_icu_cumulative <int>, on_ventilator_currently <int>,
    17. #> # on_ventilator_cumulative <int>, date_checked <dttm>, death <int>,
    18. #> # hospitalized <int>, total_test_results <int>, last_modified <dttm>,
    19. #> # recovered <lgl>, total <int>, pos_neg <int>, death_increase <int>,
    20. #> # hospitalized_increase <int>, negative_increase <int>,
    21. #> # positive_increase <int>, total_test_results_increase <int>, hash <chr>

States

  • covid19_states(): Counts (positive, negative,
    hospitalized, death, pending, total) and grades
    (positive_score, negative_score, grade, score) by state

    1. covid19_states()
    2. #> # A tibble: 56 x 56
    3. #> date state positive probable_cases negative pending total_test_resu…
    4. #> <date> <chr> <int> <int> <int> <int> <chr>
    5. #> 1 2021-03-07 AK 56886 NA NA NA totalTestsViral
    6. #> 2 2021-03-07 AL 499819 107742 1931711 NA totalTestsPeopl…
    7. #> 3 2021-03-07 AR 324818 69092 2480716 NA totalTestsViral
    8. #> 4 2021-03-07 AS 0 NA 2140 NA totalTestsViral
    9. #> 5 2021-03-07 AZ 826454 56519 3073010 NA totalTestsViral
    10. #> 6 2021-03-07 CA 3501394 NA NA NA totalTestsViral
    11. #> 7 2021-03-07 CO 436602 24786 2199458 NA totalTestEncoun…
    12. #> 8 2021-03-07 CT 285330 19621 NA NA totalTestsViral
    13. #> 9 2021-03-07 DC 41419 NA NA NA totalTestEncoun…
    14. #> 10 2021-03-07 DE 88354 4733 545070 NA totalTestEncoun…
    15. #> # … with 46 more rows, and 49 more variables: total_test_results <int>,
    16. #> # hospitalized_currently <int>, hospitalized_cumulative <int>,
    17. #> # in_icu_currently <int>, in_icu_cumulative <int>,
    18. #> # on_ventilator_currently <int>, on_ventilator_cumulative <int>,
    19. #> # recovered <int>, last_update_et <chr>, date_modified <chr>,
    20. #> # check_time_et <chr>, death <int>, hospitalized <int>,
    21. #> # hospitalized_discharged <int>, date_checked <chr>, total_tests_viral <int>,
    22. #> # positive_tests_viral <int>, negative_tests_viral <int>,
    23. #> # positive_cases_viral <int>, death_confirmed <int>, death_probable <int>,
    24. #> # total_test_encounters_viral <int>, total_tests_people_viral <int>,
    25. #> # total_tests_antibody <int>, positive_tests_antibody <int>,
    26. #> # negative_tests_antibody <int>, total_tests_people_antibody <int>,
    27. #> # positive_tests_people_antibody <int>, negative_tests_people_antibody <int>,
    28. #> # total_tests_people_antigen <int>, positive_tests_people_antigen <int>,
    29. #> # total_tests_antigen <int>, positive_tests_antigen <int>, fips <chr>,
    30. #> # positive_increase <int>, negative_increase <int>, total <int>,
    31. #> # total_test_results_increase <int>, pos_neg <int>, data_quality_grade <lgl>,
    32. #> # death_increase <int>, hospitalized_increase <int>, hash <chr>,
    33. #> # commercial_score <int>, negative_regular_score <int>, negative_score <int>,
    34. #> # positive_score <int>, score <int>, grade <chr>
  • covid19_states_daily(): Counts (positive, negative,
    pos_neg (positive + negative), hospitalized, death, total)
    by day

    1. covid19_states_daily()
    2. #> # A tibble: 20,780 x 56
    3. #> date state positive probable_cases negative pending total_test_resu…
    4. #> <date> <chr> <int> <int> <int> <int> <chr>
    5. #> 1 2021-03-07 AK 56886 NA NA NA totalTestsViral
    6. #> 2 2021-03-07 AL 499819 107742 1931711 NA totalTestsPeopl…
    7. #> 3 2021-03-07 AR 324818 69092 2480716 NA totalTestsViral
    8. #> 4 2021-03-07 AS 0 NA 2140 NA totalTestsViral
    9. #> 5 2021-03-07 AZ 826454 56519 3073010 NA totalTestsViral
    10. #> 6 2021-03-07 CA 3501394 NA NA NA totalTestsViral
    11. #> 7 2021-03-07 CO 436602 24786 2199458 NA totalTestEncoun…
    12. #> 8 2021-03-07 CT 285330 19621 NA NA totalTestsViral
    13. #> 9 2021-03-07 DC 41419 NA NA NA totalTestEncoun…
    14. #> 10 2021-03-07 DE 88354 4733 545070 NA totalTestEncoun…
    15. #> # … with 20,770 more rows, and 49 more variables: total_test_results <int>,
    16. #> # hospitalized_currently <int>, hospitalized_cumulative <int>,
    17. #> # in_icu_currently <int>, in_icu_cumulative <int>,
    18. #> # on_ventilator_currently <int>, on_ventilator_cumulative <int>,
    19. #> # recovered <int>, last_update_et <chr>, date_modified <chr>,
    20. #> # check_time_et <chr>, death <int>, hospitalized <int>,
    21. #> # hospitalized_discharged <int>, date_checked <chr>, total_tests_viral <int>,
    22. #> # positive_tests_viral <int>, negative_tests_viral <int>,
    23. #> # positive_cases_viral <int>, death_confirmed <int>, death_probable <int>,
    24. #> # total_test_encounters_viral <int>, total_tests_people_viral <int>,
    25. #> # total_tests_antibody <int>, positive_tests_antibody <int>,
    26. #> # negative_tests_antibody <int>, total_tests_people_antibody <int>,
    27. #> # positive_tests_people_antibody <int>, negative_tests_people_antibody <int>,
    28. #> # total_tests_people_antigen <int>, positive_tests_people_antigen <int>,
    29. #> # total_tests_antigen <int>, positive_tests_antigen <int>, fips <chr>,
    30. #> # positive_increase <int>, negative_increase <int>, total <int>,
    31. #> # total_test_results_increase <int>, pos_neg <int>, data_quality_grade <lgl>,
    32. #> # death_increase <int>, hospitalized_increase <int>, hash <chr>,
    33. #> # commercial_score <int>, negative_regular_score <int>, negative_score <int>,
    34. #> # positive_score <int>, score <int>, grade <chr>
  • covid19_states_info(): State government links, Twitter
    accounts, notes, etc.

    1. covid19_states_info()
    2. #> # A tibble: 56 x 16
    3. #> state notes covid19site covid19site_sec… covid19site_ter… covid19site_qua…
    4. #> <chr> <chr> <chr> <chr> <chr> <chr>
    5. #> 1 AK "Ala… http://dhs… https://experie… https://alaska-… https://service…
    6. #> 2 AL "Ala… https://al… https://alpubli… https://service… <NA>
    7. #> 3 AR "Ark… https://ww… https://experie… https://adem.ma… https://adem.ma…
    8. #> 4 AS "Ame… https://ww… https://www.fac… <NA> <NA>
    9. #> 5 AZ "Ari… https://ww… https://tableau… https://tableau… https://tableau…
    10. #> 6 CA "On … https://up… https://public.… https://public.… <NA>
    11. #> 7 CO "The… https://pu… https://public.… https://service… https://service…
    12. #> 8 CT "Neg… https://da… https://data.ct… https://data.ct… <NA>
    13. #> 9 DC "On … https://co… https://coronav… https://microst… <NA>
    14. #> 10 DE "On … https://my… https://myhealt… <NA> <NA>
    15. #> # … with 46 more rows, and 10 more variables: covid19site_quinary <chr>,
    16. #> # twitter <chr>, covid19site_old <chr>,
    17. #> # covid_tracking_project_preferred_total_test_units <chr>,
    18. #> # covid_tracking_project_preferred_total_test_field <chr>,
    19. #> # total_test_results_field <chr>, pui <chr>, pum <lgl>, name <chr>,
    20. #> # fips <chr>

Counties

  • covid19_counties(): County-level links for government sites,
    Twitter accounts, etc.

    1. covid19_counties()
    2. #> # A tibble: 0 x 0

Other

  • covid19_urls(): Links to official state government sites

    1. covid19_urls()
    2. #> # A tibble: 0 x 0
  • covid19_press(): Information (title, url, publication,
    author, etc.) about publications

    1. covid19_press()
    2. #> # A tibble: 0 x 0
  • covid19_screenshots(): Information and paths to screenshots of
    original data sources

    1. covid19_screenshots()
    2. #> # A tibble: 0 x 0