cont-limno / LAGOSNE

Interface to the LAke multi-scaled GeOSpatial & temporal database :earth_americas:
https://cont-limno.github.io/LAGOSNE/
15 stars 8 forks source link

Loading the exports with tidyverse reads poorly #68

Closed jsta closed 5 years ago

jsta commented 6 years ago

If the exports are downloaded and read into R (outside the LAGOSNE package) with the tidy underscore functions there are excessive NA cells possibly due to incorrect column type detection. Are there special characters responsible for the errors that could be fixed upstream?

jsta commented 6 years ago

Issue is that some fields in the exports are detected as integer even though they contain substantial non-integer values (with decimals). The end result is that about 20-30% of the srp and no2 data, which happens to be decimal, is dropped.

jsta commented 6 years ago

Are there special characters in _epinutr somewhere that is breaking read_csv?

jsta commented 6 years ago

See this script for a method to manually give integers one decimal place so that readr automatically detects as numeric (doubles): https://gist.github.com/jsta/070d9a70eb0850d552daf1856282db73

jsta commented 5 years ago

Confirmed fixed in LAGOSNE limno version 1.087.3 for all definitely numeric epinutr data columns (i.e. not one of censorcode, qual, etc).