Learn R Programming

covid19mobility

The goal of covid19mobility is to make mobility data from different sources available using the Covid19R Project Data Format Standard. Currently, this package imports data from:

Installation

You can install the current version of covid19mobility from github with:

remotes::install_github("covid19r/covid19mobility")

Data Format

The covid19mobility library follows the Covid19R Project Data Format Standard, with some data sets holding extra data columns. To see what data is available, use get_info_covid19mobility()

library(covid19mobility)

get_info_covid19mobility() %>%
  dplyr::select(data_set_name, function_to_get_data, data_details) %>%
  knitr::kable()
data_set_namefunction_to_get_datadata_details
covid19mobility_apple_countryrefresh_covid19mobility_apple_countryData reflects relative volume of directions requests compared to a baseline volume on January 13th, 2020 for multiple transportation modes aggregated at the country level.
covid19mobility_apple_subregionrefresh_covid19mobility_apple_subregionData reflects relative volume of directions requests compared to a baseline volume on January 13th, 2020 for multiple transportation modes aggregated at the subregion (state) level.
covid19mobility_apple_cityrefresh_covid19mobility_apple_cityData reflects relative volume of directions requests compared to a baseline volume on January 13th, 2020 for multiple transportation modes aggregated at the city level.
covid19mobility_google_countryrefresh_covid19mobility_google_countryChanges for each day are compared to a baseline value for that day of the week as compared to the 5-week period Jan 3-Feb 6, 2020 for visits to places falling in to certain categories.
covid19mobility_google_subregionsrefresh_covid19mobility_google_subregionsChanges for each day are compared to a baseline value for that day of the week as compared to the 5-week period Jan 3-Feb 6, 2020 for visits to places falling in to certain categories. Data is aggregated at the state or subdivision level.
covid19mobility_google_us_countiesrefresh_covid19mobility_google_us_countiesChanges for each day are compared to a baseline value for that day of the week as compared to the 5-week period Jan 3-Feb 6, 2020 for visits to places falling in to certain categories. Data is aggregated at the county level for the USA only.

The refresh methods bring in the different data sets. Currently available are: * refresh_covid19mobility_apple_country() - Apple Mobility Data at the country level.
* refresh_covid19mobility_subregion() - Apple Mobility Data at the state/subregion level.
* refresh_covid19mobility_apple_city() - Apple Mobility Data at the city level. Contains some lat/longs for some cities.
* refresh_covid19mobility_google_country() - Google Mobility Data at the country level.
* refresh_covid19mobility_google_subregions() - Google Mobility Data at the state/subregion level.
* refresh_covid19mobility_google_us_counties() - Google Mobility Data at the US county level with FIPS codes.

For example

refresh_covid19mobility_google_us_counties() %>%
  head()
#>   |                                                                              |                                                                      |   0%  |                                                                              |======                                                                |   8%  |                                                                              |============                                                          |  17%  |                                                                              |=============                                                         |  19%  |                                                                              |===================                                                   |  27%  |                                                                              |========================                                              |  34%  |                                                                              |==============================                                        |  42%  |                                                                              |====================================                                  |  51%  |                                                                              |=======================================                               |  55%  |                                                                              |=============================================                         |  64%  |                                                                              |================================================                      |  68%  |                                                                              |======================================================                |  77%  |                                                                              |============================================================          |  85%  |                                                                              |===============================================================       |  89%  |                                                                              |===================================================================== |  98%  |                                                                              |======================================================================| 100%
#>   |                                                                              |                                                                      |   0%  |                                                                              |=                                                                     |   2%  |                                                                              |===                                                                   |   4%  |                                                                              |====                                                                  |   6%  |                                                                              |=====                                                                 |   7%  |                                                                              |======                                                                |   9%  |                                                                              |========                                                              |  11%  |                                                                              |========                                                              |  12%  |                                                                              |==========                                                            |  14%  |                                                                              |==========                                                            |  15%  |                                                                              |============                                                          |  17%  |                                                                              |=============                                                         |  19%  |                                                                              |==============                                                        |  20%  |                                                                              |===============                                                       |  21%  |                                                                              |================                                                      |  22%  |                                                                              |=================                                                     |  24%  |                                                                              |==================                                                    |  26%  |                                                                              |===================                                                   |  27%  |                                                                              |====================                                                  |  29%  |                                                                              |=====================                                                 |  30%  |                                                                              |======================                                                |  32%  |                                                                              |========================                                              |  34%  |                                                                              |========================                                              |  35%  |                                                                              |==========================                                            |  37%  |                                                                              |==========================                                            |  38%  |                                                                              |============================                                          |  39%  |                                                                              |=============================                                         |  41%  |                                                                              |==============================                                        |  42%  |                                                                              |===============================                                       |  44%  |                                                                              |================================                                      |  45%  |                                                                              |=================================                                     |  47%  |                                                                              |==================================                                    |  49%  |                                                                              |===================================                                   |  50%  |                                                                              |====================================                                  |  52%  |                                                                              |=====================================                                 |  53%  |                                                                              |======================================                                |  54%  |                                                                              |=======================================                               |  56%  |                                                                              |========================================                              |  57%  |                                                                              |=========================================                             |  59%  |                                                                              |==========================================                            |  60%  |                                                                              |===========================================                           |  62%  |                                                                              |=============================================                         |  64%  |                                                                              |=============================================                         |  65%  |                                                                              |===============================================                       |  67%  |                                                                              |===============================================                       |  68%  |                                                                              |=================================================                     |  70%  |                                                                              |==================================================                    |  71%  |                                                                              |===================================================                   |  72%  |                                                                              |====================================================                  |  74%  |                                                                              |=====================================================                 |  75%  |                                                                              |======================================================                |  77%  |                                                                              |=======================================================               |  79%  |                                                                              |========================================================              |  80%  |                                                                              |=========================================================             |  82%  |                                                                              |==========================================================            |  83%  |                                                                              |===========================================================           |  85%  |                                                                              |=============================================================         |  87%  |                                                                              |=============================================================         |  88%  |                                                                              |===============================================================       |  89%  |                                                                              |===============================================================       |  90%  |                                                                              |=================================================================     |  92%  |                                                                              |==================================================================    |  94%  |                                                                              |===================================================================   |  95%  |                                                                              |====================================================================  |  97%  |                                                                              |===================================================================== |  98%  |                                                                              |======================================================================| 100%
#> # A tibble: 6 x 7
#>   date       location location_type location_code location_code_t… data_type
#>   <date>     <chr>    <chr>         <chr>         <chr>            <chr>    
#> 1 2020-02-15 Autauga… county        01001         fips_code        retail_a…
#> 2 2020-02-15 Autauga… county        01001         fips_code        grocery_…
#> 3 2020-02-15 Autauga… county        01001         fips_code        parks_pe…
#> 4 2020-02-15 Autauga… county        01001         fips_code        transit_…
#> 5 2020-02-15 Autauga… county        01001         fips_code        workplac…
#> 6 2020-02-15 Autauga… county        01001         fips_code        resident…
#> # … with 1 more variable: value <int>

Data Use and Licensing

Please see the relevant information about each data set and their licenses if you plan on using these data in any published works.

Copy Link

Version

Install

install.packages('covid19mobility')

Monthly Downloads

5

Version

0.1.1

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Jarrett Byrnes

Last Published

July 20th, 2020

Functions in covid19mobility (0.1.1)

refresh_covid19mobility_google_country

Get Google Mobility Data at the Country Level
refresh_covid19mobility_google_us_counties

Get Google Mobility Data for US States
refresh_covid19mobility_apple_country

Refresh The Apple Covid-19 Mobility Data for Countries
%>%

Pipe operator
get_info_covid19mobility

Get information about the datasets provided by covid19mobility
refresh_covid19mobility_apple_city

Refresh The Apple Covid-19 Mobility Data for Cities
refresh_covid19mobility_apple_subregion

Refresh The Apple Covid-19 Mobility Data for Subregions
refresh_covid19mobility_google_subregions

Get Google Mobility Data at the State of Subdivision Level
covid19mobility_apple_country_demo

Demo Data of the Apple Covid-19 Mobility Data for Countries
covid19mobility_google_country_demo

Demo Data of the Apple Covid-19 Mobility Data for Countries