Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split sitrep into smaller unit packages #134

Open
zkamvar opened this issue Jul 2, 2019 · 4 comments
Open

Split sitrep into smaller unit packages #134

zkamvar opened this issue Jul 2, 2019 · 4 comments
Labels
good for code contributions These are safe for anyone to work on and will be useful help wanted Extra attention is needed question Further information is requested

Comments

@zkamvar
Copy link
Member

zkamvar commented Jul 2, 2019

Currently sitrep does a few disparate things:

  • provides inline styling of numbers with the fmt_count() family of functions
  • tabulates linelist data with descriptive()
  • tabulates survey data with tabulate_survey()
  • plots age pyramids with plot_age_pyramid()
  • generates fake data sets and surveys
  • provides a parser for the MSF dictionaries
  • creates age categories and groups them into a single variable
  • provides helpers to calculate proportions (CFR, etc...)

It's safe to say that some of these can be broken into different packages because there are currently 34 packages that we import (which is not the number of packages that get installed).

When we know these templates are working, it would be a good idea to split some of these up into smaller packages that are viable stand-alone CRAN packages that sitrep can depend on (a la a kind of 'tidyverse' for epi packages).

@zkamvar zkamvar added help wanted Extra attention is needed question Further information is requested good for code contributions These are safe for anyone to work on and will be useful labels Jul 2, 2019
@aspina7
Copy link
Member

aspina7 commented Jul 3, 2019

big like! definitely the way to go

@aspina7
Copy link
Member

aspina7 commented Dec 10, 2019

So we need to think about how to break things up. (names are all crap and need thinking but ignore for now)
templates can be a standalone package (which also includes the gen_* functions?)
age_pyramid could be a standalone package
helpers could include inline code and the augments, age_categories
outbreaks could include all the functions from outbreaks (tab_linelist, tab_univariate, attack_rate etc)
survey includes all the functions for survey analysis

@aspina7
Copy link
Member

aspina7 commented Oct 12, 2020

So i think we can do the following:

move from {sitrep} to {epikit} (also see #269):

  • add_weights_cluster.R
  • add_weights_strata.R
  • find_date_cause.R
  • gen_population.R
  • gen_polygon.R
  • zcurve.R

can be removed from {sitrep} as not using:

  • sample-size.R

move from {sitrep} to {epidict}:

  • msf_dict_rename_helper.R

move from {sitrep} to {apyramid} (also see #281)

  • age-pyramid.R

can be removed from {sitrep} as is part of {epidict}:

  • gen_eligible_interviewed.R

and we can leave the following in {sitrep}: NEED TO UPDATE EXPORTED FUNCTIONS

  • check_templates.R
  • epibuffet_exports.R -> epitabulate_exports.R
  • epidict_exports.R
  • epikit_exports.R
  • sitrep-package.R

aspina7 added a commit to R4EPI/epikit that referenced this issue Nov 27, 2021
aspina7 added a commit to R4EPI/epikit that referenced this issue Nov 27, 2021
aspina7 added a commit to R4EPI/epidict that referenced this issue Nov 27, 2021
aspina7 added a commit that referenced this issue Nov 27, 2021
aspina7 added a commit that referenced this issue Nov 27, 2021
@aspina7
Copy link
Member

aspina7 commented Feb 3, 2023

#315
R4EPI/epikit#32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good for code contributions These are safe for anyone to work on and will be useful help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants