Code Monkey home page Code Monkey logo

epysurv's Introduction

Binder Documentation Status Conda Installation Build Status codecov Language grade: Python Code style: black

epysurv

epysurv is a Pythonic wrapper around the R surveillance package that strives to implement a scikit-learn like API for epidemiological surveillance in Python.

In a nutshell

from epysurv import data as epidata
from epysurv.models.timepoint import FarringtonFlexible
train, test = epidata.salmonella()
train.head()
#             n_cases  n_outbreak_cases  outbreak
# 2004-01-05        0                 0     False
# 2004-01-12        0                 0     False
# 2004-01-19        2                 0     False
# 2004-01-26        2                 0     False
# 2004-02-02        1                 0     False    
model = FarringtonFlexible()
model.fit(train)
model.predict(test)
#             n_cases  n_outbreak_cases  outbreak  alarm
# 2011-01-03        1                 0     False    0.0
# 2011-01-10        0                 0     False    0.0
# 2011-01-17        3                 0     False    0.0
# 2011-01-24        3                 0     False    0.0
# 2011-01-31        3                 0     False    0.0

Installation

As epysurv requires both Python and R it can only be conveniently installed through conda:

conda install -c conda-forge epysurv 

Documentation

You can read the documentation or try an interactive demo on binder.

Development

To set up a local development environment, run

conda env create -f env.yml
conda activate epysurv-dev
pip install -r requirements-dev.txt
pre-commit install 

To run all tests, simply run

pytest

in the project's root directory.

If you want to contribute to the documentation, run

pip install -r requirements-doc.txt

to install the necessary packages for building the sphinx documentation.

Pull requests are highly welcome!

Related Projects

epysurv's People

Contributors

aauss avatar burgersmoke avatar jarnorfb avatar justinshenk avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.