Weather Station / ECOWITT / DNT
0

Configure Feed

Select the types of activity you want to include in your feed.

at master 1.8 kB View raw
1export interface ThresholdItem { 2 date: string; // YYYY-MM-DD 3 value: number; // numeric value for the date (°C or mm depending on context) 4} 5 6export interface ThresholdList { 7 count: number; 8 items: ThresholdItem[]; 9} 10 11export interface TemperatureStats { 12 max: number | null; 13 maxDate: string | null; // YYYY-MM-DD 14 min: number | null; 15 minDate: string | null; // YYYY-MM-DD 16 avg: number | null; // average temperature over the period 17 over35: ThresholdList; // days with max temp > 35°C 18 over30: ThresholdList; // days with max temp > 30°C 19 over25: ThresholdList; // days with max temp > 25°C 20 over20: ThresholdList; // days with max temp > 20°C 21 under0: ThresholdList; // days with min temp < 0°C 22 under10: ThresholdList; // days with min temp <= -10°C 23} 24 25export interface PrecipitationStats { 26 total: number | null; // sum of daily totals over the period (mm) 27 maxDay: number | null; // maximum daily total in the period (mm) 28 maxDayDate: string | null; // YYYY-MM-DD 29 over20mm: ThresholdList; // days with daily total >= 20 mm 30 over30mm: ThresholdList; // days with daily total >= 30 mm 31} 32 33export interface WindStats { 34 max: number | null; // maximum daily peak wind (km/h) 35 maxDate: string | null; // YYYY-MM-DD 36 gustMax: number | null; // maximum daily peak gust (km/h) 37 gustMaxDate: string | null; // YYYY-MM-DD 38 avg: number | null; // average of daily mean wind (km/h) 39} 40 41export interface MonthStats { 42 year: number; 43 month: number; // 1-12 44 temperature: TemperatureStats; 45 precipitation: PrecipitationStats; 46 wind: WindStats; 47} 48 49export interface YearStats { 50 year: number; 51 temperature: TemperatureStats; 52 precipitation: PrecipitationStats; 53 wind: WindStats; 54 months: MonthStats[]; 55} 56 57export interface StatisticsPayload { 58 updatedAt: string; // ISO timestamp 59 years: YearStats[]; 60}