Skip to content

Instantly share code, notes, and snippets.

@Baumchen
Baumchen / incidence_at.js
Last active November 11, 2022 16:18
COVID-19 Inzidenz-Widget für iOS innerhalb Österreichs 🇦🇹
// Lizenz: AGES Dashboard COVID19 AT
// 3-stellige GKZ verwenden (zweite Spalte in https://covid19-dashboard.ages.at/data/CovidFaelle_GKZ.csv).
// Widget Parameter: "204,KFL;312;706" für Klagenfurt Land (angezeigt als KFL), Korneuburg und Landeck
//
// Basiert auf der deutschen Variante von
// - kevinkub https://gist.github.com/kevinkub/46caebfebc7e26be63403a7f0587f664
// - Baumchen https://gist.github.com/Baumchen/6d91df0a4c76c45b15576db0632e4329
//
// Angaben ohne Gewähr.
@Baumchen
Baumchen / incidence.js
Last active February 20, 2021 09:29 — forked from kevinkub/incidence.js
COVID-19 Inzidenz-Widget für iOS innerhalb Deutschlands 🇩🇪
// Licence: Robert Koch-Institut (RKI), dl-de/by-2-0
// Multiple values: Use with `48.260,11.439,DAH;48.809,11.897,KEH;49.122,12.549,LA` as widget parameter e.g.
// Current location can be used with: `current,NAME;48.809,11.897,KEH;49.122,12.549,LA` as widget parameter e.g.
const apiUrl = (location) => `https://services7.arcgis.com/mOBPykOjAyBO2ZKk/arcgis/rest/services/RKI_Landkreisdaten/FeatureServer/0/query?where=1%3D1&outFields=GEN,last_update,cases7_per_100k&geometry=${location.longitude.toFixed(3)}%2C${location.latitude.toFixed(3)}&geometryType=esriGeometryPoint&inSR=4326&spatialRel=esriSpatialRelWithin&returnGeometry=false&outSR=4326&f=json`
function parseLocation(location) {
const fixedCoordinates = location.split(",")
if (fixedCoordinates[0] === "current") {
return {