croaq: Fetch air quality data

Description Usage Arguments Details Value Methods (by generic) Note References See Also

View source: R/croaq.R

Description

Fetch air quality data from state and local networks of measurement stations in Croatia.

Usage

1
2
3
4
5
6
7
croaq(station, item, from, to, type = 0, labels = NULL, fill = TRUE)

## S3 method for class 'croaq'
summary(object, ...)

## S3 method for class 'croaq'
plot(x, ...)

Arguments

station

integer, station code.

item

integer or character, pollutant codes or labels.

from, to

character, start and end date.

type

integer, value datatype.

labels

character, custom item labels.

fill

logical, if TRUE (default) fill data within time range with missing values where no data is available.

object

croaq object.

...

further parameters.

x

croaq object.

Details

Fetches values of one or more items (pollutants, etc.) measured at a single station within time period specified by from and to.

For a list of stations and their codes, run listStations().

Items can be specified using integer codes or (in some cases) short labels, run listPollutants() for a list. Custom labels can be set by labels argument which should be a character vector of the same length as item and have unique values.

There are various datatypes available (raw, validated, hourly, daily, etc.). Run listDatatypes() for a list.

Dates should be specified as character values in 'Y-m-d' format. If fill=TRUE (default), time points with missing values will be added to data where no data is available. If fill = FALSE, missing values are not accounted for in summary and plot methods.

Value

Object of class croaq inheriting from a data frame class with dedicated summary and plot methods.

Summary method invisibly returns total and missing values for each item.

Plot method shows time on x-axis and values on y-axis. Time points with missing values are shown as vertical red lines.

Methods (by generic)

Note

Availability of data depends on selected station, time period and datatype. A note is printed if requested data for some items is not available and if no data at all is available NULL is returned.

References

Data exchange service at http://iszz.azo.hr/iskzl/exc.htm.

See Also

wide


dataspekt/croaq documentation built on May 19, 2019, 12:36 a.m.