Skip to content
Snippets Groups Projects
Commit 895a592f authored by Ben Anderson's avatar Ben Anderson
Browse files

added example drake retrieval

parent 38ab3566
Branches
Tags
No related merge requests found
......@@ -66,7 +66,7 @@ startTime <- proc.time()
# Set the drake plan ----
# Clearly this will fail if you do not have internet access...
plan <- drake::drake_plan(
esoData = getData(urlToGet, update), # returns data as data.table. If you edit update in any way it will reload - drake is watching you!
esoData = getData(urlToGet, update), # returns data as data.table. If you edit 'update' in any way it will reload - drake is watching you!
skimTable = skimr::skim(esoData), # create a data description table
gWPlot = makeGWPlot(esoData) # make a plot
)
......@@ -80,6 +80,10 @@ make(plan) # run the plan, re-loading data if needed
# drake can't seem to track the .rmd file if it is not explicitly named
makeReport(rmdFile)
# Just to show we can bring spirits back from the deep (i.e. from wherever drake hid them)
dt <- drake::readd(esoData)
message("Data covers ", min(dt$rDateTime), " to ", max(dt$rDateTime))
# Finish off ----
t <- proc.time() - startTime # how long did it take?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment