// Variables used by Scriptable. | |
// These must be at the very top of the file. Do not edit. | |
// icon-color: deep-brown; icon-glyph: magic; | |
// LICENCE: Robert Koch-Institut (RKI), dl-de/by-2-0 | |
// Basic Idea and Code Snippets | |
// FROM AUTHOR: kevinkub https://gist.github.com/kevinkub/46caebfebc7e26be63403a7f0587f664 | |
// AND FROM AUTHOR: rphl https://gist.github.com/rphl/0491c5f9cb345bf831248732374c4ef5 | |
// Author: tzschies https://gist.github.com/tzschies/be551cc6939e7c1469c2e8407edab517 | |
/** | |
* Set Widgetparameter: AREA,LAT,LONG,NAME | |
* | |
* Examples: | |
* | |
* Show fix district (Landkreis): 0,51.1244,6.7353 | |
* Show fix state (Bundesland): 1,51.1244,6.7353 (inser some coordinates of a city of the state) | |
* Show Germany: 2 | |
* Show local district (Landkreis): 0 (OR EMPTY) | |
* Show local state (Bundesland): 1 | |
* | |
*/ | |
/*************************************************************************** | |
* | |
* Defining Colors | |
* | |
***************************************************************************/ | |
// set to false for white background in dark mode | |
// set to true for gray background in dark mode | |
const ENABLE_SMOOTH_DARK_MODE = false; | |
const backgroundColor = new Color('f0f0f0') | |
const colorCases = new Color('fe0000 ') | |
const colorHealthy = new Color('008800') | |
const colorDeahts = new Color('202020') | |
/* alternative colors if smooth dark mode is enabled */ | |
const altBackgroundColor = new Color('252525') | |
const altColorCases = new Color('fe0000') | |
const altColorHealthy = new Color('00aa00') | |
const altColorDeaths = new Color('f0f0f0') | |
/*************************************************************************** | |
* | |
* API URLs | |
* | |
***************************************************************************/ | |
const outputFields = 'GEN,RS,EWZ,EWZ_BL,BL_ID,cases,cases_per_100k,cases7_per_100k,cases7_bl_per_100k,last_update,BL'; | |
const apiUrl = (location) => `https://services7.arcgis.com/mOBPykOjAyBO2ZKk/arcgis/rest/services/RKI_Landkreisdaten/FeatureServer/0/query?where=1%3D1&outFields=${outputFields}&geometry=${location.longitude.toFixed(3)}%2C${location.latitude.toFixed(3)}&geometryType=esriGeometryPoint&inSR=4326&spatialRel=esriSpatialRelWithin&returnGeometry=false&outSR=4326&f=json` | |
const outputFieldsStates = 'Fallzahl,LAN_ew_GEN,cases7_bl_per_100k'; | |
const apiUrlStates = `https://services7.arcgis.com/mOBPykOjAyBO2ZKk/arcgis/rest/services/Coronaf%E4lle_in_den_Bundesl%E4ndern/FeatureServer/0/query?where=1%3D1&outFields=${outputFieldsStates}&returnGeometry=false&outSR=4326&f=json` | |
const apiUrlCasesLK = (GetLandkreis) => `https://services7.arcgis.com/mOBPykOjAyBO2ZKk/arcgis/rest/services/RKI_COVID19/FeatureServer/0/query?where=NeuerFall+IN%281%2C0%29${GetLandkreis}&objectIds=&time=&resultType=standard&outFields=AnzahlFall&returnIdsOnly=false&returnUniqueIdsOnly=false&returnCountOnly=false&returnDistinctValues=false&cacheHint=false&orderByFields=&outStatistics=%5B%7B%22statisticType%22%3A%22sum%22%2C%22onStatisticField%22%3A%22AnzahlFall%22%2C%22outStatisticFieldName%22%3A%22value%22%7D%5D%0D%0A&having=&resultOffset=&resultRecordCount=&sqlFormat=none&f=pjson&token=` | |
const apiUrlNewCasesLK = (GetLandkreis) => `https://services7.arcgis.com/mOBPykOjAyBO2ZKk/arcgis/rest/services/RKI_COVID19/FeatureServer/0/query?where=NeuerFall+IN%281%2C-1%29${GetLandkreis}&objectIds=&time=&resultType=standard&outFields=AnzahlFall&returnIdsOnly=false&returnUniqueIdsOnly=false&returnCountOnly=false&returnDistinctValues=false&cacheHint=false&orderByFields=&outStatistics=%5B%7B%22statisticType%22%3A%22sum%22%2C%22onStatisticField%22%3A%22AnzahlFall%22%2C%22outStatisticFieldName%22%3A%22value%22%7D%5D%0D%0A&having=&resultOffset=&resultRecordCount=&sqlFormat=none&f=pjson&token=` | |
const apiUrlHealthyLK = (GetLandkreis) => `https://services7.arcgis.com/mOBPykOjAyBO2ZKk/arcgis/rest/services/RKI_COVID19/FeatureServer/0/query?where=NeuGenesen+IN%281%2C0%29${GetLandkreis}&objectIds=&time=&resultType=standard&outFields=AnzahlFall&returnIdsOnly=false&returnUniqueIdsOnly=false&returnCountOnly=false&returnDistinctValues=false&cacheHint=false&orderByFields=&outStatistics=%5B%7B%22statisticType%22%3A%22sum%22%2C%22onStatisticField%22%3A%22AnzahlFall%22%2C%22outStatisticFieldName%22%3A%22value%22%7D%5D%0D%0A&having=&resultOffset=&resultRecordCount=&sqlFormat=none&f=pjson&token=` | |
const apiUrlNewHealthyLK = (GetLandkreis) => `https://services7.arcgis.com/mOBPykOjAyBO2ZKk/arcgis/rest/services/RKI_COVID19/FeatureServer/0/query?where=NeuGenesen+IN%281%2C-1%29${GetLandkreis}&objectIds=&time=&resultType=standard&outFields=AnzahlFall&returnIdsOnly=false&returnUniqueIdsOnly=false&returnCountOnly=false&returnDistinctValues=false&cacheHint=false&orderByFields=&outStatistics=%5B%7B%22statisticType%22%3A%22sum%22%2C%22onStatisticField%22%3A%22AnzahlFall%22%2C%22outStatisticFieldName%22%3A%22value%22%7D%5D%0D%0A&having=&resultOffset=&resultRecordCount=&sqlFormat=none&f=pjson&token=` | |
const apiUrlDeathsLK = (GetLandkreis) => `https://services7.arcgis.com/mOBPykOjAyBO2ZKk/arcgis/rest/services/RKI_COVID19/FeatureServer/0/query?where=NeuerTodesfall+IN%281%2C0%29${GetLandkreis}&objectIds=&time=&resultType=standard&outFields=AnzahlFall&returnIdsOnly=false&returnUniqueIdsOnly=false&returnCountOnly=false&returnDistinctValues=false&cacheHint=false&orderByFields=&outStatistics=%5B%7B%22statisticType%22%3A%22sum%22%2C%22onStatisticField%22%3A%22AnzahlFall%22%2C%22outStatisticFieldName%22%3A%22value%22%7D%5D%0D%0A&having=&resultOffset=&resultRecordCount=&sqlFormat=none&f=pjson&token=` | |
const apiUrlNewDeathsLK = (GetLandkreis) => `https://services7.arcgis.com/mOBPykOjAyBO2ZKk/arcgis/rest/services/RKI_COVID19/FeatureServer/0/query?where=NeuerTodesfall+IN%281%2C-1%29${GetLandkreis}&objectIds=&time=&resultType=standard&outFields=AnzahlFall&returnIdsOnly=false&returnUniqueIdsOnly=false&returnCountOnly=false&returnDistinctValues=false&cacheHint=false&orderByFields=&outStatistics=%5B%7B%22statisticType%22%3A%22sum%22%2C%22onStatisticField%22%3A%22AnzahlFall%22%2C%22outStatisticFieldName%22%3A%22value%22%7D%5D%0D%0A&having=&resultOffset=&resultRecordCount=&sqlFormat=none&f=pjson&token=` | |
const apiRUrl = `https://www.rki.de/DE/Content/InfAZ/N/Neuartiges_Coronavirus/Projekte_RKI/Nowcasting_Zahlen_csv.csv?__blob=publicationFile` | |
/*************************************************************************** | |
* | |
* Global Variables | |
* | |
***************************************************************************/ | |
const GET_DAYS = 35; | |
const BUNDESLAENDER_SHORT = { | |
'Baden-Württemberg': 'BW', | |
'Bayern': 'BY', | |
'Berlin': 'BE', | |
'Brandenburg': 'BB', | |
'Bremen': 'HB', | |
'Hamburg': 'HH', | |
'Hessen': 'HE', | |
'Mecklenburg-Vorpommern': 'MV', | |
'Niedersachsen': 'NI', | |
'Nordrhein-Westfalen': 'NRW', | |
'Rheinland-Pfalz': 'RP', | |
'Saarland': 'SL', | |
'Sachsen': 'SN', | |
'Sachsen-Anhalt': 'ST', | |
'Schleswig-Holstein': 'SH', | |
'Thüringen': 'TH' | |
}; | |
let getGermany = false | |
let getCounty = false | |
let fixedCoordinates = [] | |
let individualName = '' | |
/*************************************************************************** | |
* | |
* Lets's Start ... | |
* | |
***************************************************************************/ | |
if (args.widgetParameter) { | |
const parameters = args.widgetParameter.split(','); | |
if (parameters.length >= 1) { | |
if (parameters[0] == 1) { getCounty = true } | |
if (parameters[0] == 2) { getGermany = true } | |
} | |
if (parameters.length >= 3) { | |
fixedCoordinates = parseLocation(args.widgetParameter) | |
} | |
if (parameters.length == 4) { | |
individualName = parameters[3].slice() | |
} | |
} else {} | |
let data = {} | |
const widget = await createWidget() | |
if (!config.runsInWidget) { | |
await widget.presentSmall() | |
} | |
Script.setWidget(widget) | |
Script.complete() | |
function parseLocation(input) { | |
const _coords = [] | |
const _fixedCoordinates = input.split(";").map(coords => { | |
return coords.split(',') | |
}) | |
_fixedCoordinates.forEach(coords => { | |
_coords[0] = { | |
latitude: parseFloat(coords[1]), | |
longitude: parseFloat(coords[2]), | |
} | |
}) | |
return _coords | |
} | |
async function createWidget() { | |
const _data = await getData(0) | |
let areaName; | |
if (_data && typeof _data.areaName !== 'undefined') { | |
areaName = _data.areaName; | |
data[areaName] = _data | |
} | |
const list = new ListWidget() | |
const headerLabel = list.addStack() | |
headerLabel.useDefaultPadding() | |
headerLabel.centerAlignContent() | |
list.setPadding(10, 10, 10, 10) | |
headerLabel.layoutHorizontally() | |
if (data && typeof data[areaName] !== 'undefined') { | |
if (!data[areaName].shouldCache) { | |
list.addSpacer(2) | |
const loadingIndicator = list.addText("Ort wird ermittelt...".toUpperCase()) | |
loadingIndicator.font = Font.mediumSystemFont(13) | |
loadingIndicator.textOpacity = 0.5 | |
} else { | |
list.refreshAfterDate = new Date(Date.now() + 6 * 60 * 60 * 1000) | |
} | |
const header = headerLabel.addText("🦠 ") | |
header.font = Font.mediumSystemFont(12) | |
const areanameLabel = headerLabel.addText(data[areaName].areaName) | |
areanameLabel.font = Font.mediumSystemFont(11) | |
list.addSpacer(2) | |
// Cases Overview | |
const casesLabel = list.addStack() | |
casesLabel.layoutVertically() | |
casesLabel.useDefaultPadding() | |
casesLabel.topAlignContent() | |
createCasesOverview(casesLabel, data[areaName]) | |
} else { | |
list.addSpacer() | |
const errorLabel = list.addText("Daten nicht verfügbar. \nWarten für Reload...") | |
list.refreshAfterDate = new Date(Date.now() + 1 * 10 * 1000) // 10 Sekunden | |
errorLabel.font = Font.mediumSystemFont(12) | |
errorLabel.textColor = Color.gray() | |
} | |
return list | |
} | |
function getValueFromJson(data) { | |
if (data.features[0].attributes.value != null) { | |
return (parseInt(data.features[0].attributes.value)) | |
} else { | |
return 0; | |
} | |
} | |
function parseRCSV(rDataStr) { | |
let lines = rDataStr.split(/(?:\r\n|\n)+/).filter(function(el) { return el.length != 0 }); | |
let headers = lines.splice(0, 1)[0].split(";"); | |
let valuesRegExp = /(?:\"([^\"]*(?:\"\"[^\"]*)*)\")|([^\";]+)/g; | |
let elements = []; | |
for (let i = 0; i < lines.length; i++) { | |
let element = {}; | |
let j = 0; | |
while (matches = valuesRegExp.exec(lines[i])) { | |
var value = matches[1] || matches[2]; | |
value = value.replace(/\"\"/g, "\""); | |
element[headers[j]] = value; | |
j++; | |
} | |
elements.push(element); | |
} | |
let lastR = {} | |
let lastR2 = {} | |
elements.forEach(item => { | |
if (parseFloat(item['Schätzer_7_Tage_R_Wert']) > 0) { | |
lastR2 = lastR; | |
lastR = item; | |
} | |
}) | |
console.log(lastR) | |
console.log(lastR2) | |
let lastRArr = [] | |
lastRArr.push(lastR2) | |
lastRArr.push(lastR) | |
return lastRArr | |
} | |
async function getData(useFixedCoordsIndex = false) { | |
try { | |
const location = await getLocation(useFixedCoordsIndex) | |
let data = await new Request(apiUrl(location)).loadJSON() | |
const attr = data.features[0].attributes | |
let bundeslandId = parseInt(attr.BL_ID); | |
let landkreisId = parseInt(attr.RS); | |
let landkreisApi = '' | |
if (getCounty) { | |
landkreisApi = `+AND+IdBundesland=${bundeslandId}` | |
} else if (!getGermany) { | |
landkreisApi = `+AND+IdLandkreis=${landkreisId}` | |
} | |
data = await new Request(apiUrlCasesLK(landkreisApi)).loadJSON() | |
const areaCases = getValueFromJson(data) | |
data = await new Request(apiUrlNewCasesLK(landkreisApi)).loadJSON() | |
const areaNewCases = getValueFromJson(data) | |
data = await new Request(apiUrlHealthyLK(landkreisApi)).loadJSON() | |
const areaHealthy = getValueFromJson(data) | |
data = await new Request(apiUrlNewHealthyLK(landkreisApi)).loadJSON() | |
const areaNewHealthy = getValueFromJson(data) | |
data = await new Request(apiUrlDeathsLK(landkreisApi)).loadJSON() | |
const areaDeaths = getValueFromJson(data) | |
data = await new Request(apiUrlNewDeathsLK(landkreisApi)).loadJSON() | |
const areaNewDeaths = getValueFromJson(data) | |
const rDataStr = await new Request(apiRUrl).loadString() | |
const rData = parseRCSV(rDataStr) | |
const res = { | |
landkreisId: landkreisId, | |
bundeslandId: bundeslandId, | |
incidence: parseFloat(attr.cases7_per_100k.toFixed(1)), | |
incidenceBL: parseFloat(attr.cases7_bl_per_100k.toFixed(1)), | |
areaName: getAreaName(attr), | |
areaCases: areaCases, | |
areaNewCases: areaNewCases, | |
areaHealthy: areaHealthy, | |
areaNewHealthy: areaNewHealthy, | |
areaDeaths: areaDeaths, | |
areaNewDeaths: areaNewDeaths, | |
nameBL: BUNDESLAENDER_SHORT[attr.BL], | |
shouldCache: true, | |
updated: attr.last_update, | |
r_factor_today: rData[1]['Schätzer_7_Tage_R_Wert'], | |
r_factor_yesterday: rData[0]['Schätzer_7_Tage_R_Wert'], | |
} | |
return res | |
} catch (e) { | |
console.log(e) | |
return null | |
} | |
} | |
function getAreaName(attr) { | |
if (individualName == '') { | |
if (getGermany) { | |
return ('Deutschland') | |
} else if (getCounty) { | |
return (attr.BL) | |
} else { | |
return (attr.GEN) | |
} | |
} else { | |
return (individualName) | |
} | |
} | |
async function getLocation(fixedCoordinateIndex = false) { | |
try { | |
if (fixedCoordinates && typeof fixedCoordinates[0] !== 'undefined') { | |
return fixedCoordinates[0] | |
} else { | |
Location.setAccuracyToThreeKilometers() | |
return await Location.current() | |
} | |
} catch (e) { | |
return null; | |
} | |
} | |
function formatCases(cases) { | |
return formatedCases = new Number(cases).toLocaleString('de-DE') | |
} | |
function createUpdatedLabel(label, data, align = 1) { | |
const areaCasesLabel = label.addText(`${data.updated.substr(0, 10)} `) | |
areaCasesLabel.font = Font.systemFont(8) | |
areaCasesLabel.textColor = Color.gray() | |
if (align === -1) { areaCasesLabel.rightAlignText() } else { areaCasesLabel.leftAlignText() } | |
} | |
function getRTrend(today, yesterday) { | |
let trend = '→' | |
if (today > yesterday) { | |
trend = '↗' | |
} else if (today < yesterday) { | |
trend = '↘' | |
} | |
return (trend) | |
} | |
function createCasesOverview(labelBlock, data) { | |
let smoothDark = (Device.isUsingDarkAppearance() && ENABLE_SMOOTH_DARK_MODE) | |
let bgColor = smoothDark ? altBackgroundColor : backgroundColor | |
let cColor = smoothDark ? altColorCases : colorCases | |
let hColor = smoothDark ? altColorHealthy : colorHealthy | |
let dColor = smoothDark ? altColorDeaths : colorDeahts | |
const stack = labelBlock.addStack() | |
stack.layoutVertically() | |
stack.useDefaultPadding() | |
stack.topAlignContent() | |
// Active Cases | |
const areaGesActiveLabel = stack.addText(formatCases(data.areaCases - data.areaHealthy - data.areaDeaths) + ' aktive Fälle ') | |
areaGesActiveLabel.font = Font.mediumSystemFont(10) | |
areaGesActiveLabel.lineLimit = 1 | |
areaGesActiveLabel.textColor = Color.gray() | |
stack.addSpacer(2) | |
// R-Factor with trend Overview | |
if (getGermany) { | |
const top = stack.addStack() | |
top.layoutHorizontally() | |
const rfactorStack = top.addStack(); | |
rfactorStack.setPadding(2, 5, 2, 2) | |
rfactorStack.centerAlignContent() | |
rfactorStack.backgroundColor = bgColor | |
rfactorStack.cornerRadius = 6 | |
rfactorStack.size = new Size(63, 14) | |
const rLabel = rfactorStack.addText('R: ' + data.r_factor_today + ' ' + getRTrend(data.r_factor_today, data.r_factor_yesterday)) | |
rLabel.font = Font.mediumSystemFont(10) | |
rLabel.textColor = dColor | |
rfactorStack.addSpacer() | |
top.addSpacer(4) | |
// const itsStack = top.addStack(); | |
// itsStack.setPadding(2, 5, 2, 2) | |
// itsStack.centerAlignContent() | |
// itsStack.backgroundColor = bgColor | |
// itsStack.cornerRadius = 6 | |
// itsStack.size = new Size(63, 14) | |
// const itsLabel = itsStack.addText('🛏 +2.155') | |
// itsLabel.font = Font.mediumSystemFont(10) | |
// itsLabel.textColor = dColor | |
stack.addSpacer(3) | |
} | |
// Cases Overview | |
const casesStack = stack.addStack(); | |
casesStack.setPadding(2, 5, 2, 2) | |
casesStack.centerAlignContent() | |
casesStack.backgroundColor = bgColor | |
casesStack.cornerRadius = 6 | |
casesStack.size = new Size(130, 18) | |
const casesLabelSymbol = casesStack.addText('☣︎ ') | |
casesLabelSymbol.font = Font.mediumSystemFont(16) | |
casesLabelSymbol.textColor = cColor | |
casesStack.addSpacer(1) | |
const casesLabelNew = casesStack.addText('+' + formatCases(data.areaNewCases) + ' ') | |
casesLabelNew.font = Font.mediumSystemFont(12) | |
casesLabelNew.textColor = cColor | |
const casesLabelGesamt = casesStack.addText('(' + formatCases(data.areaCases) + ')') | |
casesLabelGesamt.font = Font.mediumSystemFont(9) | |
casesLabelGesamt.textColor = cColor | |
casesStack.addSpacer() | |
stack.addSpacer(3) | |
// Healthy Overview | |
const healthyStack = stack.addStack(); | |
healthyStack.setPadding(2, 5, 2, 2) | |
healthyStack.centerAlignContent() | |
healthyStack.backgroundColor = bgColor | |
healthyStack.cornerRadius = 6 | |
healthyStack.size = new Size(130, 18) | |
const healthyLabelSymbol = healthyStack.addText('♡ ') | |
healthyLabelSymbol.font = Font.mediumSystemFont(12) | |
healthyLabelSymbol.size = new Size(20, 12) | |
healthyLabelSymbol.textColor = hColor | |
healthyStack.addSpacer(1) | |
const healthyLabelNew = healthyStack.addText('+' + formatCases(data.areaNewHealthy) + ' ') | |
healthyLabelNew.font = Font.mediumSystemFont(12) | |
healthyLabelNew.textColor = hColor | |
const healthyLabelGesamt = healthyStack.addText('(' + formatCases(data.areaHealthy) + ')') | |
healthyLabelGesamt.font = Font.mediumSystemFont(9) | |
healthyLabelGesamt.textColor = hColor | |
healthyStack.addSpacer() | |
stack.addSpacer(3) | |
// Deaths Overview | |
const deathsStack = stack.addStack(); | |
deathsStack.setPadding(2, 5, 2, 2) | |
deathsStack.centerAlignContent() | |
deathsStack.backgroundColor = bgColor | |
deathsStack.cornerRadius = 6 | |
deathsStack.size = new Size(130, 18) | |
const deathsLabelSymbol = deathsStack.addText('† ') | |
deathsLabelSymbol.font = Font.mediumSystemFont(14) | |
deathsLabelSymbol.size = new Size(20, 14) | |
deathsLabelSymbol.textColor = dColor | |
deathsStack.addSpacer(3) | |
const deathsLabelNew = deathsStack.addText('+' + formatCases(data.areaNewDeaths) + ' ') | |
deathsLabelNew.font = Font.mediumSystemFont(12) | |
deathsLabelNew.textColor = dColor | |
const deathsLabelGesamt = deathsStack.addText('(' + formatCases(data.areaDeaths) + ')') | |
deathsLabelGesamt.font = Font.mediumSystemFont(9) | |
deathsLabelGesamt.textColor = dColor | |
deathsStack.addSpacer() | |
// DATE | |
stack.addSpacer(5) | |
createUpdatedLabel(stack, data) | |
} |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Der RKI-Server gibt für die Abfrage heute (noch) keinen Wert zurück. Außerdem gibt der RKI-Server den Status "Wartung aktiv" zurück, kann also durchaus sein, dass das heute erst im Laufe des Tages aktualisiert wird. Auf dem RKI-Hub (corona.rki.de) stehen für die betroffenen Regionen auch keine Daten zur Verfügung. |
This comment has been minimized.
This comment has been minimized.
Hab das Skript aktualisiert, jetzt gibt er bei fehlenden Daten "0" zurück. Wenn die Wartung abgeschlossen ist seitens RKI, sollte er dann wieder aktuelle Daten beziehen |
This comment has been minimized.
This comment has been minimized.
DANKE! |
This comment has been minimized.
This comment has been minimized.
Folgendes hatte ich bereits bei Keyes Betten Widget gepostet, es würde aber auch zu den Fallzahlen prima passen: Ich möchte noch eine Idee beisteuern: Anzahl freier Betten und Vortagesveränderung, gibt ja einen Hinweis auf die Entwicklung der Pandemie, das Widget Fallzahlen ebenso in Bezug auf Neuinfektionen und Gestorbenen. Das intensivregister Betten wertet ja seit dem 25.10 die täglichen Neuzugänge an ITS Patienten aus. Die COVID-19-Neuaufnahmen auf ITS (377) ergibt sich aus der Summe der Veränderung intensivmedizinisch behandelter COVID-19-Fälle (108) und abgeschlossener Behandlungen (269) zum Vortag. das Bettenwidget stellt also 108 weniger Betten dar, aber zeigt nicht die tatsächlichen 377 Neuzugänge dar. Für mich wäre es aber fast noch interessanter, diese Zahl irgendwo sichtbar zu machen, weil sie doch ein genauerer Gradmesser zur aktuellen Situation ist. Gerade bekomme ich für heute 4 mehr zu Verfügung stehende Betten im Widget, wobei ich aber sicher bin, das die Neuzugänge heute wieder dreistellig sein werden. Arzt, der sagt man solle die Anzahl der ITS Patienten imAuge haben, das sei wichtiger als alles andere. |
This comment has been minimized.
This comment has been minimized.
Gibt es ein Widget was mir die Fallzahlen für ganz Deutschland anzeigt? Also wie das oben mit Aktuelle Zahl, Genesene, Verstorbene Super Arbeit ! |
This comment has been minimized.
This comment has been minimized.
Kleines Update, funktioniert jetzt auch für Bundesland oder Gesamtdeutschland |
This comment has been minimized.
This comment has been minimized.
Da geb ich Dir recht. Ist sicherlich ein interessanter Punkt in Bezug auf die Pandemieentwicklung. Auf dem Hub gibt es dazu aber keine Daten (https://npgeo-corona-npgeo-de.hub.arcgis.com/app/3a132983ad3c4ab8a28704e9addefaba) und auch per API bekomme ich nur folgende Daten (mal beispielhaft für einen Standort) zurück: Darf ich dich fragen, wo Du deine Zahlen bzgl. der ITS her hast? |
This comment has been minimized.
This comment has been minimized.
...funktioniert super.....könntest du das auch in der „alten“ Optik mit den weissen Kästchen umsetzen....?????....fand ich optisch schöner..... |
This comment has been minimized.
This comment has been minimized.
Danke, Problem bei dem alten Format war, dass die ziemlich großen Zahlen für Deutschland nicht mehr reingepasst haben. Könnte aber als Variante die Zeilen mit dem weißen Hintergrund (also quasi im "alten" Format) versehen. |
This comment has been minimized.
This comment has been minimized.
....da swäre super denke ich, diese Optik (weisser Hintergrund) passt einfach super zum iOS-Design und sieht übersichtlich und aufgeräumt aus.... |
This comment has been minimized.
This comment has been minimized.
Wenn das geht wäre das super und dann auch due Schriftfarbe in grün, rot, schwarz? |
This comment has been minimized.
This comment has been minimized.
Täglich 13 Uhr veröffentlicht divi den Tagesreport. Dort habe ich die Zahlen her. ..zusätzlich gibt es eine tägliche cvs Und eine API Schnittstelle https://www.intensivregister.de/api/public/intensivregister Ob und was man da für zahlen auslesen kann entzieht sich mir leider Hoffe du findest einen geeigneten Weg. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
...finde es optisch sogar noch besser als das „alte“ ...nur die Schriftgröße „Deutschland“ und „aktive Fälle“ würde ich noch etwas heruntersetzen.....was denkst Du....??? |
This comment has been minimized.
This comment has been minimized.
Finde ich selber auch besser ;-) R-Wert mit Trendpfeil unten rechts (neben dem Datum)? |
This comment has been minimized.
This comment has been minimized.
...ja, rechts neben Datum könnte passen...würde das Datum von der Schriftgröße aber auf die kleinstmöglich lesbare setzen....muss ja nicht immer im Vordergrund stehen...da sfinde ich den R-Wert wichtiger..... |
This comment has been minimized.
This comment has been minimized.
...mit den Schriftgrößen jetzt super, finde ich.... |
This comment has been minimized.
This comment has been minimized.
Danke für die Links, ich werde es mir später mal genauer anschauen, was man da raus ziehen kann. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Sollte eigentlich genau so funktionieren. Bitte Skript nochmal neu laden, Widget neu erstellen und/oder Parameter nochmal löschen (bestätigen) und wieder neu setzen. Hab das Gefühl, dass die API manchmal etwas "zickig" ist, da hilft dann nur (hoffentlich kurzes) Warten. |
This comment has been minimized.
This comment has been minimized.
Also wenn ich 2, 48.4, 9.98 eingebe dann wird es mir für Deutschland angezeigt Wenn ich nur 2 eingebe erscheint die Fehlermeldung von oben |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Ja, habe ich heute morgen auch festgestellt :-( |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Gibt es auch eins was mir die Zahlen für die ganze Welt anzeigt ? Aktive,genesene, Verstorbene ? Wäre echt nice. Danke für die ganze Arbeit sieht super aus ! |
This comment has been minimized.
This comment has been minimized.
Hey tolles Widget, kann man in der ersten Zeile noch den Inzident Anzeigen lassen vom jeweiligen Ort. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Oh, wow. Die eierlegende Wollmilchsau sozusagen. Siegt sehr gut aus. |
This comment has been minimized.
This comment has been minimized.
Cool |
This comment has been minimized.
This comment has been minimized.
Auch von mir doppeldaumen hoch, sieht prima aus |
This comment has been minimized.
This comment has been minimized.
...ja TOP, wenn es möglich ist wieder mit Dark-Mode option....das wäre sensationell....! |
This comment has been minimized.
This comment has been minimized.
Wow, sehr toll! Gibt es dies dann auch für den Landkreis? |
This comment has been minimized.
This comment has been minimized.
Wenn man auch andere Länder oder weltweit will, ist diese App sehr gut https://apps.apple.com/de/app/healthlynked-covid-19-tracker/id1500575377 |
This comment has been minimized.
This comment has been minimized.
Ja, für Landkreis/Bundesland oder Deutschland.
Die ist wieder mit dabei :) |
This comment has been minimized.
This comment has been minimized.
Cool! 👍🏼 |
This comment has been minimized.
This comment has been minimized.
Also wenn du das so umsetzen kannst, dann großen Respekt! |
This comment has been minimized.
This comment has been minimized.
Schön wäre eine Option, bei der man den Inzidenz wert seiner Regio/Bundesland und rechts die Daten von ganz DE sehen kann :) |
This comment has been minimized.
This comment has been minimized.
Update ist online! Inzidenz mit Trend Pfeil Der Trendpfeil bestimmt sich durch den geschätzten (!) R-Faktor. Dieser wird direkt darunter angezeigt. Ist der R-Faktor zwischen 0,95 und 1,05 bleibt die Inzidenz in etwa konstant (→), ist der R-Faktor zwischen 1,05 und 1,1 steigt die Inzidenz leicht ( Aktive Fälle im Landkreis/Bundesland/Deutschland Zu finden dort: https://raw.githubusercontent.com/tzschies/incidence/main/overviewCases.js (Raw-Code) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Cool! Danke. Mega Arbeit. |
This comment has been minimized.
This comment has been minimized.
@tzschies saubere Arbeit, genial! |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Die Lunge gibt es bei mir leider nicht :-(, finde ich in den Emojis nicht. Habe es durch die das 🧘🏼♀️ ersetzt. Perfekt und danke für die Arbeit. |
This comment has been minimized.
This comment has been minimized.
Es kann durchaus sein, dass nicht alle Krankenhäuser freie Betten melden. In deinem Landkreis sind es zwei Krankenhäuser, von denen Daten ausgewertet wurden. |
This comment has been minimized.
This comment has been minimized.
Gern gesehen. Welche iOS Version hast Du und welches Gerät? Kann sein, dass es das Symbol erst mit iOS 14.2 gibt. |
This comment has been minimized.
This comment has been minimized.
Danke, also weiter ein ohje für meinen Landkreis |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Habe iOS 14.1 und iPhone 12Pro |
This comment has been minimized.
This comment has been minimized.
@tzschies: wirklich ganz großes Tennis!!! |
This comment has been minimized.
This comment has been minimized.
@tzschies: richtig gut Arbeit ! Danke für die Mühe, Klasse |
This comment has been minimized.
This comment has been minimized.
Ebenfalls tausend Dank |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Der Script ist wirklich super. Danke! |
This comment has been minimized.
This comment has been minimized.
Hallo erstmal muss ich sagen echt ein Klasse Widget, Kann ich das Widget mit Parameter 2/Deutschland auch ohne aktive Ortungsdienste nutzen? Sobald ich die Ortungsdienste abschalte zeigt das Widget nur noch: "Daten nicht verfügbar, Reload erfolgt" |
This comment has been minimized.
Update vom 30.10.2020
Kleinere Designanpassungen: Ort steht nun in der Titelzeile, Datum ist etwas kleiner. Zusätzlich wird jetzt für Deutschland der R-Wert und dessen Trend angezeigt.
Update vom 29.10.2020
Es kann nun per Parameter eingestellt werden, ob die Zahlen für Landkreis, Bundesland oder Gesamtdeutschland angezeigt werden sollen. Außerdem kann ein eigener Landkreis/Bundesland-Name über Parameter vergeben werden.
Parameterübergabe Beispiel:
Gebiet, LAT, LON, Name
Erklärung:
Gebiet = 0: Landkreis
Gebiet = 1: Bundesland
Gebiet = 2: Deutschland
LAT,LON = Koordinaten
Name = Eigene Bezeichnung des Landkreises/Bundeslands (optional)
Beispiele:
Und so sieht das ganze aktuell aus:

Heller Mode:
Dark Mode (Für dunkles Grau als Hintergrund ENABLE_SMOOTH_DARK_MODE in Zeile 31 auf 'true' setzen)
