airbaseFindCode: Helper function to find EEA airbase site codes

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Helper function to find airbase site codes

Usage

1
2
3
4
5
6
7
airbaseFindCode(country = c("AL", "AT", "BA", "BE", "BG", "CH", "CY", "CZ",
  "DE", "DK", "EE", "ES", "FI", "FR", "GB", "GR", "HR", "HU", "IE", "IS", "IT",
  "LI", "LT", "LU", "LV", "ME", "MK", "MT", "NL", "NO", "PL", "PT", "RO", "RS",
  "SE", "SI", "SK", "TR"), site.type = c("background", "traffic",
  "industrial", "unknown"), area.type = c("rural", "urban", "suburban",
  "unknown"), local.code = NA, city = NA, site = NA, emep = NA,
  lat = c(-90, 90), lon = c(-180, 180))

Arguments

country

A character or vector of characters representing country code.

site.type

One of “background”, “traffic”, “industrial”, “unknown” representing the type of site.

area.type

The type of area in which the site is located. Can be “rural”, “urban”, “suburban”, “unknown”.

local.code

A character or vector of characters representing the local site code. For example “MY1” is the UK code for Marylebone Road.

city

A city name to search — using character matching (grep). The search string can be upper or lower case e.g. city = "london". To extract several cities e.g. Copenhagen and Barcelona use city = c("copenhagen", "barcelona"). Note that by default any matching characters are returned, so city = "london" would also return Londonderry (Northern Ireland).

Regular expression searches are very powerful and potentially complicated. However there are a few useful tips. To match the beginning of a name use ‘^’. So city = "^london" would return London and Londonderry (both begin with ‘london’). To match the end of a name use ‘$’, so city = "london$" would just return London but not Londonderry.

The cities chosen are printed to screen to make it easy to check (and refine the search string) of the selected sites.

site

The name of the site or sites to search, see city for details of how to search.

emep

Select an EMEP station. Can be “yes”, “no” or NA (the default, selects everything).

lat

The latitude range to select in the form c(lower, upper).

lon

The longitude range to select in the form c(lower, upper).

Details

This function helps to identify airbase site codes based on one or more criteria. The criteria include country code, site type, local site code, city, site name and latitude/longitude ranges.

Value

A vector of airbase site codes that can be used directly in importAirbase.

Author(s)

David Carslaw

See Also

importAirbase, airbaseFindCode, airbaseStats and airbaseInfo

Examples

1
2
3
4
5
6
## select all sites in Denmark
## Not run: sites <- airbaseFindCode(country = "DK")

## traffic sites in Germany and the UK
sites <- airbaseFindCode(country = c("DE", "GB"), site.type = "traffic")
## End(Not run)

davidcarslaw/ggopenair documentation built on May 14, 2019, 10:37 p.m.