ASP.NET Core 10 API and React client that visualize the canton of Thurgau's hourly traffic counts by vehicle class (data.tg.ch, CC0). - Background refresh from data.tg.ch every 6 h into a per-day JSON cache, so history grows beyond the source's two-week window - Road geometry per station direction from swisstopo swissTLM3D, oriented by geocoding the direction's target town; roundabout arms follow the road outward only - Leaflet map with canvas animation: dots drive along the road in both directions, density by hourly count, colour by vehicle class, right-hand traffic; play/pause, time slider and day selection - Station panel with per-class counts and Chart.js charts (hourly, weekday/weekend profile, daily totals, class mix) - swisstopo base map switcher (grey, colour, aerial) - Dockerfile and docker-compose with a data volume - xUnit tests for mapping, cache, geometry, geocoding and analysis Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
63 lines
1.5 KiB
C#
63 lines
1.5 KiB
C#
using System.Text.Json.Serialization;
|
|
|
|
namespace Schaad.OpenData.Traffic.Source;
|
|
|
|
public sealed class ThurgauTrafficRecord
|
|
{
|
|
[JsonPropertyName("code")]
|
|
public int Code { get; init; }
|
|
|
|
[JsonPropertyName("name")]
|
|
public string? Name { get; init; }
|
|
|
|
[JsonPropertyName("gemeinde")]
|
|
public string? Municipality { get; init; }
|
|
|
|
[JsonPropertyName("adresse")]
|
|
public string? Address { get; init; }
|
|
|
|
[JsonPropertyName("strasse")]
|
|
public string? Road { get; init; }
|
|
|
|
[JsonPropertyName("richtung")]
|
|
public string? Direction { get; init; }
|
|
|
|
[JsonPropertyName("datum")]
|
|
public string? Date { get; init; }
|
|
|
|
[JsonPropertyName("stunde")]
|
|
public int Hour { get; init; }
|
|
|
|
[JsonPropertyName("bus")]
|
|
public int? Bus { get; init; }
|
|
|
|
[JsonPropertyName("mr")]
|
|
public int? Motorcycle { get; init; }
|
|
|
|
[JsonPropertyName("pw")]
|
|
public int? Car { get; init; }
|
|
|
|
[JsonPropertyName("pw0")]
|
|
public int? CarWithTrailer { get; init; }
|
|
|
|
[JsonPropertyName("lief")]
|
|
public int? Van { get; init; }
|
|
|
|
[JsonPropertyName("lief0")]
|
|
public int? VanWithTrailer { get; init; }
|
|
|
|
[JsonPropertyName("lief_aufl")]
|
|
public int? VanWithSemiTrailer { get; init; }
|
|
|
|
[JsonPropertyName("lw")]
|
|
public int? Truck { get; init; }
|
|
|
|
[JsonPropertyName("lw0")]
|
|
public int? TruckWithTrailer { get; init; }
|
|
|
|
[JsonPropertyName("sattelzug")]
|
|
public int? SemiTrailerTruck { get; init; }
|
|
|
|
[JsonPropertyName("koordinaten")]
|
|
public ThurgauCoordinates? Coordinates { get; init; }
|
|
}
|