Skip to main content

New methodology to identify waves, peaks, and valleys from epidemic curve

Project description

EpidemicKabu a new method to identify epidemic waves and their peaks and valleys

Kabu is a new methodology to identify waves, peaks, and valleys from epidemic curve. The algorithm in explain in doi:.. as well as some examples.

Description of files in this repository:

  1. epidemickabu/ contains the modules of the package:

    • kabu.py is the main module. It makes the necessary calculations for the subsequent identification of waves, and peaks and valleys. The main input is a dataset with two variables (i.e., cases, and dates) and the kernels to smooth both the epidemic curve and its first derivative with a Gaussian filter.

    • kabuWaves.py is a module to estimate the waves. You could set an optional threshold to filter the days delimiting the waves. There are some examples in examples/ that give you and idea of the magnitude of this value. You can also filter the waves changing the kernel's value.

    • kabuPeaksValleys.py is a module to estimate the Peaks and Valleys of each identified wave.

  2. examples/ contains the files to replicate examples of how to use the library. The examples are made with COVID-19 data for 15 countries:

    • data/ is the input data used in all the research.
    • dataframes/ is created to save the output dataframes.
    • plots/ is created to save the output plots.
    • exampleUseLibrary.ipynb shows basic examples to use the library.
    • exploringLibrary/.ipynb explores attributes and methods from the classes in the library.
    • The other files show the steps for some analysis made with the results obtained with the library for COVID-19 data.
  3. test/ contains the files to test the code.

  4. additional/ contains some notebooks showing the step by step of the algorithm.

Installation in Python

NOTE: This project was made in Python 3.10.6

  1. Install the library using pip
    pip install epidemickabu
    
  2. Import the library
    import EpidemicKabu as ek
    

Installation in R

  1. Install and load the package reticulate which provides an interface between R and Python
    install.packages("reticulate")
    
    and
    library(reticulate)
    
  2. Configure Python Environment
    use_python("/path/to/python")
    
    or
    use_virtualenv("/path/to/your/virtualenv")
    
  3. Install and import the package EpidemicKabu
    py_install("epidemickabu")
    
    and
    ek <- import("EpidemicKabu")
    

Contributing

This project is in progress and it requires some improvments. Therefore, if you have any suggestion that would make this better, please fork the repository and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/improvments)
  3. Commit your Changes (git commit -m 'Adding some improvment)
  4. Push to the Branch (git push origin feature/improvments)
  5. Open a Pull Request

Contact

Acknowledgments

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

epidemickabu-0.2.5.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

epidemickabu-0.2.5-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file epidemickabu-0.2.5.tar.gz.

File metadata

  • Download URL: epidemickabu-0.2.5.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for epidemickabu-0.2.5.tar.gz
Algorithm Hash digest
SHA256 adbacc22153ebb820d19ff1bdfbf9b6532dad5d4dfe4fb0edfe6cc91dcbbdc52
MD5 faf54f41d1df1d3e9fb1b5aee45497dd
BLAKE2b-256 4f34ddd8b410f995a8131c0643a29ed70ef4aac765187b2ee01605f93fa5f36c

See more details on using hashes here.

File details

Details for the file epidemickabu-0.2.5-py3-none-any.whl.

File metadata

  • Download URL: epidemickabu-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for epidemickabu-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 bf493dacbdecf5ed65a5cd5bc71794b4028052af771fdfd4ad2d8ff751324bbb
MD5 c99993fc4a126cdb6e37c3fafc5be80a
BLAKE2b-256 4cbda0ac0b8fd8335f789231937a4256f446e9b10e3c69eec8ed0eeaff19c89e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page