Documentation ¶
Overview ¶
Package eaprm contains helper functions for emprical air pollution regression modeling.
Index ¶
Constants ¶
const ( PrimaryPM25 = "PrimaryPM25" PNH4 = "pNH4" PNO3 = "pNO3" PSO4 = "pSO4" SOA = "SOA" )
These are the pollutants accepted in the InMAP SR matrix.
Variables ¶
var Segments = 20
Segments is the number of line segments used to represent a circular buffer. See github.com/ctessum/geom.Point.Buffer for more information.
Functions ¶
func Hour ¶
Hour returns a two dimensional array of 1 or zero values, where the first dimension of the array is of length 24 and corresponds to the hours of the day, and the second dimension of the array is the same length as t. Values in the returned array [i,j] will be 1 if the hour of day in t[j] equals i, and zero otherwise.
func Month ¶
Month returns a two dimensional array of 1 or zero values, where the first dimension of the array is of length 12 and corresponds to the months of the year, and the second dimension of the array is the same length as t. Values in the returned array [i,j] will be 1 if the month in t[j] equals i, and zero otherwise. January is month 0.
func Weekend ¶
Weekend returns an array of 1 or zero values, with 1 values for members of t that are on a weekend (i.e., Saturday or Sunday) and zero otherwise.
func Year ¶
Year returns a two dimensional array of 1 or zero values, where the first dimension of the array is of length (end - start), where start and end are the first and last years considered, and corresponds to the year, and the second dimension of the array is the same length as t. Values in the returned array [i,j] will be 1 if the year in t[j] equals i, and zero otherwise.
Types ¶
type FeatureFunc ¶
FeatureFunc is a class of functions that takes and array of OpenStreetMap features and and array of points to relate them to and returns a relation between all of the features and each of the points.
func Buffer ¶
func Buffer(radius float64) FeatureFunc
Buffer returns a FeatureFunc that sums the count (for point features), length (for linear features), or area (for polygonal features) of a group of features within the given radius (in degrees) of each of the point locations of interest.
func InMAP ¶
func InMAP(r *sr.Reader, pol InMAPPol) FeatureFunc
InMAP returns a FeatureFunc that calculates PM2.5 concentrations at each point of interest caused by ground-level emissions from a group of features, where each feature emits at a rate equal to 1 for point features, the feature length for line features, and the feature area for polygon features.