covid19-id
Python module for getting data from Indonesian government (covid19.go.id)
Install
You can install or upgrade covid19-id with:
pip install covid19-id --upgrade
Optional Dependencies
covid19-id can be installed with optional ujson dependency.
pip install covid19-id[ujson]
It will then be used for JSON decoding, which can bring speed up compared to the standard json library.
Example
Get Data
import covid19_id
data = covid19_id.get_data()
print("View symptom data")
print(f"Recorded data {100-data.kasus.gejala.missing_data:.2f}%")
print(f"Unrecorded data {data.kasus.gejala.missing_data:.2f}%")
for gejala in data.kasus.gejala.list_data:
print(f"{gejala.doc_count:.2f}% with symptoms {gejala.key.capitalize()}")
Get Updates
import covid19_id
all_update = covid19_id.get_update()
total = all_update.update.total
print(f"covid19; positive cases in Indonesia : {total.jumlah_positif}")
print(f"covid19; patients treated in Indonesia {total.jumlah_dirawat}")
print(f"covid19; patients recovered in Indonesia {total.jumlah_sembuh}")
print(f"covid19; patients died in Indonesia {total.jumlah_meninggal}")
Provinsi
import covid19_id
data_provinsi = covid19_id.get_prov()
for provinsi in data_provinsi.list_data:
print(f"Province : {provinsi.key}")
print(f"Cases {provinsi.jumlah_kasus}")
print(f"Recovered {provinsi.jumlah_sembuh}")
print(f"Died {provinsi.jumlah_meninggal}")
for umur in provinsi.kelompok_umur:
print(f"Age {umur.key} : {umur.doc_count}")
penambahan = provinsi.penambahan
print(f"Additional Positive Cases {penambahan.positif}")
print(f"Additional Recovered {penambahan.sembuh}")
print(f"Additional Died {penambahan.meninggal}")
print("")
Vaccinated
import covid19_id
pemeriksaan_vaksinasi = covid19_id.get_pemeriksaan_vaksinasi()
vaksinasi_total = pemeriksaan_vaksinasi.vaksinasi.total
print(f"vaccinated population (first one) {vaksinasi_total.jumlah_vaksinasi_1}")
print(f"vaccinated population (second time) {vaksinasi_total.jumlah_vaksinasi_2}")
Metadata
Release files for covid19-id 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| covid19-id-1.1.0.tar.gz | 9.3 kB | Without provenance | Details for covid19-id-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| covid19_id-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for covid19_id-1.1.0-py3-none-any.whl |
Total release size: 31.5 kB
Release files / covid19-id-1.1.0.tar.gz
| Download URL | covid19-id-1.1.0.tar.gz |
|---|---|
| Size | 9.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4311e86d3d4d362c68977c6b50fcf998cf4ef542c9c0679b5c75b0ab33e4f66d
|
|
BLAKE2b-256 checksum How to use checksums |
174c3ae12e34e23721d02b46128cfe4ff8d4dc25024dca881f56dde0adc9419a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.7.12 Linux/5.11.0-1028-azure
|
Release files / covid19_id-1.1.0-py3-none-any.whl
| Download URL | covid19_id-1.1.0-py3-none-any.whl |
|---|---|
| Size | 22.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
86add2207a5b66e340f9a24831ba9f9bfec054a74e3941027729008f4c771486
|
|
BLAKE2b-256 checksum How to use checksums |
9e72f0ae25b88f7576db525d52ba99849e67d7ac467a675b3f83fc2502fc2bd3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.7.12 Linux/5.11.0-1028-azure
|
Security for covid19-id 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.