Struct darksky::models::Datapoint [] [src]

pub struct Datapoint {
    pub apparent_temperature_max_time: Option<u64>,
    pub apparent_temperature_max: Option<f64>,
    pub apparent_temperature_min_time: Option<u64>,
    pub apparent_temperature_min: Option<f64>,
    pub apparent_temperature: Option<f64>,
    pub cloud_cover_error: Option<f64>,
    pub cloud_cover: Option<f64>,
    pub dew_point_error: Option<f64>,
    pub dew_point: Option<f64>,
    pub humidity_error: Option<f64>,
    pub humidity: Option<f64>,
    pub icon: Option<Icon>,
    pub moon_phase: Option<f64>,
    pub nearest_storm_bearing: Option<f64>,
    pub nearest_storm_distance: Option<f64>,
    pub ozone_error: Option<f64>,
    pub ozone: Option<f64>,
    pub precip_accumulation_error: Option<f64>,
    pub precip_accumulation: Option<f64>,
    pub precip_intensity_error: Option<f64>,
    pub precip_intensity_max_error: Option<f64>,
    pub precip_intensity_max_time: Option<u64>,
    pub precip_intensity_max: Option<f64>,
    pub precip_intensity: Option<f64>,
    pub precip_probability_error: Option<f64>,
    pub precip_probability: Option<f64>,
    pub precip_type: Option<PrecipitationType>,
    pub pressure_error: Option<f64>,
    pub pressure: Option<f64>,
    pub summary: Option<String>,
    pub sunrise_time: Option<u64>,
    pub sunset_time: Option<u64>,
    pub temperature_low: Option<f64>,
    pub temperature_low_time: Option<u64>,
    pub temperature_high: Option<f64>,
    pub temperature_high_time: Option<u64>,
    pub temperature_max_error: Option<f64>,
    pub temperature_max_time: Option<u64>,
    pub temperature_max: Option<f64>,
    pub temperature_min_error: Option<f64>,
    pub temperature_min_time: Option<u64>,
    pub temperature_min: Option<f64>,
    pub temperature_error: Option<f64>,
    pub temperature: Option<f64>,
    pub time: u64,
    pub uv_index: Option<u64>,
    pub uv_index_time: Option<u64>,
    pub visibility_error: Option<f64>,
    pub visibility: Option<f64>,
    pub wind_bearing_error: Option<f64>,
    pub wind_bearing: Option<f64>,
    pub wind_gust: Option<f64>,
    pub wind_gust_time: Option<u64>,
    pub wind_speed_error: Option<f64>,
    pub wind_speed: Option<f64>,
}

A datapoint within a Datablock, where there is usually multiple.

All fields are optional except for time, as some data may not be available for a location at a given point in time.

All of the data oriented fields may have associated error fields, representing the confidence in a prediction or value. An example is [precip_accumulation], which has an associated error field of [precip_accumulation_error]. Those fields represent standard deviations of the value of the associated field. Smaller error values represent greater confidence levels, while larger error values represent less confidence. These fields are omitted where the confidence is not precisely known.

Fields

The unix timestamp representing when the daytime high apparent temperature occurs.

Note: This is only present on the daily block.

The daytime high apparent temperature.

Note: This is only present on the daily block.

The unix timestamp representing when the overnight low apparent temperature occurs.

Note: This is only present on the daily block.

The overnight low apparent temperature.

Note: This is only present on the daily block.

The apparent (or "feels like") temperature in degrees Fahrenheit.

Note: This is not present on daily.

The amount of error possible within the cloud_cover value.

The percentage of sky occluded by clouds.

This value is between 0 and 1, inclusively.

The amount of error possible within the dew_point value.

The dew point in degrees Fahrenheit.

The amount of error possible within the humidity value.

The relative humidity.

This value is between 0 and 1, inclusively.

A machine-readable summary of the datapoint, suitable for selecting an icon to display.

The fractional part of the [lunation number] during the given day.

A value of 0 corresponds to a new moon, 0.25 to a first quarter moon, 0.5 to a full moon, 0.75 to a last quarter moon.

Note: This is only present on the daily block.

The approximate direction of the nearest storm in degrees, with true north at 0 degrees and progressing clockwise.

If nearestStormDistance is 0, then this value will not be present.

Note: This is only present on the currently block.

The approximate distance to the nearest storm in miles.

A storm distance of 0 doesn't necessarily refer to a storm at the requested location, but rather a storm in the vicinity of that location.

Note: This is only present on the currently block.

The amount of error possible within the ozone value.

The columnar density of total atmospheric ozone at the given time in Dobson units.

The amount of error possible within the precip_accumulation value.

The amount of snowfall accumulation expected to occur, in inches.

If no snowfall is expected, this will be None.

Note: This is only present on hourly and daily blocks.

The amount of error possible within the precip_intensity value.

The amount of error possible within the precip_intensity_max value.

The unix timestamp of when precip_intensity_max occurs during a given day.

Note: This is only present on the daily block.

The maximum value of precip_intensity during a given day.

Note: This is only present on the daily block.

The intensity (in inches of liquid water per hour) precipitation occurring at the given time.

This value is conditional on probability (that is, assuming any precipitation occurs at all) for minutely datapoints, and unconditional otherwise.

The amount of error possible within the precip_probability value.

The probably of precipitation occurring.

This value is between 0 and 1, inclusively.

The type of precipitation occurring at a given time.

If precip_intensity is 0, then this field will be None.

Additionally, due to the lack of data in DarkSky sources, historical precip_type values is usually estimated, rather than observed.

The amount of error possible within the pressure value.

The sea-level air pressure in millibars.

A human-readable text summary of the datapoint.

Note: Do not use this for automated icon display purposes, use the icon field instead.

The unix timestamp of when the sun will rise during a given day.

Note: This is only present on the daily block.

The unix timestamp of when the sun will set during a given day.

Note: This is only present on the daily block.

The overnight low temperature.

Note: This is only present on the daily block.

The unix timestamp representing when the overnight low temperature occurs.

Note: This is only present on the daily block.

The daytime high temperature.

Note: This is only present on the daily block.

The unix timestamp representing when the daytime high temperature occurs.

Note: This is only present on the daily block.

The amount of error possible within the temperature_max value.

The unix timestamp representing when the maximum temperature during a given date occurs.

Note: This is only present on the daily block.

The maximum temperature during a given date.

Note: This is only present on the daily block.

The amount of error possible within the temperature_min value.

The unix timestamp representing when the minimum temperature during a given date occurs.

Note: This is only present on the daily block.

The minimum temperature during a given date.

Note: This is only present on the daily block.

The amount of error possible within the temperature value.

The air temperature in degrees Fahrenheit.

The unix timestamp at which the datapoint begins.

minutely datapoints are always aligned to the top of the minute.

hourly datapoints align to the top of the hour.

daily datapoints align to midnight of the day.

All are according to the local timezone.

The UV index.

The unix timestamp of when the maximum uv_index occurs during the given day.

The amount of error possible within the visibility value.

The average visibility in miles, capped at 10 miles.

The amount of error possible within the wind_bearing value.

The direction that the wind is coming from in degrees.

True north is at 0 degrees, progressing clockwise.

If wind_speed is 0, then this value will not be defined.

The wind gust speed in miles per hour.

The amount of time that the wind gust is expected to occur.

The amount of error possible within the wind_speed value.

The wind speed in miles per hour.

Trait Implementations

impl Clone for Datapoint
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Datapoint
[src]

[src]

Formats the value using the given formatter.