Skip to content

Repository files navigation

FieldStack

Reusable R notebooks, scripts, and tools for applied data work and evaluation.

Part of OpenStacksLicense: MITDOI

Built for use in the field — across health, gender, climate, and education programs in South Asia.


What This Is

FieldStack is a collection of R notebooks, scripts, and sample data for applied research and evaluation work. It covers regression analysis, cost-effectiveness, qualitative coding, data visualisation, and reporting — all grounded in real South Asian fieldwork needs.

This is the applied research layer of OpenStacks for Change — an open ecosystem of tools for public interest research and evaluation.

What's Inside

Core Scripts

DirectoryWhat It DoesStatus
scripts/Index functions: health access, climate vulnerability, education outcomes, MEL reshapingReady
notebooks/4 Quarto notebooks: education summary, public health index, climate risk, MEL dashboardReady
regression/Logistic models, interaction terms, multicollinearity checks (VIF)Ready
evaluation/SROI calculators, cost-effectiveness, qual-to-quant conversion, evaluation summariesReady
custom_viz/Waterfall charts, bullet charts, sf map visualisationReady
visualisation/ggplot2 dashboard bars, faceted plotsReady
qualitative/Qualitative coding with quanteda (corpus, tokens, DFM)Ready

Data and Testing

DirectoryWhat It Contains
sample_data/4 realistic datasets: climate exposure (150 rows), health services (200), education outcomes (200), MEL indicators (100)
codebook_templates/Variable metadata for health surveys and programme monitoring
tests/9 testthat unit tests covering all core functions

Survey Tools

ScriptWhat It Does
survey_tools/sample_size_calculator.RSimple, stratified, and cluster sampling calculations with design effect
survey_tools/sampling_weights.RBase weight calculation, trimming, weighted summary statistics
survey_tools/survey_summary.RSurvey design objects, weighted descriptives, proportions using the survey package

Automated Reporting

FileWhat It Does
automated_reporting/render_reports.RBatch Quarto/RMarkdown rendering with logging
automated_reporting/monthly_summary.qmdQuarto template for monthly indicator summary with inline plots

Supporting

DirectoryWhat It Contains
python_integration/R-Python interop via reticulate

Getting Started

Prerequisites

  • R 4.0+ with RStudio or VS Code
  • Key packages: tidyverse, haven, survey, ggplot2, quarto, testthat
  • Optional: reticulate (for Python integration), sf (for mapping)

Quick Start

# Clone and exploregitclonehttps://github.com/Varnasr/FieldStack.gitcdFieldStack# Open any notebook in RStudio# Start with notebooks/ for guided analysis examples# Use sample_data/ to test before using your own data# Run the test suite
source("tests/run_all_tests.R")

Typical Workflow

  1. Pick a notebook from notebooks/ that matches your analysis need
  2. Load sample data from sample_data/ to test the workflow
  3. Replace with your own data and adapt the analysis
  4. Use custom_viz/ for publication-ready charts
  5. Generate reports with automated_reporting/

How It Connects

FieldStack is one of several stacks in the OpenStacks ecosystem:

StackFocus
InsightStackMEL tools, calculators, documentation
FieldStack (this repo)R notebooks for fieldwork and evaluation
EquityStackPython workflows for development data
SignalStackResearch Rundown newsletter archive

Use FieldStack when you need R-based analysis tools. Use EquityStack for Python/Jupyter equivalents. Use InsightStack for Stata tools and MEL calculators.

Contributing

Contributions welcome — especially from field researchers and evaluators. See CONTRIBUTING.md.

High-impact areas:

  • Survey design — sample size calculators, PSU allocation, sampling frameworks
  • Simulation — Monte Carlo scripts for evaluation design
  • Visualisation — heatmaps, treemaps, time series templates
  • R notebooks from your own evaluation work (anonymised)

Citation

@software{fieldstack,
author = {Sri Raman, Varna},
title = {FieldStack: R Tools for Applied Development Research},
url = {https://github.com/Varnasr/FieldStack},
doi = {10.5281/zenodo.15250764}
}

License

MIT — free to use, modify, and share. See LICENSE.


Part of OpenStacks for Change. Created by Varna Sri Raman.

About

Reusable R notebooks, scripts, and tools for applied data work and evaluation. Part of OpenStacks for Change.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages