Download and parse Weekly Epidemiological Reports (WER) from the Epidemiology Unit, Ministry of Health, Sri Lanka
Project description
srilanka-epi
Python library to download and parse Weekly Epidemiological Reports (WER) from the Epidemiology Unit, Ministry of Health, Sri Lanka.
Built as part of DengueSense LK — Final Year Development Project, ICBT Campus / Cardiff Metropolitan University (2026).
Installation
pip install srilanka-epi
Or from source:
git clone https://github.com/chathurakavinduweerakoon/srilanka-epi
cd srilanka-epi
pip install -e .
Quick Start
from srilanka_epi.wer import download_range, build_dengue_timeseries
from srilanka_epi.dengue import top_districts, add_province
# Download WER Vol 53 (2026) issues 1-18 and extract dengue data
results = download_range(volume=53, start_no=1, end_no=18, save_dir="./wer_pdfs")
dengue_df = build_dengue_timeseries(results)
# Add province column
dengue_df = add_province(dengue_df)
# Top 5 districts for week 17, 2026
top5 = top_districts(dengue_df, week_no=17, year=2026, n=5)
print(top5)
# Export to CSV
dengue_df.to_csv("dengue_srilanka_2026.csv", index=False)
Parse a Single PDF
from srilanka_epi.wer import parse_wer_pdf
# From file path
result = parse_wer_pdf("WER_Vol53_No18.pdf", volume=53, number=18)
# From URL
result = parse_wer_pdf("https://www.epid.gov.lk/.../en_53_18.pdf", volume=53, number=18)
# From bytes
with open("WER.pdf", "rb") as f:
result = parse_wer_pdf(f.read(), volume=53, number=18)
print(result['metadata'])
print(result['dengue'])
DengueSense LK — LSTM Feature Matrix with BSDS
from srilanka_epi.dengue import merge_bsds_with_dengue
# citizen_reports_df: DataFrame from DengueSense LK Spring Boot API
# columns: [district, week_no, year, risk_label]
lstm_features = merge_bsds_with_dengue(dengue_df, citizen_reports_df)
lstm_features.to_csv("lstm_input_features.csv", index=False)
Modules
| Module | Purpose |
|---|---|
srilanka_epi.wer |
Download & parse WER PDFs |
srilanka_epi.dengue |
Dengue-specific helpers, BSDS computation |
Data Source
All data is sourced from the Epidemiology Unit, Ministry of Health & Indigenous Medicine, Sri Lanka.
- Website: https://www.epid.gov.lk
- WER Index: https://www.epid.gov.lk/weekly-epidemiological-report/weekly-epidemiological-report
Please acknowledge the Epidemiology Unit as the primary data source in any publications.
Citation
Weerakoon, R.B.H.G.C.K.B. (2026). srilanka-epi: Python library for Sri Lanka
Weekly Epidemiological Report data extraction. ICBT Campus / Cardiff Metropolitan University.
https://github.com/chathurakavinduweerakoon/srilanka-epi
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file srilanka_epi-1.0.0.tar.gz.
File metadata
- Download URL: srilanka_epi-1.0.0.tar.gz
- Upload date:
- Size: 9.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
041fbfa8231fb66e44c0f181e4dfbd4c1005d206ac0d1319ee5555d10bf94bf0
|
|
| MD5 |
43e583b47b7e58da42cf6c5807df2c1f
|
|
| BLAKE2b-256 |
69c400ad50f7d56e61659d889db8b1b772c22c3ce37400007a5e548da0fc0474
|
File details
Details for the file srilanka_epi-1.0.0-py3-none-any.whl.
File metadata
- Download URL: srilanka_epi-1.0.0-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
716f9abb14bf2c8b55c4e83d778a818dbf100fcd84fd0e1e387c2b994ca2fadd
|
|
| MD5 |
b9b623aea57af41393693af55a6f898e
|
|
| BLAKE2b-256 |
998843e3ee18a63f6e35cc9c0003fb8629185cc30bfde7f5b63b7bb99082f880
|