Skip to content

Commit

Permalink
Sewage cases and genomes chart (#1200)
Browse files Browse the repository at this point in the history
* Obsolete datasets
* Sewage cases and genomes data parsing
* Sewage cases chart
* Genome ratio chart
* Default view All timeline
* Static colors for genomes
* NIB link change
* Remove gene N1 mention from FAQ
* Basic FAQ from Kesma, add (NIB) to old chart
* Omikron, Drugo - fix names in code
  • Loading branch information
lukarenko authored Apr 4, 2023
1 parent d2007f6 commit f408b46
Show file tree
Hide file tree
Showing 17 changed files with 546 additions and 20 deletions.
4 changes: 4 additions & 0 deletions src/components/floatingMenuDict.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ export default {
titleKey: 'charts.sewage.titleMenu',
icon: 'graph',
},
'sewage-cases-chart': {
titleKey: 'charts.sewageCases.titleMenu',
icon: 'graph',
},
'hcenters-chart': {
titleKey: 'charts.hCenters.titleMenu',
icon: 'graph',
Expand Down
17 changes: 9 additions & 8 deletions src/content/en/data.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,18 @@ You can also inspect the data directly on the [Tables page](/en/tables).
- [municipality-active.csv](https://github.com/sledilnik/data/blob/master/csv/municipality-active.csv)
- [municipality-confirmed.csv](https://github.com/sledilnik/data/blob/master/csv/municipality-confirmed.csv)
- [municipality-deceased.csv](https://github.com/sledilnik/data/blob/master/csv/municipality-deceased.csv)
- [schools-cases.csv](https://github.com/sledilnik/data/blob/master/csv/schools-cases.csv)
- [schools-absences.csv](https://github.com/sledilnik/data/blob/master/csv/schools-absenses.csv)
- [schools-regimes.csv](https://github.com/sledilnik/data/blob/master/csv/schools-regimes.csv)
- [vaccination.csv](https://github.com/sledilnik/data/blob/master/csv/vaccination.csv)
- [sewage-cases.csv](https://github.com/sledilnik/data/blob/master/csv/sewage-cases.csv)
- [sewage-genomes.csv](https://github.com/sledilnik/data/blob/master/csv/sewage-genomes.csv)
- [safety_measures.csv](https://github.com/sledilnik/data/blob/master/csv/safety_measures.csv)
- **Obsolete - not updated anymore**:
- [patients.csv](https://github.com/sledilnik/data/blob/master/csv/patients.csv)
- [icu.csv](https://github.com/sledilnik/data/blob/master/csv/icu.csv)
- [hospitals.csv](https://github.com/sledilnik/data/blob/master/csv/hospitals.csv)
- [sewage.csv](https://github.com/sledilnik/data/blob/master/csv/sewage.csv)
- [safety_measures.csv](https://github.com/sledilnik/data/blob/master/csv/safety_measures.csv)
- **Obsolete - not updated anymore**:
- [schools-cases.csv](https://github.com/sledilnik/data/blob/master/csv/schools-cases.csv)
- [schools-absences.csv](https://github.com/sledilnik/data/blob/master/csv/schools-absenses.csv)
- [schools-regimes.csv](https://github.com/sledilnik/data/blob/master/csv/schools-regimes.csv)
- [vaccination.csv](https://github.com/sledilnik/data/blob/master/csv/vaccination.csv)
- [health_centers.csv](https://github.com/sledilnik/data/blob/master/csv/health_centers.csv)
- [retirement_homes.csv](https://github.com/sledilnik/data/blob/master/csv/retirement_homes.csv)
- [ostanizdrav.csv](https://github.com/sledilnik/data/blob/master/csv/ostanizdrav.csv)
Expand Down Expand Up @@ -152,6 +154,5 @@ To ensure the precision and reliability of our data, we collect and cross-check
| [Tabele o poročanju - Navodila za organizacijo dela](https://www.gov.si/novice/2020-03-17-navodila-za-organizacijo-dela-obravnavo-bolnika-in-dnevno-porocanje/) | |
| [Pojasnilo UKC-LJ o hospitaliziranih pacientih](https://twitter.com/ukclj/status/1242123118161911808) | |
| [Register prostorskih enot, Geodetska uprava RS](https://www.e-prostor.gov.si/zbirke-prostorskih-podatkov/nepremicnine/register-prostorskih-enot/) | |
--->

1 change: 1 addition & 0 deletions src/content/faq.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export default [
"schools-chart",
"school-status-chart",
"sewage-chart",
"sewage-cases-chart",
"sources-chart",
"ratios-chart",
"hcenters-chart",
Expand Down
14 changes: 8 additions & 6 deletions src/content/sl/data.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,18 @@ Podatke lahko neposredno pregledujete tudi na strani [Tabela](/sl/tables).
- [municipality-active.csv](https://github.com/sledilnik/data/blob/master/csv/municipality-active.csv)
- [municipality-confirmed.csv](https://github.com/sledilnik/data/blob/master/csv/municipality-confirmed.csv)
- [municipality-deceased.csv](https://github.com/sledilnik/data/blob/master/csv/municipality-deceased.csv)
- [schools-cases.csv](https://github.com/sledilnik/data/blob/master/csv/schools-cases.csv)
- [schools-absences.csv](https://github.com/sledilnik/data/blob/master/csv/schools-absenses.csv)
- [schools-regimes.csv](https://github.com/sledilnik/data/blob/master/csv/schools-regimes.csv)
- [vaccination.csv](https://github.com/sledilnik/data/blob/master/csv/vaccination.csv)
- [sewage-cases.csv](https://github.com/sledilnik/data/blob/master/csv/sewage-cases.csv)
- [sewage-genomes.csv](https://github.com/sledilnik/data/blob/master/csv/sewage-genomes.csv)
- [safety_measures.csv](https://github.com/sledilnik/data/blob/master/csv/safety_measures.csv)
- **Zastarelo - se ne osvežuje več**:
- [patients.csv](https://github.com/sledilnik/data/blob/master/csv/patients.csv)
- [icu.csv](https://github.com/sledilnik/data/blob/master/csv/icu.csv)
- [hospitals.csv](https://github.com/sledilnik/data/blob/master/csv/hospitals.csv)
- [sewage.csv](https://github.com/sledilnik/data/blob/master/csv/sewage.csv)
- [safety_measures.csv](https://github.com/sledilnik/data/blob/master/csv/safety_measures.csv)
- **Zastarelo - se ne osvežuje več**:
- [schools-cases.csv](https://github.com/sledilnik/data/blob/master/csv/schools-cases.csv)
- [schools-absences.csv](https://github.com/sledilnik/data/blob/master/csv/schools-absenses.csv)
- [schools-regimes.csv](https://github.com/sledilnik/data/blob/master/csv/schools-regimes.csv)
- [vaccination.csv](https://github.com/sledilnik/data/blob/master/csv/vaccination.csv)
- [health_centers.csv](https://github.com/sledilnik/data/blob/master/csv/health_centers.csv)
- [retirement_homes.csv](https://github.com/sledilnik/data/blob/master/csv/retirement_homes.csv)
- [ostanizdrav.csv](https://github.com/sledilnik/data/blob/master/csv/ostanizdrav.csv)
Expand Down
13 changes: 12 additions & 1 deletion src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@
"dataSource": "data source",
"dsNIB": "National Institute of Biology",
"dsNIJZ": "NIJZ",
"dsNLZOH": "National Laboratory for Health, Environment and Food",
"dsMZ": "Ministry of Health",
"dsHospitals": "hospitals",
"dsSURS": "SURS",
Expand Down Expand Up @@ -836,14 +837,24 @@
"date": "%A, %e. %B"
},
"sewage": {
"title": "Virus in Sewage [until 2/28/2023]",
"title": "Virus in Sewage (NIB) [until 2/28/2023]",
"titleMenu": "Sewage",
"activeCases": "Active Cases",
"newCases7dAve": "New Cases (7-day average)",
"concentrationGen1": "Ratio of SARS-CoV-2 Gene N1 and PMMoV",
"concentrationGen2": "Ratio of SARS-CoV-2 Gene N2 and PMMoV",
"muncipalitiesIncluded": "Active and Confirmed cases includes data from municipalities:"
},
"sewageCases": {
"title": "Virus in Sewage",
"titleMenu": "Sewage - mutations",
"casesPer100k": "Cases per 100,000 people",
"genomesRatio": "Ratio of Gene Mutations",
"estimatedCases": "Estimated Cases",
"activeCases": "Active Cases",
"other": "Other"
},

"sources": {
"title": "Sources and Locations of Infection, weekly",
"titleMenu": "Sources and Locations of Infection",
Expand Down
20 changes: 17 additions & 3 deletions src/locales/sl.json
Original file line number Diff line number Diff line change
Expand Up @@ -892,6 +892,7 @@
"dataSource": "vir podatkov",
"dsNIB": "Nacionalni inštitut za biologijo",
"dsNIJZ": "NIJZ",
"dsNLZOH": "Nacionalni laboratorij za zdravje, okolje in hrano",
"dsMZ": "Ministrstvo za zdravje",
"dsHospitals": "bolnišnice",
"dsSURS": "SURS",
Expand Down Expand Up @@ -1496,14 +1497,23 @@
"date": "%A, %e. %B"
},
"sewage": {
"title": "Virus v odpadnih vodah [do 28.2.2023]",
"title": "Virus v odpadnih vodah (NIB)[do 28.2.2023]",
"titleMenu": "Odpadne vode",
"activeCases": "Aktivni primeri",
"newCases7dAve": "Novi primeri (7-dnevno povprečje)",
"concentrationGen1": "Razmerje SARS-CoV-2 gen N1 in PMMoV",
"concentrationGen2": "Razmerje SARS-CoV-2 gen N2 in PMMoV",
"muncipalitiesIncluded": "Aktivni in potrjeni primeri vključujejo podatke iz naslednjih občin, ki uporabljajo to čistilno napravo (ČN):"
},
"sewageCases": {
"title": "Virus v odpadnih vodah",
"titleMenu": "Odpadne vode - mutacije",
"cases100k": "Primeri na 100.000 prebivalcev",
"genomesRatio": "Deleži mutacij genoma",
"estimatedCases": "Ocenjeno število primerov",
"activeCases": "Aktivni primeri",
"other": "Drugo"
},
"sources": {
"title": "Viri in lokacije okužb, tedensko",
"titleMenu": "Viri in lokacije okužb",
Expand Down Expand Up @@ -2142,9 +2152,13 @@
"question": "Kaj kaže graf \"Stanje po šolah in vrtcih\"?",
"answer": "[Graf](/sl/stats#school-status-chart) omogoča časovni prikaz odsotnosti in drugih ukrepov za posamezno šolo, vrtec ali drugo vzgojno-izobraževalno ustanovo.\n\nV osnovnem pogledu je po regijah prikazano število ustanov, ki so v zadnjih sedmih dneh imele kakršnokoli spremembo (novo odsotnost učenca ali zaposlenega zaradi suma na okužbo ali okužbe, spremenjen režim šolanja za oddelek). Tako dobite hiter pregled nad aktualnim dogajanjem.\n\nNatančnejši vpogled v stanje v posameznih ustanovah lahko dobite z izbiro regije in potem iskane ustanove, lahko pa določeno ustanovo preprosto poiščete s pomočjo iskalnika zgoraj levo. Na osnovni pogled se vrnete tako, da zaprete trenutni prikaz s klikom na križec poleg imena ustanove na vrhu grafa.\n\nČe za izbrano ustanovo obstajajo podatki, se v zgornjem delu grafa prikažejo spremenjeni režimi za zadevne oddelke (karantena, šola na daljavo), na sredini odsotnosti učencev in v spodnjem delu grafa odsotnosti zaposlenih zaradi okužbe ali suma na okužbo.\n\nDolžina vsakega pravokotnika ustreza datumom trajanja posameznega ukrepa, v oklepaju je zapisano število oseb, na katerega se nanaša. Ob prehodu z miško čez pravokotnik se pojavi oblaček z dodatnimi informacijami (vrsta ukrepa, vzrok za ukrep in osebe, na katere se nanaša).\n\nPrivzeti prikaz (*Aktivni*) vključuje podatke za zadnjih 28 dni; če želite videti celotno zgodovino za posamezno ustanovo, kliknite zgoraj desno na izbiro *Vsi*."
},
"sewage-chart": {
"sewage-cases-chart": {
"question": "Kaj kaže graf \"Virus v odpadnih vodah\"?",
"answer": "[Graf](/sl/stats#sewage-chart) prikazuje prisotnost koronavirusa v odpadnih vodah na posameznih čistilnih napravah. Meritve redno izvaja Nacionalni inštitut za biologijo na sedmih čistilnih napravah.\n\nGre za meritev količine virusne RNA v 24-urnih vzorcih odpadnih voda, in sicer za dva različna virusna strukturna gena, N1 in N2. Pri tem se uporablja test, razvit pri CDC. Vzorec se dostavi v laboratorije NIB, kjer se ga najprej skoncentrira, potem pa v njem izmeri koncentracijo koronavirusa in koncentracijo virusa PMMoV; slednji je uporabljan kot fekalni indikator v odpadnih vodah. Vrednosti, predstavljene na grafu, so razmerja med koncentracijami SARS-CoV-2 in PMMoV v vzorcih.\n\nNa grafu izberemo prikaz po posamezni čistilni napravi (spodaj se izpiše, za katere občine se vključujejo podatki). Poleg koncentracij N1 in N2 je za primerjavo prikazano tudi število novih (7-dnevno povprečje) in aktivnih primerov v občinah, ki so priklopljene na posamezno čistilno napravo. Tako lahko iz sprememb koncentracije gena N1 in N2 razberemo spremembe v trendu. Višja vrednost pomeni večjo relativno prisotnost virusa v populaciji in obratno."
"answer": "[Graf](/sl/stats#sewage-cases-chart) prikazuje razmerje inačic virusa SARS-CoV-2, ki krožijo v populaciji, na izbranem območju čistilne naprave. Meritve redno izvaja Nacionalni laboratorij za zdravje, okolje in hrano (NLZOH), na več čistilnih napravah, po vseh statističnih regijah v Sloveniji. Z izbiro v levem zgornjem kotu, se lahko pogledajo podatki za posamezno čistilno napravo.\n\nGraf tudi omogoča prikaz ocene aktivnih prebivalcih na podlagi meritev v posamezni čistilni napravi z izbiro na *Primeri na 100.000 prebivalcev*, desno zgoraj. Na podlagi količine virusne RNA, na NLZOH, ocenjujejo tudi število aktivnih okuženih prebivalcev na 100.000 prebivalcev. Na grafu je, za primerjavo, prikazano še število aktivnih okuženih prebivalcev, na podlagi izvedenih kliničnih testov (HAT in PCR).\n\nVeč o metodologiji, meritvah in pokritosti populacije na posameznih čistilnih napravah lahko preberete na [tukaj](https://modeliranje.nijz.si/epivode/epivode-c19.html#metodologija-in-interpretacija)."
},
"sewage-chart": {
"question": "Kaj kaže graf \"Virus v odpadnih vodah (NIB)\"?",
"answer": "[Graf](/sl/stats#sewage-chart) prikazuje prisotnost koronavirusa v odpadnih vodah na posameznih čistilnih napravah. Meritve redno izvaja Nacionalni inštitut za biologijo na sedmih čistilnih napravah.\n\nGre za meritev količine virusne RNA v 24-urnih vzorcih odpadnih voda, in sicer za virusno strukturni gen N2. Pri tem se uporablja test, razvit pri CDC. Vzorec se dostavi v laboratorije NIB, kjer se ga najprej skoncentrira, potem pa v njem izmeri koncentracijo koronavirusa in koncentracijo virusa PMMoV; slednji je uporabljan kot fekalni indikator v odpadnih vodah. Vrednosti, predstavljene na grafu, so razmerja med koncentracijami SARS-CoV-2 in PMMoV v vzorcih.\n\nNa grafu izberemo prikaz po posamezni čistilni napravi (spodaj se izpiše, za katere občine se vključujejo podatki). Poleg koncentracij gena N2 je za primerjavo prikazano tudi število novih (7-dnevno povprečje) in aktivnih primerov v občinah, ki so priklopljene na posamezno čistilno napravo. Tako lahko iz sprememb koncentracije gena N2 razberemo spremembe v trendu. Višja vrednost pomeni večjo relativno prisotnost virusa v populaciji in obratno."
},
"sources-chart": {
"question": "Kaj kaže graf \"Karantena in viri okužb\"?",
Expand Down
5 changes: 5 additions & 0 deletions src/pages/EmbedMakerPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,11 @@ export default {
text: this.$t('charts.sewage.title'),
dimensions: [1140, 720]
},
"SewageCasesGenomes": {
value: "SewageCasesGenomes",
text: this.$t('charts.sewageCases.title'),
dimensions: [1140, 720]
},
"Regions": {
value: "Regions",
text: this.$t('charts.regions.title'),
Expand Down
11 changes: 11 additions & 0 deletions src/style/visualizations/main.sass
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,17 @@ $box-shadow: 0 6px 38px -18px rgba(0, 0, 0, 0.3), 0 11px 12px -12px rgba(0, 0, 0
.metrics-comparison-chart
min-height: 688px

.sewage-cases-chart
min-height: 694px

.filters
display: flex
flex-wrap: wrap

.filters__type
width: 15rem
margin-bottom: $gap / 6

.regions-chart, .regions-chart-100k
min-height: 694px

Expand Down
10 changes: 10 additions & 0 deletions src/visualizations/App.fs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ let init (query: obj) (visualization: string option) (page: string) (apiEndpoint
| "Schools" -> Some Schools
| "SchoolStatus" -> Some SchoolStatus
| "Sewage" -> Some Sewage
| "SewageCasesGenomes" -> Some SewageCasesGenomes
| "Sources" -> Some Sources
| "HcCases" -> Some HcCases
| "Municipalities" -> Some Municipalities
Expand Down Expand Up @@ -512,6 +513,14 @@ let render (state: State) (_: Msg -> unit) =
| Success data ->
lazyView SewageChart.chart {| data = data |} }

let sewageCases =
{ VisualizationType = SewageCasesGenomes
ClassName = "sewage-cases-chart"
ChartTextsGroup = "sewageCases"
ChartEnabled = true
Explicit = false
Renderer = fun _ -> lazyView SewageCasesChart.sewageCasesChart () }

let hcCases =
{ VisualizationType = HcCases
ClassName = "hc-cases-chart"
Expand Down Expand Up @@ -702,6 +711,7 @@ let render (state: State) (_: Msg -> unit) =
[ metricsComparison;
dailyComparison;
patientsAge;
sewageCases;
spread;
tests; ageGroupsTimeline;
map; municipalities; regionMap; regions100k;
Expand Down
5 changes: 4 additions & 1 deletion src/visualizations/App.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@
<Compile Include="data/OurWorldInData.fs" />
<Compile Include="data/DailyDeaths.fs" />
<Compile Include="data/MonthlyDeaths.fs" />
<Compile Include="data\Sewage.fs" />
<Compile Include="data/Sewage.fs" />
<Compile Include="data/SewageCases.fs" />
<Compile Include="data/SewageGenomes.fs" />
<Compile Include="DataAnalysis/DatedTypes.fs" />
<Compile Include="DataAnalysis/AgeGroupsTimeline.fs" />
<Compile Include="DataVisualization/ChartingTypes.fs" />
Expand All @@ -57,6 +59,7 @@
<Compile Include="VaccineEffectAgeChart.fs" />
<Compile Include="SourcesChart.fs" />
<Compile Include="SewageChart.fs" />
<Compile Include="SewageCasesChart.fs" />
<Compile Include="HcCasesChart.fs" />
<Compile Include="PhaseDiagram/Types.fs" />
<Compile Include="PhaseDiagram/Data.fs" />
Expand Down
9 changes: 9 additions & 0 deletions src/visualizations/Highcharts.fs
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,15 @@ let chartCreditsNIJZ =
href = urlNijzCovid
|} |> pojo

let chartCreditsNIJZNLZOH =
{| enabled = true
text = sprintf "%s: %s, %s"
(I18N.t "charts.common.dataSource")
(I18N.tOptions ("charts.common.dsNIJZ") {| context = localStorage.getItem ("contextCountry") |})
(I18N.tOptions ("charts.common.dsNLZOH") {| context = localStorage.getItem ("contextCountry") |})
href = "https://modeliranje.nijz.si/epivode/epivode-c19.html#metodologija-in-interpretacija"
|} |> pojo

let chartCreditsNIJZMZHospitals =
{| enabled = true
text = sprintf "%s: %s, %s, %s"
Expand Down
Loading

0 comments on commit f408b46

Please sign in to comment.