epiforecasts / covidregionaldata

An interface to subnational and national level COVID-19 data. For all countries supported, this includes a daily time-series of cases. Wherever available we also provide data on deaths, hospitalisations, and tests. National level data is also supported using a range of data sources as well as linelist data and links to intervention data sets.
https://epiforecasts.io/covidregionaldata/
Other
37 stars 18 forks source link

Vietnam handles province labels badly, possible str_conv issue #447

Closed RichardMN closed 2 years ago

RichardMN commented 2 years ago

Vietnam is crashing the single test and breaking the R-cmd-check for two apparently related reasons.

For some reason str_conv(level_1_region, "ASCII") now fails. Because of how the clean_common function is structured, this failure (which appears to involve a file system call) hits hundreds of thousands of times. Both the class specific workflow and the R-CMD-check are both timing out because this just stops everything.

This appears to also be why tests for #446 are failing.

I am going to rework the clean_common code and see if we can make the adjustments to province names once for each province, and if we can avoid using str_conv. There doesn't appear to be any issue on str_conv itself but I think I'm getting the same issue on my home (MacOS, Monterey, 4.1.2) and the github build.