Thailand Covid testing and case data gathered and combined from various sources for others to download or view
Note Share via https://djay.github.io/covidthailand
Thailand COVID-19 case/test/vaccination data gathered and combined from various government sources for others to view or download.
NEW Excess Deaths
Data offered here is offered as is with no guarantees. As much as possible government reports and data feeds have been used effort has gone into making this data collection accurate and timely. This sites only intention is to give an accurate representation of all the available Covid data for Thailand in one place.
Links to all data sources are including in Downloads
Got a question about covid in Thailand? Try asking it in Q&A discussion
From Oct 1st 2022 all covid data from the DDC has been released in weekly chunks. Data here will be displayed as daily averages and updates will be once per week (mondays?). In addition many of the data sources have stopped being published so many plots will no longer be change.
source: Outbreak.info, DMSc Variant Report
Sources: CCSA Daily Briefing, MOPH daily situation report, DMSC: Thailand Laboratory testing data
No longer updated so model is inaccurate
Bangkok Region - Central - Eastern - Western - Northeast A-N - Northeast N-Y - Northern C-N - Northern P-U - Southern C-P - Southern R-Y
see also Provinces with Most Walkin Cases | 2020-2021 |
Source: MOPH Covid-19 Dashboard, DDC Daily Vaccination Reports
see also Lowest Provinces by Vaccination 1st Jab | Vaccinations 1st given by Region | Map of Vaccinations: The Researcher Covid Tracker
Total number of laboratory tests
. Total number of laboratory tests
is mislabelled and is exactly the same as the PUI number.see also Positive Rate: Full year, Tests per Case Graph (Positive rate inverted) could be easier to understand, Positive Rate - Top Provinces - Thailand, Positive Rate - Lowest Provinces - Thailand
Confirmed cases excludes ATK Positives (unless they also had a positive PCR test). This is similar to most countries however some like Malaysia, India and UK count antigen tests in both tests and confirmed cases
Shows Deaths from all causes in comparison to the min, max and mean of Deaths from the 5 years pre-pandemic.
conda install -c conda-forge python-crfsuite
To install (requires python >=3.9)
python -m venv .venv
.venv/bin/pip install -r requirements.txt
The plots are produced from csv files made in covid_data.py.
Manually: extract latest datasets
into the top level of the project. It will put csv files into api
and inputs/json
folders.
wget https://github.com/djay/covidthailand/releases/download/1/datasets.tar.gz && \
tar xzf datasets.tar.gz && \
rm datasets.tar.gz
USE_CACHE_DATA=True MAX_DAYS=0 bin/python covid_plot.py
{
"name": "covidthailand - plot",
"type": "python",
"request": "launch",
"program": "covid_plot.py",
"console": "integratedTerminal",
"env": {
"USE_CACHE_DATA":"True",
"MAX_DAYS":"0",
}
}
*_3.svg
files are produced. 3 is for 3rd wave (since April 2021).Manually: extract latest input files (~1.3G)
into the top level of the project. It will put documents/json etc inputs/*
folders.
wget https://github.com/djay/covidthailand/releases/download/1/inputs.tar.gz && \
tar xzf inputs.tar.gz && \
rm inputs.tar.gz
USE_CACHE_DATA=True python covid_data.py
If many days have passed since the last run then return to step 1. or slightly slow but smaller download is to download the latest datasets files which will speed up dashboard scrapping which is the slowest part.
If you really need to ensure all the files are scraped again then
To run the full scrape (warning this will take a long time as it downloads all the documents into a local cache)
bin/python covid_plot.py
To run the tests (will only get files needed for tests)
bin/pytest
To add a test
git blame covid_data.py
on the scraping function to see the dates that lines were added or changed. in some cases comments indicated important dates where code had to change.$ sudo gem update bundler
$ bundle config set --local path vendor/bundle
$ bundler install
$ bundle exec jekyll serve
Made with python/pandas/matplotlib. Dylan Jay gave a talk on how easy it is to extract data from PDFs
and powerpoints and plot data at Bangkok’s Monthly ThaiPy Event Video: “How I scraped Thailand’s covid data” (1h mark)
Why do this? Originally to answer the question “Was Thailand doing enough testing?” for myself and because too many people were wrong on the internets.
!
This work is licensed under a Creative Commons Attribution 4.0 International License.