get_pt_reports: get_pt_reports - Project Tracker Reports

View source: R/get_pt_reports.r

get_pt_reportsR Documentation

get_pt_reports - Project Tracker Reports

Description

This function accesses the api endpoint for files associated with core reporting requirements that have been uploaded to project tracker. This api endpoint accepts a large number of filters associated with the project or report type. Project specific filters include project code(s), years, lakes, and project lead. Reports can also be filtered by their associated milestone. Valid report types are: "Prj Prop", "Prj Prop Pres", "procvallog", "ProjDescPres", "Prj Desc", "Protocol", "Field Report", "Prj Comp Rep", "Prj Comp Pres", "Sum Rep", and "Creel Estimates" and can be passed in as a single string or as character vector of one or more report types. Use show_filters("reports") to see the full list of available filters. This function returns a data-frame containing attributes of the report, including project code, report type, and the path to the report on the server. It is often used in conjunction with fetch_pt_reports() to actually download the selected reports to a target directory.

Usage

get_pt_reports(filter_list = list(), to_upper = TRUE)

Arguments

filter_list

list

to_upper
  • should the names of the returned dataframe be converted to upper case?

Value

dataframe

Author(s)

Adam Cottrill adam.cottrill@ontario.ca

See Also

fetch_pt_reports()

Examples


reports <- get_pt_reports(list(
  lake = "ON", year__gte = 2017,
  year__lte = 2018
))

reports <- get_pt_reports(list(
  lake = "HU", year__gte = 2018,
  prj_cd__like = "006", report_type = "Protocol"
))

reports <- get_pt_reports(list(lake = "ER", year__gte = 2018))

filters <- list(lake = "SU", prj_cd = c("LSA_IA15_CIN", "LSA_IA17_CIN"))
reports <- get_pt_reports(filters)

reports <- get_pt_reports(list(lake = "HU", year = 2018))

AdamCottrill/glfishr documentation built on Aug. 9, 2024, 5:47 p.m.