ropensci / awardFindR

Scan multiple online grant databases for relevant awards
https://docs.ropensci.org/awardFindR
Other
16 stars 7 forks source link

failure when variables are missing in df #3

Closed adam3smith closed 3 years ago

adam3smith commented 3 years ago

using the included keywords.txt

> data <- awardsBot(keywords = "~/keywords.csv")
Grabbing url: https://securegrants.neh.gov/Open/data/NEH_Grants2020s.csv
(snip)
NOTICE (non-fatal) no NEH results for: ethnographies
Error in data.frame(institution = Institution, pi_name = pi, pi_email = NA,  : 
  object 'AppNumber' not found
mccallc commented 3 years ago

Problem was windows does not use UTF-8 encoding by default with read.csv, messing up variable names. Fixed by explicitly specifying UTF-8 encoding in commit 17632f43540b55a7d1e4cb9e9acffd68cf61df6e