-
Notifications
You must be signed in to change notification settings - Fork 13
Directory Structure
Here is the current structure (20/09/2019).
The key components of the package are in
-
R/ – all the functions for ITHIM-R, with (generally) one file per function and the filename the same as the function name
-
inst/extdata/ – all the processed data we use for case studies, which is subdivided into local/ and global/.
-
global/ – the dose–response relationships and, for now at least, emissions. (These data could potentially be moved to data/ and be loaded automatically with the library.)
-
-
local/ – are location-specific folders, e.g. accra/. Within each folder should be the same input files - same naming conventions, same structures.
-
docs/ – pkgdown documentation
-
man/ – Rd documentation
The things that are just for us/for our development:
-
tests/testthat/ – old tests, not in use
-
code/ – our data processing scripts - subdivided by module and city
-
data/ – some of our raw data, to be processed by ‘code’ and saved in ‘inst/extdata/’
-
results/ – our own results
-
diagnostic/ – another internal testing place
-
project_mgmt/ – files to help us organise our project
below contents are produced in this gdoc:docs.google.com/document/d/1K1CAymRdae3Dx8ReNB6VVqFr2PbbAmaj38JCzZf1BzU/edit#heading=h.gjdgxs (I use Rdoc format for proper - more or less - display of indented structure)
(indent using 4 spaces for each sub-level. Also 2 spaces after each line)
(the numbered text is from ITHIM R modules …and could be removed/cleaned eventually)
** Generic R-Package components**
Code (R/) Package Metadata (DESCRIPTION) Object documentation (man/) Vignettes (vignettes/) Testing (tests/) Namespaces (NAMESPACE) Data (data/) Compiled code (src/) Installed files (inst/) _Other components_ User interface (shiny/)
**Folder/Directory structure ITHIM-R**
Root-directory
ITHIM-R/
(Everything related to external data, i.e. user input data, generic data used by the tool, and their various formats, implications, metadata)
DATASOURCES/
R/ shiny/ data/ international_data/ demographics/ travel/ physical_activity/ other/ local_data/ demographics/ case_study_name/ zurich/ travel/ case_study_name/ zurich/ physical_activity/ case_study_name/ zurich/ other/
(The process of adjustments, calibration of international, national data to local settings of a specific ITHIM application. This may include spatial scaling, temporal extrapolation, adjustment for population attributes, etc.)
LOCALIZATION/
R/ shiny/ data/ localized_data/ demographics/ case_study_name/ zurich/ travel/ case_study_name/ zurich/ physical_activity/ case_study_name/ zurich/ other/
(The process of conversion or matching of various data formats and variable definitions of external data to the generic data formats used in ITHIM (e.g. mode categories))
HARMONIZATION/
R/ shiny/ data/ harmonized_data/ demographics/ case_study_name/ zurich/ travel/ case_study_name/ zurich/ physical_activity/ case_study_name/ zurich/ other/
-
**Synthetic Baseline Data** (i.e. individual data, vehicle data, crash data)
1. The process of creating a **[[Synthetic population]]** (sample of 10k individuals), through probabilistic matching of separate input data from population, travel, and health surveys, for baseline.
SYNTHPOP/
R/ shiny/ data/ synthpop_data/ baseline/ case_study_name/ zurich/ 2. The creation of a **[[Vehicle distance dataset]]** based on travel behaviour, occupancy factors, and transport statistics, for baseline.
VEHDIST/
R/ shiny/ data/ vehdist_data/ baseline/ case_study_name/ zurich/ 3. The creation of a **[[Who-hit-whom matrix]]** based on crash statistics, for baseline.
CRASHMATRIX/
R/ shiny/ data/ crashmatrix_data/ baseline/ case_study_name/ zurich/
-
**Scenario Definition** (Creation of “Synthetic counterfactual data”) (2 options:)
1. Manipulation of baseline data through a **[[Scenario definition module]]** (interface or code). 2. Creation of **[[Synthetic scenario data]]**, based on local data sources, analogous to steps for baseline data above.
SCENARIO/
R/ shiny/ data/ synthpop_data/ baseline/ scenario/ case_study_name/ zurich/ vehdist_data/ baseline/ scenario/ case_study_name/ zurich/ crashmatrix_data/ baseline/ scenario/ case_study_name/ zurich/
-
**Environmental Impacts Calculations**
1. **[[Carbon emissions]]**
CARBON/
R/ shiny/ data/ carbon_data/ 1. **[[Background AP concentration]]** (i.e. as affected under scenario conditions)
APBG/
R/ shiny/ data/ AP_data/
-
**Exposure Calculations** for each scenario (for baseline only as needed beyond Synthetic Baseline Data)
1. [[Exposure calculation for PA]] (calculation of total METhrs/week or similar)
PAEXP/
R/ shiny/ data/ PAexp_data/ 1. [[Exposure calculation for AP]] (calculation of long term exposure equivalents, PM2.5,..)
APEXP/
R/ shiny/ data/ APexp_data/
-
**Impact Calculations**
A. **[[Health Impact Calculations (PA, AP)]]** 1. Calculation of Potential Impact Fractions (**PIF**s) 2. Application of PIFs (or PAFs) to either: 1. GBD-derived rates of various outcomes (YLL, YLD, deaths), or 2. Proportionate Multi-State Life Table calculations
IMPACTS_PA_AP/
R/ PAF/ PIF/ MSLT/ B. **[[Injury Impact Calculations (Crashes)]]** 1. Events Calculation based on Who-hit-whom matrix 1. Conversion of injury events into various units of disease burdens (e.g YLLs)
IMPACTS_INJ/
R/ injevents/ injimpactunits/
(outcome definitions, level of detail, aggregation, visualization)
1. combined pathway results 1. pathway specific
RESULTS/
R/ shiny/ data/ pathway_results/ combined_results/
-
**Overarching modules**
-
User interface (including data visualization, explortation and validation features)
-
Tool Parameters (“is the math being done in miles or km?” A central place for default values, units, constants, assumptions to be called by various tool elements)
-
WEBSITE/
.…various/TBD
TOOLPARAMETERS/
.…data/
-
**Overarching project domains**
-
Dissemenination
-
Case studies/applications
OTHER/..
-
Overarching modules
-
Overarching project domains
- Coding guidelines
- Documentation
- Scientific publications
- Dissemination
- Case studies/applications