NEONScience / NEON-utilities

Utilities and scripts for working with NEON data. Currently: an R package with functions to join (stack) the month-by-site files in downloaded NEON data, to convert data to geoCSV format, and to download data from the API.
GNU Affero General Public License v3.0
57 stars 36 forks source link

Add UTF-8 encoding #54

Closed stephparker closed 5 years ago

stephparker commented 5 years ago

Function loadByProduct

Describe the bug Trying to load algae taxonomy data, special characters in scientificNames and other fields load with many messed up characters. Eric reproduced the issue as well.

To Reproduce alg_allTabs <- loadByProduct(dpID = "DP1.20166.001", site = "all", package = "expanded", check.size = FALSE)) list2env(alg_allTabs,envir=.GlobalEnv) see alg_taxonomyProcessed table

Expected behavior Pull data using loadByProduct or other calls and get text with correctly encoded special characters

System (please complete the following information):

Additional context Eric thinks that if we add encodiing = UTF-8 for the data.table::fread call in stackeddatafiles it might fix the problem.

cklunch commented 5 years ago

Thanks for the heads up! This is now fixed in the rhdf5-suggests branch. @stephparker can you install the branch version and verify this is working? If you haven't installed from a branch before, it's like this:

devtools::install_github("NEONScience/NEON-utilities/neonUtilities", ref="rhdf5-suggests")
stephparker commented 5 years ago

@cklunch I loaded the branch but loadByProduct won't run.

Error in loadByProduct(dpID = "DP1.20166.001", site = "all", package = "expanded", : could not find function "loadByProduct"

cklunch commented 5 years ago

Resolved in neonUtilities v1.3.1.