Coder Social home page Coder Social logo

argus's Introduction

Build Status Build status Coverage Status CRAN_Status_Badge

reconhub

This packages installs and loads all stable RECON packages similiar to the tidyverse package.

Installing the package

To install the current stable, CRAN version of the package, type:

install.packages("reconhub")

To benefit from the latest features and bug fixes, install the development, github version of the package using:

devtools::install_github("reconhub/reconhub")

Note that this requires the package devtools installed.

What does it do?

# attaches all stable recon packages
library(reconhub)
## Attaching package epicontacts

## Attaching package outbreaks

## Attaching package incidence

Also, you can install all development versions of RECON packages:

reconhub::install_dev_versions()

Getting help online

Bug reports and feature requests should be posted on github using the issue system. All other questions should be posted on the RECON forum:
http://www.repidemicsconsortium.org/forum/

Contributions are welcome via pull requests.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

argus's People

Contributors

eotin avatar marekrogala avatar olgamie avatar snsteamlyon avatar thibautjombart avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

snsteamlyon eotin

argus's Issues

Make script: epidemiological summary (epicurves, alerts ...)

Objective

Get an epidemiological overview on suspect trends across the country.

How to identify suspect trends

  • Reported value >= threshold for a variable in the 12 previous weeks
  • More sophisticated algorithm to detect unexpected and suspicious trends

Requisites

As much information as possible in one screen. Adapted for low internet connection.

Input

  • diseases to be reported (sesdashboard_diseases, sesdashboard_diseasevalues)
  • thresholds (sesdashboard_thresholds)
  • list of sites (sesdashboard_sites_relationship, sesdashboard_indicatordimdate)
  • validated data (sesdashboard_fullreport, sesdashboard_report, sesdashboard_partreport, sesdashboard_reportvalues)
  • received alerts (sesdashboard_alert)

Proposed output

format

  • HTML output
  • zip folder with tables and charts available

content

For each condition/disease (diseaseThreshold_W12$disease) and location with suspect trends:

  • 1 graph for the whole country (diseaseThreshold_W12) :
  • x: 12 previous epi weeks (diseaseThreshold_W12$week)
  • y: nb of occurence for the variable having reached a threshold (diseaseThreshold_W12$occurence)
  • label: % and nb of reports received and validated out of the number of expected reports for the period (reportingValues_W12_overall$nbReceivedValidated /reportingValues_W12_overal$nbExpected for reportingValues_W12_overal$level==1) .
  • 1 map per disease (diseaseThreshold_W2$disease) (if at least one case in the two previous week):
  • nb of cases in the two previous week (diseaseThreshold_W2$occurence diseaseThreshold_W2$longitude $latitude if several sites have the same longitude/latitude you need to add the nb of cases for these coordinates)
  • label: % and nb of reports received and validated out of the number of expected reports for the two previous weeks (reportingValues_W12$nbReceivedValidated /reportingValues_W12$nbExpected for reportingValues_W12$level==1 AND reportingValues_W12$week %in% the two previous weeks(two last values of numSem_W12).

Always present:

  • List of sites with values above thresholds for the two previous week (rows of diseaseThreshold_W2 for which $occurence>=$threshold_value)
  • Name of the parent site (diseaseThreshold_W2$name_parentSite)
  • Name of the site (diseaseThreshold_W2$siteName)
  • Contact name (diseaseThreshold_W2$contact)
  • Contact phone (diseaseThreshold_W2$phone)
  • Disease, variable and value >= threshold (diseaseThreshold_W2$disease , diseaseThreshold_W2$variable , diseaseThreshold_W2$occurence)
  • List of alerts receives since 10 days
  • Name of the parent site (alertList_D10$name_parentSite)
  • Name of the site (alertList_D10$name_Site)
  • Contact name (alertList_D10$contactName)
  • Contact phone (alertList_D10$contactPhoneNumber)
  • Text of the alert (alertList_D10message*)
  • 1 table with cumulative cases since the beginning of the year for the country and for the previous year for the same period (tableBeginYear):
  • columns: one column per year.
  • rows: one raw per disease (all diseases) (tableBeginYear$name).
  • content: cumulative number from the beginning of the year to the previous week.
  • First Row: % and nb of reports received and validated out of the number of expected reports for the period for each year (for the previous year: reportingValues_YR_previous$nbReceivedValidated / reportingValues_YR_previous$nbExpected for reportingValues_YR_previous$level==1 for the current year: reportingValues_YR$nbReceivedValidated / reportingValues_YR$nbExpected for reportingValues_YR$level==1)
  • Label: period of interest ("Week 1" to weekEnd):

Make script: administrative monitoring of the surveillance system (completeness/timeliness/silent sites)

Objective

Get a monitoring of how the surveillance system is functioning across the country.

Completeness and timeliness definitions

  • completeness of data reporting = 100 x (No. of reports received from leaf sites within area X during period T / Total no. of reports expected from leaf sites within area X during period T).
  • timeliness of data reporting = 100 x (No. of reports received on time from leaf sites within area X during period T / Total no. of reports expected from leaf sites within area X during period T).
  • completeness of data review for a parent site C during a period T = 100 x (No. of reports reviewed by a parentsite X during period T / Total no. of reports received by parentsite X during period T).
  • timeliness of data review for a parent site X during a period T = 100 x (No. of reports reviewed on time for a parentsite X during period T / Total no. of reports received on time by parentsite X during period T)
    For the first intermediate level, the reports received on time are those sent on time by the reporting sites. For the second intermediate level, the reports received on time are those validated on time by the first intermediate level. ...

Requisites

As much information as possible in one screen. Adapted for low internet connection.

Input

  • list of sites (sesdashboard_sites_relationship, sesdashboard_indicatordimdate)
  • weekly deadline for data reporting and data validation (sesdashboard_sites)
  • received and reviewed reports(sesdashboard_fullreport)
  • contacts of sites (sesdashboard_contacts)

Proposed output

format

  • HTML output
  • zip folder with tables and charts available

content

  • 1 graph for the central level ($level==1)
  • x: 12 previous epi weeks (reportingValues_W12$week)
  • y (0-100%):
    • completeness of data reporting (reportingValues_W12$compReport)
    • timeliness of data reporting (reportingValues_W12$timeReport)
  • label: nb of expected reports for the whole period (reportingValues_W12_overall$nbExpected).
  • 1 histogram for all sites at the first intermediate level, group the sites by parent sites (reportingValues_W12_overall$FK_ParentId) with if possible the name of the parent site (reportingValues_W12_overall$reference[which(reportingValues_W12_overall$FK_ParentId==XXX)]) :
  • x: each parent site at the first intermediate levels (max(reportingValues_W12_overall$level))
  • y (0-100%):
    • overall completeness of data reporting (reportingValues_W12_overall$compReport)
    • overall timeliness of data reporting (reportingValues_W12_overall$timeReport)
  • 1 histogram for all parent sites in charge of reviewing the reports (at all levels above the reporting sites)
  • x: each parent site starting from central level (reportingValues_W12_overall$level==1) and ending by the first intermediate levels (max(reportingValues_W12_overall$level))
  • y: (0-100%):
    • overall completeness of data review for the 12 previous weeks (reportingValues_W12_overall$compReview)
    • overall timeliness of data review for the 12 previous weeks (reportingValues_W12_overall$timeReview)
  • List of reporting sites without any report received for >= 3 weeks grouped by first intermediate level (noReport_W3)
  • Name of the parent site (noReport_W3$name_parentSite)
  • Name of the site with no reporting (noReport_W3$siteName)
  • Contact name (noReport_W3$contact)
  • Contact phone (noReport_W3$phone)
  • List of reporting sites without any report received for >= 8 weeks grouped by first intermediate level (noReport_W8)
  • Name of the parent site (noReport_W8$name_parentSite)
  • Name of the site with no reporting (noReport_W8$siteName)
  • Contact name (noReport_W8$contact)
  • Contact phone (noReport_W8$phone)

Make summary dashboard

Objective

Get a short summary on the situation at each level n starting from the first intermediate level.

Requisites

As much information as possible in one screen. Adapted for low internet connection.
One dashboard will be created for each level n starting from the first intermediate level.
When someone from a specific level access the system, its tailored short summary will appear.

Input

  • list of sites: sesdashboard_sites
  • validated data:
    • sesdashboard_fullreport
    • sesdashboard_report
    • sesdashboard_partreport
    • sesdashboard_reportvalues
    • tables for thresholds
  • received alerts
    • ses_data

Proposed output

format

  • HTML output
  • zip folder with tables and charts available

content

  • Figures of completeness and timeliness of data reporting and data validation at the level n and the level n-1 below (except the peripheral level).
  • Figures of the number of alerts received on the previous week at the level n, with distribution by levels n-1.
    For each condition/disease and location with suspect trends:
  • Name of the diseases with suspect trends + name of levels n-1 with diseases with suspect trends.

Integration R/Argus

Through a CRON job, R would run scripts which will update files in dedicated folders.
Argus will then be able to display and/or permit the download of these files.

R outputs:

HTML +/- PDF and ZIP folders with tables/figures.

Factors to be taken into account:

  • Straightforward manner to add a new R script without the need for additional development.
  • Possibility to check error/warnings messages :
    • export error/warning messages to a specific text file?
  • Possibility to configure the scripts:
    • configuration file available in a specific folder?
  • Possibility to download needed libraries.

Create administrative dashboard first iteration

Create markdown report using flexdashboard with contant from #2

  • 1 graph for the central level ($level==1)
    x: 12 previous epi weeks (reportingValues_W12$week)
    y (0-100%):
    completeness of data reporting (reportingValues_W12$compReport)
    timeliness of data reporting (reportingValues_W12$timeReport)
    label: nb of expected reports for the whole period (reportingValues_W12_overall$nbExpected).

  • 1 histogram for all sites at the first intermediate level, group the sites by parent sites (reportingValues_W12_overall$FK_ParentId) with if possible the name of the parent site (reportingValues_W12_overall$reference[which(reportingValues_W12_overall$FK_ParentId==XXX)]) :
    x: each parent site at the first intermediate levels (max(reportingValues_W12_overall$level))
    y (0-100%):
    overall completeness of data reporting (reportingValues_W12_overall$compReport)
    overall timeliness of data reporting (reportingValues_W12_overall$timeReport)

  • 1 histogram for all parent sites in charge of reviewing the reports (at all levels above the reporting sites)
    x: each parent site starting from central level (reportingValues_W12_overall$level==1) and ending by the first intermediate levels (max(reportingValues_W12_overall$level))
    y: (0-100%):
    overall completeness of data review for the 12 previous weeks (reportingValues_W12_overall$compReview)
    overall timeliness of data review for the 12 previous weeks (reportingValues_W12_overall$timeReview)

Add no report lists/tables to administrative report

Feedback from Jose

Chart 1:

  • Title: “Completeness and timeliness of weekly reporting for the whole country”
  • I would put the 2nd graph specifying the overall completeness and timeliness of reporting on its right.
  • X-axis-ticks lab: 2017 - W48 W49 W50 W51 W52 2018 - W1 W2 …
  • X-axis lab: “Epidemiological week number”
  • Y-axis lab: %
  • Legend lab 1: “Completeness of weekly reporting” / Legend lab 2: “Timeliness of weekly reporting”

Chart 2:

  • Title: “Overall completeness and timeliness of weekly reporting from week XX (YEAR) to week XX (YEAR)”
  • Legend lab 1: “Completeness of weekly reporting” / Legend lab 2: “Timeliness of weekly reporting”
  • Y-axis lab: %
  • I would add also the values for the whole country as the first histogram (level==1)
  • X axis lab: no label needed

Chart 3:

  • Title: “Overall completeness and timeliness of data review at each level from week XX (YEAR) to week XX (YEAR)”
  • Legend lab 1: “Completeness of data review” / Legend lab 2: “Timeliness of data review”
  • Y-axis lab: %
  • X axis lab: no label needed.
  • See comment above to accommodate additional sites. Group them by level in different plots? Different type of graph?

List of silent sites:

  • The filtering was a good idea, but we will keep the two lists separated (one on the left and one on the right?).
  • Title list 1: “Silent sites: reporting sites with no reports received for 8 weeks and longer”.
  • Title list 2: “Silent sites: reporting sites with no reports received for 3 weeks and longer”.
  • You can remove the column Parent Site Id, and the rownname column.
  • New columns name: “Area”, “Site name”, “Contact”, “Phone”.

Add toy SQL database to play with

We need to add a toy example of an SQL database which will be used in the various scripts. Ideally this should contain, in a separate folder:

  • a mySQL database
  • a spreadsheet (or other document) documenting the content of the database
  • a R script showing how to import data from the database into a data.frame

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.