covid19datahub / COVID19

A worldwide epidemiological database for COVID-19 at fine-grained spatial resolution
https://covid19datahub.io
GNU General Public License v3.0
251 stars 93 forks source link

Should google place categories be present in all countries? #190

Closed umbe1987 closed 2 years ago

umbe1987 commented 2 years ago

First of all, many thanks for this neat repository :pray: :pray: :pray:

I just noticed that place categories are not present in some countries (e.g. Germany, Ireland).

# import mobility data from google
google <-
  covid19(
    gmr = TRUE,
    country = "Germany",
    level = 3,
    start = "2020-01-01",
    end = Sys.Date(),
    # current date
    dir = "data"
  )

# convert to data table (w/o copy)
setDT(google)

google_place_categories <- c(
  "retail_and_recreation_percent_change_from_baseline",
  "grocery_and_pharmacy_percent_change_from_baseline",
  "parks_percent_change_from_baseline",
  "transit_stations_percent_change_from_baseline",
  "workplaces_percent_change_from_baseline",
  "residential_percent_change_from_baseline"
)

google_place_categories %in% colnames(google)

The above code results in:

FALSE FALSE FALSE FALSE FALSE FALSE

Is this to be expected? Because they are for many other countries (e.g. Italy, Spain, France).

Thank you!

eguidotti commented 2 years ago

Hi @umbe1987, I just double checked but Google doesn't seem to provide mobility data for Germany at level 3 :( However, level = 2 should work also for Germany and Ireland. If such data will be made available, I'd be happy to add them!

umbe1987 commented 2 years ago

Thank you for your super quick response :wink:.

Hopefully they will make them available anytime soon...

Thank you again for this repo!

umbe1987 commented 2 years ago

Ah, I don't know if it makes much sense, but maybe adding the columns with no data inside would be reasonable, in order to always obtain the same data structure (same column names). But feel free to ignore this comment ;)