Closed alee closed 3 years ago
{
"dataset": "paleocar",
"variable": "paleocar_precipitation",
"studyArea": {
"type": "Point",
"coordinates": [100, 100]
},
"timeseries": {
"yearRange": [5, 10],
"method": "trailingAverage",
"width": 7
},
"postTransforms": [
{
"method": "z-score"
}
]
}
The postTransforms
key is optional and includes an array of transforms to apply. The one in this example takes the moving average values and computes z-scores using the mean and standard deviation computed from each cell for each selected year in the study area.
{
"yearRange": [8, 10],
"timeseries": [103, 105, 106.4]
}
Note that the length of the array is shortened to deal with the absence of enough previous years to compute the 7 year trailing average.
{
"label": "Study area is too large",
"detailed": "Selected study of 5.3km2 is larger than max area of 5km2",
}
{
"dataset": "paleocar",
"variable": "paleocar_precipitation",
"studyArea": {
"type": "Point",
"coordinates": [100, 100]
},
"timeseries": {
"yearRange": [5, 10],
"method": "runningAverage",
"width": 7
}
}
{
"yearRange": [8, 10],
"timeseries": [103, 105, 106.4]
}
Note that the length of the array is shortened to deal with the absence of enough previous years to compute the 7 year running average.
{
"label": "Study area is too large",
"detailed": "Selected study of 5.3km2 is larger than max area of 5km2",
}
{
"dataset": "paleocar",
"variable": "paleocar_precipitation",
"studyArea": {
"type": "Point",
"coordinates": [100, 100]
},
"timeseries": {
"yearRange": [5, 10],
"method": "smoothingSpline",
"selection": {
"method": "generalizedCrossValidation"
}
}
}
{
"yearRange": [5, 10],
"timeseries": [101, 102.4, 105.2, 103, 105, 106.4]
}
{
"label": "Study area is too large",
"detailed": "Selected study of 5.3km2 is larger than max area of 5km2",
}
{
"dataset": "paleocar",
"variable": "paleocar_precipitation",
"studyArea": {
"type": "Point",
"coordinates": [100, 100]
},
"timeseries": {
"yearRange": [5, 10],
"method": "kernelRegression",
"submethod": "localLinear",
"kernel": "epanechnikov",
"bandwidthSelection": {
"method": "asymptoticMeanIntegratedSquaredError"
}
}
}
or
{
"dataset": "paleocar",
"variable": "paleocar_precipitation",
"studyArea": {
"type": "Point",
"coordinates": [100, 100]
},
"timeseries": {
"yearRange": [5, 10],
"method": "kernelRegression",
"submethod": "localLinear",
"kernel": "epanechnikov",
"bandwidthSelection": {
"method": "manual",
"bandwidth": 2.5
}
}
}
{
"yearRange": [5, 10],
"timeseries": [103, 102.4, 105.2, 103, 105, 106.4]
}
Maybe the selected bandwidth should get returned here too?
{
"label": "Study area is too large",
"detailed": "Selected study of 5.3km2 is larger than max area of 5km2",
}
Here are some sample requests and responses for the time series service. Any thoughts @tmcphillips @bocinsky?
z-score transform options
@cpritcha you should put that comment in #34
also, the good response should have optional label/messages to the user e.g. { "message": { "label": ..., "details": ... }
I think you should rename detailed
to details
or just message
centered running average and trailing running averages have been implemented, z-score fixed interval still pending #34
Issues: