Skip to content
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

get_truth_path builds a wrong file path when querying a local repo #380

Open
cjgb opened this issue Sep 12, 2022 · 0 comments
Open

get_truth_path builds a wrong file path when querying a local repo #380

cjgb opened this issue Sep 12, 2022 · 0 comments

Comments

@cjgb
Copy link

cjgb commented Sep 12, 2022

I am using

truth_cases <- load_truth(
truth_source = "JHU",
target_variable = "inc case",
locations = c("US", state.name),
data_location = "local_hub_repo",
local_repo_path = "../covid19-forecast-hub")

to get cases data from my local hub clone. But the command fails because function get_truth_path is not building the required file path correctly. In fact, it is building

'../covid19-forecast-hub/data-truth/truth-/Incident Cases.csv'

whereas the right location is

'../covid19-forecast-hub/data-truth/truth-Incident Cases.csv'

I tracked down the issue to line 466 in load_truth.R, where it currently reads

file_path <- file.path(repo_path, truth_folder_path, file_name)

but a paste should be used instead (as for the part that downloads the remote repo data).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant