Closed zackarno closed 7 months ago
So, seems the issue is caused in the nested data frames where there was an instance of a column with just a single 0
, causing it to be read as integer
rather than character. We can't convert all to character because that would be painful, especially for nest columns which we want to have as lists. So, what I have done is instead ensure that any numeric columns read in are converted to character, while keeping the rest as is.
I then, for each of the functions, made sure that numeric columns present are explicitly returned as numeric. However, I haven't mapped all columns because the IPC API changes so frequently, I didn't think that would be stable. The release to CRAN is #9.
ipc_get() creating issues where it can't bind percentage columns together as some are read as "numeric" others as "character"...
issue occurs here:
https://github.com/OCHA-DAP/ripc/blob/bccc53c780639f2100cf214365f5741a14055db6/R/ipc_get.R#L65-L70
I'll open a PR which could be considered a hot temporary fix that deals with this specific column issue, but think we could come up with a more robust dealing with column types 2 ideas that would help:
readr::type_convert()