Skip to content

Commit

Permalink
Merge pull request #1144 from ScilifelabDataCentre/FREYA-725/Abdullah
Browse files Browse the repository at this point in the history
Updated plots of NPC statistics from vega to plotly
  • Loading branch information
LianeHughes authored Jun 12, 2024
2 parents 3e78040 + 8f23fde commit 0dee303
Show file tree
Hide file tree
Showing 2 changed files with 127 additions and 207 deletions.
158 changes: 61 additions & 97 deletions content/english/dashboards/npc-statistics.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ description: The national Pandemic Centre (NPC) conducted testing related to SAR
banner: /dashboard_thumbs/NPC_logo.png
banner_border: true
menu:
dashboard_menu:
identifier: npc-statistics
name: "National Pandemic Centre (Historic)"
dashboard_menu:
identifier: npc-statistics
name: "SARS-CoV-2 tests at National Pandemic Centre"
toc: false
plotly: true
aliases:
- /data_types/health_data/npc-statistics/
- /data_types/health_data/npc-statistics/
dashboards_topics: [COVID-19, Infectious diseases]
---

Expand All @@ -19,131 +20,94 @@ dashboards_topics: [COVID-19, Infectious diseases]
<a class="dark-blue" href="https://nyheter.ki.se/covid-19-tester-ki-atergar-till-ordinarie-laboratorieverksamhet-men-har-fortsatt-beredskap">KI Press Release</a>
</div>

The dataset visualised in the graphs on this page is available [here](https://datagraphics.dc.scilifelab.se/dataset/bbbaf64a25a1452287a8630503f07418). The numbers reported here were compiled automatically and, as such, might not correspond to
the numbers reported through other sources for different reasons.
The dataset visualised in the graphs on this page is available [on SciLifeLab's Blobserver](https://blobserver.dc.scilifelab.se/blob/NPC-statistics-data-set.csv). The numbers reported here were compiled automatically and, as such, might not correspond to the numbers reported through other sources for different reasons.

#### Total NPC test numbers

The total number of SARS-CoV-2 (COVID-19) tests conducted at the national Pandemic Centre (NPC) since the start of the pandemic, separated according to whether the results were positive, negative, or invalid/inconclusive.

Source code for the below graph is available [here](https://datagraphics.dc.scilifelab.se/graphic/ba0b27320fe74ad0aef59a26be6c37f1).

<div class="d-lg-none alert alert-info">
Scroll the plot sideways to view all data.
<div class="d-md-none alert alert-info">
Rotating your phone may improve graph layout
</div>

<div class="plot_wrapper">
<div class="w-100" id="total-numbers-chart"></div>
<div class="plot_wrapper mb-3">
<div class="table-responsive">{{< plotly json="https://blobserver.dc.scilifelab.se/blob/npc_total_tests.json" height="200px">}}</div>
</div>

**Code used to produce plot:** [Script to produce plot](https://github.com/ScilifelabDataCentre/pathogens-portal-visualisations/blob/main/npctests/npc_total_tests.py).

#### NPC test numbers

The number of SARS-CoV-2 (COVID-19) tests ran daily or weekly, divided according to whether results were positive, negative, or invalid/inconclusive.

Source code is available for both the [daily](https://datagraphics.dc.scilifelab.se/graphic/ddb1119aefce47d58d0b3a49e98b4fcc) and [weekly](https://datagraphics.dc.scilifelab.se/graphic/1f2322f4301c4773878c956c578e8caf) graphs below.

<div id="dwbuttons"><button class="btn btn-secondary" type="button" data-toggle="collapse" data-target="#daily_stacked_bar_chart" aria-expanded="true" aria-controls="#daily_stacked_bar_chart">
Daily
</button>
</div>
<div class="collapse show" id="daily_stacked_bar_chart">
<div class="d-lg-none alert alert-info">
Scroll the plot sideways to view all data.
</div>
<div class="plot_wrapper">
<div class="w-100" id="stacked-bar-chart"></div>
</div>
##### Daily

<div class="d-md-none alert alert-info">
Rotating your phone may improve graph layout
</div>
<div id="dwbuttons">
<button class="btn btn-secondary" type="button" data-toggle="collapse" data-target="#weekly_stacked_bar_chart" aria-expanded="true" aria-controls="weekly_stacked_bar_chart">
Weekly
</button></div>
<div class="collapse show" id="weekly_stacked_bar_chart">
<div class="d-lg-none alert alert-info">
Scroll the plot sideways to view all data.
</div>
<div class="plot_wrapper">
<div class="w-100" id="stacked-bar-chart-weekly"></div>
</div>

<div class="plot_wrapper mb-3">
<div class="table-responsive">{{< plotly json="https://blobserver.dc.scilifelab.se/blob/npc_tests_daily.json" height="350px">}}</div>
</div>

#### NPC tests positive fraction
**Code used to produce plot:** [Script to produce plot](https://github.com/ScilifelabDataCentre/pathogens-portal-visualisations/blob/main/npctests/npc_tests_daily.py).

The fraction of daily or weekly SARS-CoV-2 (COVID-19) tests that were positive,
as percentage of all tests conducted (excluding invalid/inconclusive).

Source code is available for both the [daily](https://datagraphics.dc.scilifelab.se/graphic/b31c50be59c84c93986c25b052115a65) and [weekly](https://datagraphics.dc.scilifelab.se/graphic/7f27ae237b8146a498ab4014aadc35db) graphs below.

<div id="dwbuttons"><button class="btn btn-secondary" type="button" data-toggle="collapse" data-target="#daily_positive_bar_chart" aria-expanded="true" aria-controls="#daily_positive_bar_chart">
Daily
</button></div>
<div class="collapse show" id="daily_positive_bar_chart">
<div class="d-lg-none alert alert-info">
Scroll the plot sideways to view all data.
</div>
<div class="plot_wrapper">
<div class="w-100" id="positive-bar-chart"></div>
</div>
<p class="small"><i>*Note that as the number of reported analyses vary, some days may have a low number of samples, affecting the statistics a lot for that day, e.g. August 24th where only seven samples were reported, all positive.</i></p>
##### Weekly

<div class="d-md-none alert alert-info">
Rotating your phone may improve graph layout
</div>
<div id="dwbuttons"><button class="btn btn-secondary" type="button" data-toggle="collapse" data-target="#weekly_positive_bar_chart" aria-expanded="true" aria-controls="weekly_positive_bar_chart">
Weekly
</button></div>
<div class="collapse show" id="weekly_positive_bar_chart">
<div class="d-lg-none alert alert-info">
Scroll the plot sideways to view all data.
</div>
<div class="plot_wrapper">
<div class="w-100" id="positive-bar-chart-weekly"></div>
</div>

<div class="plot_wrapper mb-3">
<div class="table-responsive">{{< plotly json="https://blobserver.dc.scilifelab.se/blob/npc_tests_weekly.json" height="350px">}}</div>
</div>

#### Cumulative NPC test numbers
**Code used to produce plot:** [Script to produce plot](https://github.com/ScilifelabDataCentre/pathogens-portal-visualisations/blob/main/npctests/npc_tests_weekly.py).

The sum of all SARS-CoV-2 (COVID-19) virus tests conducted at NPC since the
start of the pandemic, as a function of date, and divided according to whether results were positive, negative, or invalid/inconclusive.
#### NPC tests positive fraction

Source code for the below graph is available [here](https://datagraphics.dc.scilifelab.se/graphic/9145856246004419983d39fcf56d9eb6).
The fraction of daily or weekly SARS-CoV-2 (COVID-19) tests that were positive,
as percentage of all tests conducted **(excluding invalid/inconclusive)**.

##### Daily

<div class="d-md-none alert alert-info">
Rotating your phone may improve graph layout
</div>

<div class="d-lg-none alert alert-info">
Scroll the plot sideways to view all data.
<div class="plot_wrapper mb-3">
<div class="table-responsive">{{< plotly json="https://blobserver.dc.scilifelab.se/blob/npc_positiveTests_fraction_daily.json" height="350px">}}</div>
</div>

<div class="plot_wrapper">
<div class="w-100" id="cumulative-plot"></div>
**Code used to produce plot:** [Script to produce plot](https://github.com/ScilifelabDataCentre/pathogens-portal-visualisations/blob/main/npctests/npc_positiveTests_fraction_daily.py).

##### Weekly

<div class="d-md-none alert alert-info">
Rotating your phone may improve graph layout
</div>

The National Pandemic Centre (NPC) was a facility for
[SARS-CoV-2 (COVID-19) testing](https://ki.se/mtc/ctmr-and-covid-19)
established within the
[Centre for Translational Microbiome Research (CTMR)](https://ki.se/en/research/centre-for-translational-microbiome-research-ctmr)
at
[Karolinska Institutet (KI)](https://ki.se/en)/[SciLifeLab](https://www.scilifelab.se/).
At the end of March 2020, the large-scale microbiome research lab was
quickly converted into a centre to assist Sweden with analysing
SARS-CoV-2 tests. This was made possible by a donation from the
[Knut and Alice Wallenberg Foundation (KAW)](https://kaw.wallenberg.org/en) and a previously established collaboration with
[MGI Tech](https://en.mgitech.cn/) in Shenzen, China. The NPC initially helped to expand the RNA-extraction capacity at Karolinska
Universitets laboratoriet. However, it quickly expanded into a facility that increased the testing capacity across all regions of Sweden.
<div class="plot_wrapper mb-3">
<div class="table-responsive">{{< plotly json="https://blobserver.dc.scilifelab.se/blob/npc_positiveTests_fraction_weekly.json" height="350px">}}</div>
</div>

The final capacity of the National Pandemic Centre at KI/SciLifeLab
was approximately 10,000 tests per day. The results were typically
returned within 24 hours of the sample arriving to the lab. NPC
exclusively performed PCR-based analyses, not serological
(antibody-based) analyses.
**Code used to produce plot:** [Script to produce plot](https://github.com/ScilifelabDataCentre/pathogens-portal-visualisations/blob/main/npctests/npc_positiveTests_fraction_weekly.py).

<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
#### Cumulative NPC test numbers

<script src="https://datagraphics.dc.scilifelab.se/graphic/ba0b27320fe74ad0aef59a26be6c37f1.js?id=total-numbers-chart"></script>
The sum of all SARS-CoV-2 (COVID-19) virus tests conducted at NPC since the
start of the pandemic, as a function of date, and divided according to whether results were positive, negative, or invalid/inconclusive.

<script src="https://datagraphics.dc.scilifelab.se/graphic/ddb1119aefce47d58d0b3a49e98b4fcc.js?id=stacked-bar-chart"></script>
<div class="d-md-none alert alert-info">
Rotating your phone may improve graph layout
</div>

<script src="https://datagraphics.dc.scilifelab.se/graphic/1f2322f4301c4773878c956c578e8caf.js?id=stacked-bar-chart-weekly"></script>
<div class="plot_wrapper mb-3">
<div class="table-responsive">{{< plotly json="https://blobserver.dc.scilifelab.se/blob/npc_cumulative_tests.json" height="550px">}}</div>
</div>

<script src="https://datagraphics.dc.scilifelab.se/graphic/b31c50be59c84c93986c25b052115a65.js?id=positive-bar-chart"></script>
**Code used to produce plot:** [Script to produce plot](https://github.com/ScilifelabDataCentre/pathogens-portal-visualisations/blob/main/npctests/npc_cumulative_tests.py).

<script src="https://datagraphics.dc.scilifelab.se/graphic/9145856246004419983d39fcf56d9eb6.js?id=cumulative-plot"></script>
The National Pandemic Centre (NPC) was a facility for [SARS-CoV-2 (COVID-19) testing](https://ki.se/mtc/ctmr-and-covid-19) established within the [Centre for Translational Microbiome Research (CTMR)](https://ki.se/en/research/centre-for-translational-microbiome-research-ctmr) at [Karolinska Institutet (KI)](https://ki.se/en)/[SciLifeLab](https://www.scilifelab.se/). At the end of March 2020, the large-scale microbiome research lab was quickly converted into a centre to assist Sweden with analysing SARS-CoV-2 tests. This was made possible by a donation from the [Knut and Alice Wallenberg Foundation (KAW)](https://kaw.wallenberg.org/en) and a previously established collaboration with [MGI Tech](https://en.mgitech.cn/) in Shenzen, China. The NPC initially helped to expand the RNA-extraction capacity at Karolinska Universitets laboratoriet. However, it quickly expanded into a facility that increased the testing capacity across all regions of Sweden.

<script src="https://datagraphics.dc.scilifelab.se/graphic/7f27ae237b8146a498ab4014aadc35db.js?id=positive-bar-chart-weekly"></script>
The final capacity of the National Pandemic Centre at KI/SciLifeLab was approximately 10,000 tests per day. The results were typically returned within 24 hours of the sample arriving to the lab. NPC exclusively performed PCR-based analyses, not serological (antibody-based) analyses.
Loading

0 comments on commit 0dee303

Please sign in to comment.