Click or drag to resize

TimeSeriesCalculation Class

Defines how time-series data should be calculated e.g. temperature data, with hourly figures, in Celsius.
Inheritance Hierarchy

Namespace:  DegreeDays.Api.Data
Assembly:  DegreeDays (in DegreeDays.dll) Version: 1.3
Syntax
public abstract class TimeSeriesCalculation

The TimeSeriesCalculation type exposes the following members.

Properties
  NameDescription
Public propertyInterval
Gets the TimeSeriesInterval indicating the interval (e.g. hourly) that the time-series data should be calculated with.
Top
Methods
Remarks

To create a TimeSeriesCalculation object you can use the static factory methods of this class. For example:

TimeSeriesCalculation hourlyTempsCalculation = 
    TimeSeriesCalculation.HourlyTemperature(TemperatureUnit.Celsius);

The remarks for TimeSeriesDataSpec have more on how to actually fetch time-series data with your specified TimeSeriesCalculation.

Why is time-series data "calculated"?

You might wonder why time-series data such as hourly temperature data is "calculated" as opposed to just being returned...

The thing is that real-world weather stations hardly ever report exactly on the hour, every hour. Different stations have different reporting frequencies and schedules, they can change over time (e.g. if a station has its equipment upgraded), and gaps in routine reporting are fairly common too. Higher-quality stations do tend to report at least hourly, but it's rarely exactly on the hour, and it's rarely perfectly regular either. We take whatever data the weather stations do report, and use it to calculate (or interpolate) neat, perfectly-regular time-series data (such as hourly temperature data) with all gaps filled with estimated data (which is marked as such so you can easily identify it).

The end result is neat, regular data that is easy to store and easy to work with, but it actually takes a lot of processing to get it into that format. And this is why time-series data from our system is "calculated" as opposed to just being returned.

This abstract class is not designed to be extended by third-party code, which is why it does not have an accessible constructor.

Thread Safety
All concrete subclasses of this abstract class are immutable. You can safely reuse them and call them from multiple threads at once.
Version History
VersionDescription
1.2 This was added in version 1.2.
See Also