OpenDataVisualizer/Schaad.OpenData.Tests/WeatherTestData.cs
Claudio Schaad 05f4fa78f6 Add live weather layer from MeteoSwiss stations
- New Schaad.OpenData.Weather project: MeteoSwissClient reads the
  10-minute CSV of the five SwissMetNet stations in Thurgau every 10
  minutes (station list once a day) and backfills the last 7 days from
  the yearly file when the cache has less than 6 days
- History kept as JSON per day (60 days); a failing station does not
  stop the others
- API: /api/weather/meta, /stations (current values, 1 h/24 h rain,
  24 h min/max, strongest gust), /stations/{abbr}/history
- Combined map: "Wetter (live)" layer with station badges (temperature,
  24 h rain or wind), wind arrows, rain marker, station panel with
  hourly 7-day chart, overview and municipality context entries
- Docs: docs/datasets/wetter.md, overview in docs/datasets.md,
  CLAUDE.md; Docker and appsettings wiring

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 06:04:15 +01:00

20 lines
671 B
C#

using Schaad.OpenData.Weather.Models;
namespace Schaad.OpenData.Tests;
internal static class WeatherTestData
{
public static readonly DateTimeOffset Now = new(2026, 11, 18, 19, 0, 0, TimeSpan.Zero);
public static WeatherStation Station(string abbr = "GUT", string name = "Güttingen") =>
new(abbr, name, "TG", 440, 47.60, 9.28);
public static WeatherReading Reading(
string abbr,
DateTimeOffset time,
double? temperature = 8.0,
double? precipitation = 0,
double? windGust = 20,
double? windSpeed = 10) =>
new(abbr, time, temperature, 80, precipitation, 0, windSpeed, windGust, 240, 1001);
}