search_names: Search database of site names

Description Usage Arguments Value Examples

View source: R/search_names.r

Description

Searches the listing of EA monitoring sites to find rows that contain the string provided. Can search by WBID (WBID), name (name), Management Catchment (MC), Operational Catchment (OC) or River Basin District (RBD). There is a hierarchical relationship between these levels as shown at https://environment.data.gov.uk/catchment-planning/help#help-catchment-hierarchy.

The search is done on a local copy of the waterbody listing contained in the ea_wbids object rather than connecting to the EA site.

Usage

1
search_names(string = NULL, column = NULL)

Arguments

string

The search string to be matched (case-sensitive). Will match whole or partial strings in the column values.

column

The column to be searched. Possible options are WBID, name, OC (Operational Catchment), MC (Management Catchment) and RBD (River Basin District)

Value

A data frame containing the details of all the sites that match the search string (full or partial matches) in the column specified. Columns returned are defined in ea_wbids.

Examples

1
2
3
4
5
# search for sites containing "Tadnoll" in the name
search_names(string="Tadnoll", column="name")

# search for Operational Catchments containing "Cornwall"
search_names(string="Cornwall", column="OC")

cde documentation built on Sept. 4, 2019, 9:02 a.m.