bcgov / groundwater-levels-indicator

R scripts for an indicator on long-term trends in groundwater levels in B.C. published on Environmental Reporting BC
Apache License 2.0
19 stars 7 forks source link

Where does obs_wells object come from? #9

Closed tylerlittlefield closed 5 years ago

tylerlittlefield commented 5 years ago

The update-2018 branch fails to pull groundwater level data because the object obs_wells doesn't exist. Sourcing header.R and func.R doesn't create this missing object either. 01_load.R gives:

Error in grepl("OW", wells) : object 'obs_wells' not found

Among others which can probably be traced back to this line:

https://github.com/bcgov/groundwater-levels-indicator/blob/ac76a389573531dc5ca45434132f57f3c497895c/01_load.R#L41

Additionally, the README.md and the repo content are inconsistent:

There are four core scripts that are required for the analysis, they need to be run in order:

01_clean.R 02_analysis.R 03_visualize.R 04_output.R

But the contents of the code are:

01_load.R 02_clean.R 03_analysis.R 03_visualize.R 04_output.R

stephhazlitt commented 5 years ago

Hi @tyluRp, thanks for your comment.

This branch is a work-in-progress, and I am doing some code reorganizing and refactoring in preparation for the Code-With-Us opportunity. I was working on the load & clean scripts yesterday and forgot to push at the end of the day, my apologies! I have fixed the obs_wells object issue, if you pull, the code should run. I will be more careful with my tweaks moving forward, and I'll update the README today.

tylerlittlefield commented 5 years ago

@stephhazlitt Thanks for the quick response! I'll give it a try later today.