What format is tempest's historical data in API?

What format is tempest’s historical data in API?

Question:

If I visit the tempest API (historical) at say
https://swd.weatherflow.com/swd/rest/stats/device/291045?api_key=...&build=...&token=...etc...

I get a response like this:

{
    "device_id": XXXXXX,
    "type": "device_stats_st",
    "first_ob_day_local": "YYYY-MM-DD",
    "last_ob_day_local": "YYYY-MM-DD",
    "stats_day": [
        [
            "YYYY-MM-DD",
            977.4,
            978.4,
            976.5,
            27.8,
            33.5,
            23,
            58,
            72,
            41,
            22746,
            119657,
            0,
            2,
            10.79,
            0,
            190,
            997,
            0,
            1.2,
            4.91,
            0,
            2,
            3,
            0,
            null,
            751,
            2.7,
            6.19345,
            0.130062,
            12,
            12,
            2,
            1
        ],
        [
            "YYYY-MM-DD",
            985.7,
            988.2,
            978.3,
            27.2,
            33.6,
            21,
            70,
            82,
            54,
            35558,
            115046,
            0,
            3.3,
            10.57,
            0,
            296,
            959,
            0,
            1.6,
            4.85,
            0,
            63,
            3,
            0,
            null,
            1433,
            2.7,
            0,
            0,
            0,
            0,
            0,
            0
        ]
   ]
}

But my question is, what is each number? I see for UDP docs that the data for it is formatted like

Index Field Units
0 Time Epoch Seconds
1 Wind Lull (minimum 3 second sample) m/s
2 Wind Avg (average over report interval) m/s
3 Wind Gust (maximum 3 second sample) m/s
4 Wind Direction Degrees
5 Wind Sample Interval seconds
6 Station Pressure MB
7 Air Temperature C
8 Relative Humidity %
9 Illuminance Lux
10 UV Index
11 Solar Radiation W/m^2
12 Rain amount over previous minute mm
13 Precipitation Type 0 = none, 1 = rain, 2 = hail, 3 = rain + hail (experimental)
14 Lightning Strike Avg Distance km
15 Lightning Strike Count
16 Battery Volts
17 Report Interval Minutes

https://weatherflow.github.io/Tempest/api/udp/v171/

So what is each number in the historical version? Is it each one’s high and low, is it in the same order, etc. See below:

Thanks in advance!

It’s documented in a different location. I’m can say I understand why there are two sources of documentation, but the one below seems to be a “new” version.

TLDR;

Index Parameter Description
0 Pressure (mb)
1 Pressure (high) (mb)
2 Pressure (low) (mb)
3 Temperature (°C)
4 Temperature (high) (°C)
5 Temperature (low) (°C)
6 Humidity (%)
7 Humidity (high) (%)
8 Humidity (low) (%)
9 Lux (lx)
10 Lux (high) (lx)
11 Lux (low) (lx)
12 UV (index)
13 UV (high) (index)
14 UV (low) (index)
15 Solar radiation (W/m²)
16 Solar radiation (high) (W/m²)
17 Solar radiation (low) (W/m²)
18 Wind (average) (m/s)
19 Wind (gust) (m/s)
20 Wind (lull) (m/s)
21 Wind direction (°)
22 Wind interval
23 Strike count
24 Strike average distance (km)
25 Record count
26 Battery
27 Local precipitation accumulation (today) (mm)
28 Local precipitation accumulation (final) (mm)
29 Local precipitation minutes (today)
30 Local precipitation minutes (final)
31 Precipitation type 0 = none, 1 = rain, 2 = hail, 3 = rain + hail (experimental)
32 Precipitation analysis type 0 = none, 1 = Nearcast value with display on, 2 = Nearcast value with display off
2 Likes

Thanks, @mabeatty1978, that fixed the issue. Just wondering, is the

etc. Just the average since it isn’t a high or a low?

Thanks so much, again!

Hi @Best_codes,

I doubt that they are averages.
Simple to confirm though.
What do you see when you look at what is returned compared to your days history?
Let us know what you discover.

cheers Ian :slight_smile:

2 Likes

The API says something like this:

[
            "2023-08-17",
            977.4,
            978.4,
            976.5,
            27.8,
            33.5,
            23,
            58,
            72,
            41,
            22746,
            119657,
            0,
            2,
            10.79,
            0,
            190,
            997,
            0,
            1.2,
            4.91,
            0,
            2,
            3,
            0,
            null,
            751,
            2.7,
            6.19345,
            0.130062,
            12,
            12,
            2,
            1
        ],
        [
            "2023-08-18",
            985.7,
            988.2,
            978.3,
            27.2,
            33.6,
            21,
            70,
            82,
            54,
            35558,
            115046,
            0,
            3.3,
            10.57,
            0,
            296,
            959,
            0,
            1.6,
            4.85,
            0,
            63,
            3,
            0,
            null,
            1433,
            2.7,
            0,
            0,
            0,
            0,
            0,
            0
        ],

But I can’t find where the daily stats are for those days on tempestwx.com.

So, I don’t know…

Hi @Best_codes,
If you do that again but for yesterdays data and supply the link to your station assuming it is public then I can have a look for you.
Cheers Ian :slight_smile:

1 Like

Sorry, @iladyman, my station is not public. :confused:

Here is yesterday’s data from the API:

[
            "2023-12-06",
            792.5,
            793.6,
            791.5,
            9.7,
            16.8,
            3,
            54,
            73,
            35,
            14683,
            64377,
            0,
            0.7,
            2.91,
            0,
            122,
            536,
            0,
            2.2,
            8.29,
            0,
            144,
            3,
            0,
            null,
            1435,
            2.7,
            0.011624,
            0.000244,
            1,
            1,
            1,
            1
        ],
        [
            "2023-12-07",
            793.1,
            794,
            792.4,
            13.9,
            19.8,
            9,
            63,
            80,
            54,
            14899,
            63170,
            0,
            0.7,
            2.86,
            0,
            124,
            526,
            0,
            4.3,
            13.54,
            0,
            175,
            3,
            0,
            null,
            1328,
            2.7,
            0,
            0,
            0,
            0,
            0,
            0
        ]

If you can access the link (if you are an admin or something), it is https://tempestwx.com/station/116095/. I have gone to the history chart for temp:


Historical data for station 116095

But it goes by minute, not daily.

@iladyman @mabeatty1978 Aha! I went to
https://tempestwx.com/history/116095/day/2023/12/6
I see this (after changing my settings to degrees C):

image

[
            "2023-12-06",
            792.5,
            793.6,
            791.5,
            9.7,
            16.8,
            3,
            54,
            73,
            35,
            14683,
            64377,
            0,
            0.7,
            2.91,
            0,
            122,
            536,
            0,
            2.2,
            8.29,
            0,
            144,
            3,
            0,
            null,
            1435,
            2.7,
            0.011624,
            0.000244,
            1,
            1,
            1,
            1
        ]

Which matches the data in the API for high, low, and average. Thanks, everyone, for your help!

1 Like

Nice. Sure wish @wfsupport would link this one into their WeatherFlow Tempest API & Developer Platform page next to the current link to the swagger play around page they point to now for REST.

1 Like

Those are current observations.

1 Like

I think they are the average for the day, actually.

Do you see something specific in the docs that states otherwise?

No, you’re right. Freudian slip. My brain was on the observations/ endpoint, not the stats

1 Like

No problem :smiley: We have it all figured out now, I guess. Thanks, all, for your help!

1 Like