SYNOPSIS
my $service = OpenGbg->new->air_quality;
my $response = $service->get_latest_measurement;
my $measurement = $response->measurement;
printf '%5.2f %s' => $measurement->temperature, $measurement->temperature_unit;
WEATHER ATTRIBUTES
All of these attribues are decimal numbers.
For all weather attributes there is also a unit attribute (${attribute_name}_unit
) that returns a textual representation the unit.
temperature
The temperature (in degrees centigrade) during the measurement.
humidity
The humidity (in percent) during the measurement.
solar_insolation
The solar insolation (in Watts/square metre) during the measurement.
air_pressure
The air pressure (in hPa) during the measurement.
wind_speed
The wind speed (in metres/second) during the mesaurement.
wind_direction
The wind direction (in degrees) during the measurement.
rainfall
The rainfall (in mm) during the measurement.
AIR QUALITY ATTRIBUTES
All of these attribues are normally decimal numbers. Empty string or undef denotes missing information.
The unit for these attributes is microgram/cubic metre.
All air quality attributes also have these additional attributes:
${attribute_name}_unit
returns a textual representation the unit the value is given in.
${attribute_name}_index
returns a decimal number indicating the polution level for that particular attribute.
${attribute_name}_levels
is like the *_index
attribute, but in text. Values are low levels
, medium levels
, high levels
, very high levels
). Empty string/undef if the index is the empty string/undef.
Note: The web service sometimes returns negative values for some of these measurements.
total_index
The overall Air Quality Index. Calculated from some of the other indices.
co
The amount of carbon monoxide in the air.
o3
The amount of ground level ozone in the air.
no2
The amount of nitrogen dioxide in the air.
nox
The amount of nitrogen oxides in the air.
pm2_5
The amount of particulates (less than 2.5 micrometers) in the air.
pm10
The amount of particulates (less than 10 micrometers) in the air.
so2
The amount of sulfur dioxide in the air.
METHODS
to_text()
Returns a string with the station data in a table.
NAME
OpenGbg::Service::AirQuality::Measurement - An air quality measurement
VERSION
Version 0.1404, released 2018-05-19.
SOURCE
https://github.com/Csson/p5-OpenGbg
HOMEPAGE
https://metacpan.org/release/OpenGbg
AUTHOR
Erik Carlsson <info@code301.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2016 by Erik Carlsson.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.