diff --git a/ISSUE_TEMPLATE/repo-readiness-checklist.md b/ISSUE_TEMPLATE/repo-readiness-checklist.md index 6ff4ecb..671c6b1 100644 --- a/ISSUE_TEMPLATE/repo-readiness-checklist.md +++ b/ISSUE_TEMPLATE/repo-readiness-checklist.md @@ -7,7 +7,7 @@ assignees: '' --- -# ๐Ÿ—‚๏ธ Repo Hygiene Checklist +# Repo Hygiene Checklist - [ ] LICENSE.md present (MIT) - [ ] README.md complete (badges, overview, folders) diff --git a/KM_tools/README.md b/KM_tools/README.md index 1e2e8f9..6423fc3 100644 --- a/KM_tools/README.md +++ b/KM_tools/README.md @@ -1,19 +1,14 @@ # KM_tools -Conventions for organising a project's files so that a location says what a -file is and a newcomer can find last year's endline without asking. +Conventions for organising a project's files. | File | What it is | -|---|---| -| `folder_structure_template.md` | One structure, numbered in workflow order, with the rules that make it hold: raw data never edited, every output generated by a script | -| `readme_template.md` | The two-page README a project folder starts with: people, where things are, codes, how to run the analysis | -| `file_naming_conventions.md` | `project_doctype_scope_version` and why | +| --- | --- | +| `folder_structure_template.md` | One structure, numbered in workflow order | +| `readme_template.md` | A two-page README for a project folder: people, where things are, codes, how to run the analysis | +| `file_naming_conventions.md` | `project_doctype_scope_version` | | `tagging_structure_guidance.md` | Tag axes for a document store: theme, geography, stage, type, audience | | `documentation_flowchart.pdf` | The path from draft to final for a brief, deck or report | -Two rules do most of the work. Raw data is never edited; anything wrong with -it is fixed by a script that writes somewhere else. And every table and -figure in a report was produced by a script that is still in the folder. A -project that keeps those two can be handed over, replicated -(`../replication/`), and audited. One that does not has a set of files that -only one person understands. +Two rules: raw data is never edited, and every table and figure in a report +comes from a script that is still in the folder. diff --git a/README.md b/README.md index 5f23798..4170a28 100644 --- a/README.md +++ b/README.md @@ -1,117 +1,92 @@ # InsightStack -**MEL tools, calculators, and research documentation for development work.** +MEL tools, calculators, research documentation and loaders for survey +microdata, in Stata, Python, R and SPSS. Part of +[OpenStacks](https://openstacks.dev). Status: Stable, per the family +[maintenance policy](https://github.com/Varnasr/OpenStacks-for-Change/blob/main/MAINTENANCE.md). +DOI: [10.5281/zenodo.15245182](https://doi.org/10.5281/zenodo.15245182). + +Site: [varnasr.github.io/InsightStack](https://varnasr.github.io/InsightStack/). + +## Code and data + +| Directory | What it does | Language | +| --- | --- | --- | +| `data_starters/` | Loaders for DHS (28 surveys, seven South Asian countries) and PLFS (India) that open the files as distributed, with the weight and scale rules applied. Tested on synthetic fixtures; no data ships | Stata, R, Python | +| `calculators/` | Six browser calculators for district planning: population projection, school needs, banking access, district health indicators, block-level estimates, environmental fragility | HTML, JavaScript | +| `econometrics/` | Difference-in-differences, propensity score matching, instrumental variables, regression discontinuity, sensitivity analysis, with sample data | Python, R | +| `stata_snippets/` | 44 do-files: data management, descriptives, regression, impact evaluation, graphs, survey settings | Stata | +| `spss_scripts/` | 20 files: cleaning, recoding, tabulation, regression, Excel export | SPSS | +| `network_effects_sni/` | Centrality, peer association with leave-one-out means, and threshold diffusion for self-help group data. 17 tests | Python | +| `data_validation/` | Checks from a data dictionary: duplicates, required fields, ranges, allowed values, types, column set, cross-file ids. One row per problem. 18 tests | Python; Stata, R, SPSS companions | +| `label_variables/` | Variable and value labels from a dictionary, written into `.dta` and `.sav`. 8 tests | Python; Stata, R, SPSS companions | +| `survey_to_codebook/` | An XLSForm to a Markdown codebook and a label dictionary. 9 tests | Python | +| `replication/` | A replication package with one entry point, a recorded result and an R cross-check. 4 tests | Python, R | +| `vensim/` | Eight system dynamics models | Vensim | + +## Documents and notes + +| Directory | What it holds | +| --- | --- | +| `tool_notes/` | Nine notes on visual and document tools (Excalidraw, Kumu, Observable, RawGraphs, Flourish, Power BI, Miro, Excel, LaTeX), each with one example file | +| `writing_guides/` | Theory of change, results chain, evaluation report structure, policy brief, writing about uncertainty | +| `eval_docs/` | Logframe, indicator reference sheet and MEL framework templates, with a completed example | +| `annotated_research/` | Five illustrative research briefs annotated with one eight-tag scheme | +| `learning_layers/` | Learning in the MEL cycle as scheduled decisions | +| `KM_tools/` | Folder structure, README template, file naming, tagging | +| `taguette_coding/` | One focus group coded in Taguette, with the method | +| `visual_ethnography_descript/` | Recorded interviews: consent, transcription, clips, quotes | +| `learning_library/` | PDFs and guides in five categories | + +## Tests -[![Part of OpenStacks](https://img.shields.io/badge/Part%20of-OpenStacks-blue)](https://openstacks.dev) -[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE) -[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.15245182.svg)](https://doi.org/10.5281/zenodo.15245182) -[![Status: Stable](https://img.shields.io/badge/Status-Stable-0969da?style=flat-square)](https://github.com/Varnasr/OpenStacks-for-Change/blob/main/MAINTENANCE.md) - -> In development work, we talk about knowledge โ€” but rarely structure it. InsightStack organises the tools, templates, and workflows that make research, evaluation, and program design actually work. - -> **Status: Stable.** This repository works and is correct, but it is not under active -> development. Bug reports are welcome and issues stay open; new features are unlikely, -> and replies are measured in weeks rather than days. Dependencies are pinned deliberately -> so that a clone still runs years from now. See the [maintenance policy](https://github.com/Varnasr/OpenStacks-for-Change/blob/main/MAINTENANCE.md). - ---- - -## What This Is - -InsightStack is a collection of practical scripts, templates, and tools for **monitoring, evaluation, and learning (MEL)** work in the development sector. It covers data validation, survey analysis, system dynamics modelling, network analysis, qualitative coding, and visual storytelling. - -This is the **knowledge systems layer** of [OpenStacks for Change](https://openstacks.dev) โ€” an open ecosystem of tools for public interest research and evaluation. - -## What's Inside - -### Analysis Tools - -| Directory | What It Does | Language | Status | -|-----------|-------------|----------|--------| -| `data_starters/` | Loaders for real public-use survey microdata, one folder per dataset. DHS across South Asia, and PLFS | Stata, R, Python | Ready | -| `calculators/` | District-level calculators for health, education, finance, environment, and population | HTML, JavaScript | Ready | -| `data_validation/` | Rule-driven validation from a data dictionary: duplicates, required, ranges, allowed values, types, name style, column set, cross-file ids; one issue row per problem, by identifier | Python (18 tests); Stata, R, SPSS companions | -| `stata_snippets/` | Reusable Stata code: data management, graphs, regression, impact evaluation, surveys | Stata | Ready | -| `spss_scripts/` | Survey analysis syntax: cleaning, regression, missing data, frequencies | SPSS | Ready | -| `network_effects_sni/` | Peer effects estimation, centrality analysis, diffusion modelling for SHG networks | Python | Ready | -| `replication/` | A replication package that verifies itself: one entry point, a recorded result, a Python-against-R cross-check, and a test that the verification can fail | Python, R (4 tests) | -| `label_variables/` | Variable and value labels from a dictionary, written into `.dta` and `.sav` where they survive; round-trips both ways | Python (8 tests); Stata, R, SPSS companions | -| `survey_to_codebook/` | XLSForm to Markdown codebook and to a label dictionary; resolves groups, repeats and choice lists; reports form defects | Python (9 tests) | -| `econometrics/` | Causal inference: DiD, PSM, IV/2SLS, RDD, sensitivity analysis โ€” with Python, R, and sample data | Python, R | Ready | - -### Visual and Interactive Tools - -| Directory | What It Does | Tool | -|-----------|-------------|------| -| `vensim/` | 8 system dynamics models (health, agriculture, climate, migration, education) | Vensim | -| `tool_notes/` | Nine tool notes (Excalidraw, Kumu, Observable, RawGraphs, Flourish, Power BI, Miro, Excel, LaTeX): when each is worth the setup, when it is not, what goes wrong, with one worked file each | Notes | - -### Knowledge and Documentation - -| Directory | What It Contains | -|-----------|-----------------| -| `learning_library/` | Curated PDFs across 10 categories: programming, data science, research methods, AI tools, MLE resources | -| `writing_guides/` | Theory of change, results chain, evaluation report structure, policy brief, writing about uncertainty; the verb is decided by the design | Markdown | -| `eval_docs/` | Logframe template, indicator reference sheet, MEL framework outline, indicator guidance, with a completed example | Markdown, CSV, XLSX | -| `KM_tools/` | Folder structure, project README template, file naming, tagging | Markdown | -| `annotated_research/` | Five research briefs marked up with one eight-tag annotation scheme, weakest design to strongest; illustrative, for teaching critical reading | Markdown | -| `learning_layers/` | Embedding learning in the MEL cycle as scheduled decisions at three tempos | Markdown, PDF | -| `taguette_coding/` | One focus group coded start to finish in Taguette, with the method: frame first, double-code two transcripts, count carefully | Qualitative | -| `visual_ethnography_descript/` | From recording to clip to quote: three consents, quotes checked against audio, clips cut with context visible | Qualitative | -| `workflows/` | End-to-end analysis workflow guides | - -## Getting Started - -1. **Browse by need** โ€” Each directory is self-contained. Pick the tool that matches your task. -2. **Check the sample data** โ€” Use `sample_data/` and the test data in `data_validation/` to try scripts. -3. **Read the workflows** โ€” `workflows/` ties multiple tools together into end-to-end processes. - -### Prerequisites - -Different tools require different software: -- **Stata 15+** for Stata scripts and snippets -- **Python 3.8+** with pandas, statsmodels, networkx for Python scripts -- **R 4.0+** with tidyverse for R scripts -- **SPSS** for survey analysis syntax -- **Observable**, **Flourish**, **Miro**, **Kumu** accounts for visual tools (free tiers available) - -## How It Connects +``` +cd data_starters/dhs-south-asia && python make_fixture.py --outdir fixtures +python test_load_dhs.py && Rscript test_load_dhs.R +cd ../plfs-india && python make_fixture.py --outdir fixtures +python test_load_plfs.py && Rscript test_load_plfs.R +python -m network_effects_sni.test_network_effects +python data_validation/test_data_validation.py +python label_variables/test_label_variables.py +python survey_to_codebook/test_survey_to_codebook.py +python replication/test_replication.py +``` -InsightStack is one of several stacks in the [OpenStacks](https://openstacks.dev) ecosystem: +All of these run in CI on every pull request. The Stata files are not +tested, since Stata has no free runtime; each carries a fixture check at the +bottom. -| Stack | Focus | -|-------|-------| -| **InsightStack** (this repo) | MEL tools, calculators, research documentation, and loaders for real survey microdata. Stata, Python, R, SPSS | -| [FieldStack](https://github.com/Varnasr/FieldStack) | Field operations while a survey is being collected, and survey analysis after. R | -| [EquityStack](https://github.com/Varnasr/EquityStack) | Equity from a development economics perspective: distributional analysis, the concentration index, and design-based survey estimation. Python | +## Requirements -[openstacks.dev](https://openstacks.dev) is the index for all of it. [SignalStack](https://github.com/Varnasr/SignalStack) is the companion archive for the [Research Rundown](https://varna.substack.com) newsletter, alongside the stacks rather than one of them. [PolicyStack](https://github.com/Varnasr/PolicyStack) is superseded by [PolicyDhara](https://github.com/Varnasr/PolicyDhara). RootStack, BridgeStack and ViewStack are archived. +Stata 15 or later for the do-files. Python 3.8 or later with pandas, +statsmodels and networkx. R 4.0 or later with tidyverse, survey and haven. +SPSS for the syntax files. -## Contributing +## The family -Contributions welcome โ€” especially from practitioners who use these tools in real fieldwork. See [contributing guidelines](https://github.com/Varnasr/.github/blob/main/CONTRIBUTING.md) for guidelines. +| Repository | What it is for | Language | +| --- | --- | --- | +| **InsightStack** (this repository) | MEL tools, calculators, research documentation, loaders for survey microdata | Stata, Python, R, SPSS | +| [FieldStack](https://github.com/Varnasr/FieldStack) | Field operations while a survey is in the field; sampling and weighted estimation after | R | +| [EquityStack](https://github.com/Varnasr/EquityStack) | Inequality measurement and design-based survey estimation | Python | -High-impact areas: -- **Econometrics** โ€” causal inference implementations (DiD, PSM, IV, RDD) in Python, R, or Stata -- **Calculators** โ€” new district-level planning tools -- **Stata/SPSS scripts** โ€” analysis templates for common MEL tasks -- **Sample data** โ€” synthetic datasets for testing +[openstacks.dev](https://openstacks.dev) is the index. +[SignalStack](https://github.com/Varnasr/SignalStack) is the companion archive +for the [Research Rundown](https://varna.substack.com) newsletter, beside the +stacks rather than one of them. +[PolicyStack](https://github.com/Varnasr/PolicyStack) is superseded by +[PolicyDhara](https://github.com/Varnasr/PolicyDhara). RootStack, BridgeStack +and ViewStack are archived. -## Citation +## Citation and license ```bibtex @software{insightstack, author = {Sri Raman, Varna}, - title = {InsightStack: MEL Tools for Development Work}, + title = {InsightStack: MEL tools, calculators and survey data loaders}, url = {https://github.com/Varnasr/InsightStack}, doi = {10.5281/zenodo.15245182} } ``` -## License - -MIT โ€” free to use, modify, and share. See [LICENSE](LICENSE). - ---- - -Part of [OpenStacks for Change](https://openstacks.dev). Created by [Varna Sri Raman](https://on-web.link/varna). +MIT. See [LICENSE](LICENSE). diff --git a/annotated_research/README.md b/annotated_research/README.md index bca92f4..d508fdf 100644 --- a/annotated_research/README.md +++ b/annotated_research/README.md @@ -1,38 +1,25 @@ # annotated_research -Five research briefs marked up to show where they are strong and where they -are wrong, with one annotation scheme applied to all of them. - -The point is the scheme. Eight tags, each a question to put to any research -note that lands on your desk: what is it really asking, what is the -comparison, who is in the data, what was measured, is the arithmetic right for -the design, does it name its real weaknesses, does the conclusion's verb match -the design, and who consented. `annotation_scheme.md` defines them and says -how to teach with them. +Five research briefs marked up with one annotation scheme. Eight tags, each +a question to put to a research note: what is it asking, what is the +comparison, who is in the data, what was measured, is the arithmetic right +for the design, does it name its weaknesses, does the conclusion's verb match +the design, who consented. `annotation_scheme.md` defines them. | Brief | Design | Main lesson | -|---|---|---| +| --- | --- | --- | | `briefs/01_school_health_clubs.md` | Before-after, one arm | A year of growing up is inside the estimate | | `briefs/02_remedial_reading.md` | Difference-in-differences, matched | The baseline table contradicts the identifying assumption | | `briefs/03_flood_early_warning.md` | Post-event cross-section | The households not interviewed are the outcome | | `briefs/04_shg_savings.md` | Randomised by village | Differential attrition and unclustered errors on a good design | -| `briefs/05_cash_transfer_nutrition.md` | Regression discontinuity | A credible local estimate, extended past the population it identifies | - -Ordered from weakest design to strongest, so a reader who works through them -in sequence sees the ceiling on what each design can claim rise, and the -errors change from fatal to specific. - -**All five are illustrative.** The programmes, districts, organisations and -numbers are invented to make the teaching points. No brief describes a real -study or cites one. They are written the way such notes are actually written, -which is why each contains the errors real notes contain. +| `briefs/05_cash_transfer_nutrition.md` | Regression discontinuity | A credible local estimate extended past the population it identifies | -The original `annotated_research_brief_mhh.pdf` is the example this folder -started with and is kept as it was. +Ordered from weakest design to strongest. -## Using them +All five are illustrative. The programmes, districts, organisations and +numbers are invented. No brief describes or cites a real study. The original +`annotated_research_brief_mhh.pdf` is kept as it was. -Hand out a brief without its annotations. Have readers tag it themselves -using the scheme, then compare. Where two readers tag the same sentence -differently, the text is ambiguous, and the ambiguity is usually where the -misleading claim lives. +To teach with them, hand out a brief without its annotations, have readers +tag it with the scheme, and compare. Where two readers tag the same sentence +differently, the text is ambiguous. diff --git a/calculators/README.md b/calculators/README.md index c3b5cb0..a46a001 100644 --- a/calculators/README.md +++ b/calculators/README.md @@ -1,35 +1,18 @@ -# ๐Ÿงฎ Calculators for District and Program Planning +# Calculators -This folder contains practical tools for estimating health, education, infrastructure, and population needs at the district or block level โ€” especially in data-scarce environments. +Six browser calculators for district and block planning. Each folder holds +an HTML file that runs locally, a note on the logic, and a README. -These calculators are designed for use by: -- Program managers and MEL teams -- District planners or consultants -- NGOs and policy support groups -- Fellows or research trainees +| Folder | What it calculates | +| --- | --- | +| `population_projection/` | Future population at a constant annual growth rate | +| `education_needs/` | Schools needed from projected school-age population | +| `district_health_indicators/` | A district estimate from a state NFHS figure and three multipliers | +| `financial_inclusion/` | Banking access points against the number a population implies | +| `block_level_development/` | A district value split to blocks by population share | +| `environmental_change/` | A fragility score from rainfall, forest and water indicators | -Each subfolder includes: -- A working HTML calculator -- A markdown file explaining the logic -- A usage README +Each calculator states its assumptions on the page. Where a published +district figure exists, use that. ---- - -## ๐Ÿ“ Included Tools - -| Folder | What it Calculates | -|--------|--------------------| -| `education_needs/` | Projects number of schools needed based on population growth | -| `district_health_indicators/` | Estimates health indicators by adjusting NFHS data using local context | -| `financial_inclusion/` | Computes bank access gaps based on population norms | -| `environmental_change/` | Flags environmental fragility using rainfall, forest, and water indicators | -| `block_level_development/` | Disaggregates district-level values to blocks using population share | -| `population_projection/` | Forecasts future population using annual growth % - ---- - -Each calculator is **real**, **modular**, and **customizable**. They can be embedded, adapted, or scaled for dashboards, training kits, or planning exercises. - -MIT licensed. Attribution appreciated. - -Made with โ™ฅ by [Varna Sri Raman](https://on-web.link/varna) +MIT licence. diff --git a/calculators/block_level_development/README.md b/calculators/block_level_development/README.md index 9621ef8..062236b 100644 --- a/calculators/block_level_development/README.md +++ b/calculators/block_level_development/README.md @@ -1,10 +1,10 @@ -# ๐Ÿงฑ Block-Level Development Estimator +# Block-Level Development Estimator This tool helps estimate indicator values at the block level using population-based shares when district-level data is available but block data is missing. --- -## ๐Ÿ“ฆ Files +## Files - `block_level_development_calculator.html`: Interactive calculator - `block_level_development_logic.md`: Explanation of the estimation method @@ -12,7 +12,7 @@ This tool helps estimate indicator values at the block level using population-ba --- -## ๐Ÿง  How It Works +## How It Works Enter: - Total population of the district @@ -23,4 +23,4 @@ The tool will estimate the block-level equivalent using a simple proportional sh --- -๐Ÿ“ Assumes uniform distribution across blocks unless better data is available. + Assumes uniform distribution across blocks unless better data is available. diff --git a/calculators/block_level_development/block_level_development_logic.md b/calculators/block_level_development/block_level_development_logic.md index b8afe93..727020f 100644 --- a/calculators/block_level_development/block_level_development_logic.md +++ b/calculators/block_level_development/block_level_development_logic.md @@ -1,10 +1,10 @@ -# ๐Ÿงฑ Block-Level Development Estimation โ€“ Logic +# Block-Level Development Estimation โ€“ Logic This tool helps estimate block-level indicator values by disaggregating district-level data using population or area shares. --- -## ๐Ÿ”ข Inputs +## Inputs - Total District Population - Block Population @@ -12,7 +12,7 @@ This tool helps estimate block-level indicator values by disaggregating district --- -## ๐Ÿ“ˆ Disaggregation Logic +## Disaggregation Logic ### Method 1: Population-Based Disaggregation @@ -32,7 +32,7 @@ Block Estimate = District Value ร— Block Area Share --- -## ๐Ÿง  Example +## Example District has 600,000 population and 30 PHCs. A block with 75,000 population: diff --git a/calculators/district_health_indicators/README.md b/calculators/district_health_indicators/README.md index fb90aed..859b496 100644 --- a/calculators/district_health_indicators/README.md +++ b/calculators/district_health_indicators/README.md @@ -1,10 +1,10 @@ -# ๐Ÿฉบ District Health Indicator Estimator +# District Health Indicator Estimator This tool helps estimate district-level health indicators using state NFHS data and contextual adjustments. --- -## ๐Ÿ“ฆ Files +## Files - `health_indicators_calculator.html`: Calculator to adjust state NFHS values using contextual multipliers - `health_indicators_logic.md`: Markdown explanation of how the projection logic works @@ -12,20 +12,20 @@ This tool helps estimate district-level health indicators using state NFHS data --- -## ๐Ÿง  How It Works +## How It Works You enter: - State-level value (e.g., % of institutional deliveries from NFHS) - Contextual inputs: - - Health infrastructure (low/average/high) - - Road access (poor/average/good) - - Tribal/SC/ST population density (high/medium/low) + - Health infrastructure (low/average/high) + - Road access (poor/average/good) + - Tribal/SC/ST population density (high/medium/low) The calculator multiplies the state value by three factors to provide a district-specific estimate. --- -๐Ÿ“ Example: Chitrakoot, Uttar Pradesh + Example: Chitrakoot, Uttar Pradesh Assume state value is 72.4% for institutional deliveries, with: - Low infra (0.9) - Average roads (1.0) diff --git a/calculators/district_health_indicators/health_indicators_logic.md b/calculators/district_health_indicators/health_indicators_logic.md index 201373b..320b463 100644 --- a/calculators/district_health_indicators/health_indicators_logic.md +++ b/calculators/district_health_indicators/health_indicators_logic.md @@ -1,20 +1,20 @@ -# ๐Ÿฉบ District Health Indicator Projection โ€“ General Logic +# District Health Indicator Projection โ€“ General Logic This tool helps estimate district-level health indicators (e.g., immunization, maternal health) when only state-level NFHS data is available. It uses adjustment factors based on known district context. --- -## ๐Ÿ”ข Inputs +## Inputs 1. **State-level NFHS value** (e.g., institutional deliveries = 72.4%) 2. **Contextual Adjustments**: - - Health infrastructure (low / average / high) - - Road access (poor / average / good) - - Demographics (e.g. high tribal/SC/ST %) + - Health infrastructure (low / average / high) + - Road access (poor / average / good) + - Demographics (e.g. high tribal/SC/ST %) --- -## ๐Ÿ“ˆ How the Adjustment Works +## How the Adjustment Works We multiply the state value by an adjustment factor based on local context. For example: @@ -24,17 +24,17 @@ District Estimate = State Value ร— Adjustment Factor Each context input adjusts the factor slightly up or down: -| Factor | Low | Avg | High | +| Factor | Low | Avg | High | |-----------------------|---------|---------|---------| -| Health Infra | 0.9 | 1.0 | 1.1 | -| Road Access | 0.95 | 1.0 | 1.05 | -| Tribal/SC/ST Density | 0.9 | 1.0 | 1.1 | +| Health Infra | 0.9 | 1.0 | 1.1 | +| Road Access | 0.95 | 1.0 | 1.05 | +| Tribal/SC/ST Density | 0.9 | 1.0 | 1.1 | The final adjustment is the product of all applicable factors. --- -## ๐Ÿง  Example +## Example NFHS State Value (Institutional Deliveries): 72.4% Khunti has low infra (0.9), avg roads (1.0), and high tribal % (0.9): diff --git a/calculators/education_needs/README.md b/calculators/education_needs/README.md index da79704..edfe15a 100644 --- a/calculators/education_needs/README.md +++ b/calculators/education_needs/README.md @@ -1,10 +1,10 @@ -# ๐Ÿงฎ Education Needs Calculator +# Education Needs Calculator This tool estimates the number of schools needed in a district over a given period, based on growth in the school-age population (6โ€“14 years). --- -## ๐Ÿ“ฆ Files +## Files - `education_calculator.html`: Lightweight calculator (no login, no libraries needed) - `education_logic.md`: Full logic breakdown with formulas and generalization steps @@ -12,7 +12,7 @@ This tool estimates the number of schools needed in a district over a given peri --- -## ๐Ÿง  How It Works +## How It Works You enter: - Current school-age population @@ -25,4 +25,4 @@ The calculator projects population, computes schools needed, and shows the infra --- -๐Ÿ“ Example district used: *Chitrakoot, Uttar Pradesh* + Example district used: *Chitrakoot, Uttar Pradesh* diff --git a/calculators/education_needs/education_logic.md b/calculators/education_needs/education_logic.md index 5a7319f..fcedbde 100644 --- a/calculators/education_needs/education_logic.md +++ b/calculators/education_needs/education_logic.md @@ -1,54 +1,54 @@ -# ๐Ÿงฎ Education Needs Projection Calculator โ€“ General Logic +# Education Needs Projection Calculator โ€“ General Logic This tool helps districts or planners estimate how many schools are needed over a future period based on population growth and existing infrastructure. --- -## ๐Ÿ”ข Inputs Required +## Inputs Required 1. **Current school-age population** (ages 6โ€“14) 2. **Annual population growth rate** (e.g., 1.85%) 3. **Number of years to project** (e.g., 3 years from now) 4. **Current number of schools** by type: - - Primary - - Middle - - Secondary/Sr. Secondary + - Primary + - Middle + - Secondary/Sr. Secondary 5. **Norms**: max students per school (e.g., 150 per primary school) --- -## ๐Ÿ“ˆ Steps Used in Projection +## Steps Used in Projection 1. **Project population over N years**: - ``` - Year 1: P1 = P0 ร— (1 + g) - Year 2: P2 = P1 ร— (1 + g) - ... - Year N: PN = PN-1 ร— (1 + g) - ``` + ``` + Year 1: P1 = P0 ร— (1 + g) + Year 2: P2 = P1 ร— (1 + g) + ... + Year N: PN = PN-1 ร— (1 + g) + ``` - Where: - - P0 = current school-age population - - g = annual growth rate (in decimal) + Where: + - P0 = current school-age population + - g = annual growth rate (in decimal) 2. **Estimate schools needed**: - ``` - Schools Needed = Projected Population / Norm per School - ``` + ``` + Schools Needed = Projected Population / Norm per School + ``` - Apply separately for each school type if needed. + Apply separately for each school type if needed. 3. **Calculate school gap**: - ``` - Gap = Schools Needed - Current Number of Schools - ``` + ``` + Gap = Schools Needed - Current Number of Schools + ``` --- -## ๐Ÿง  Example +## Example If you have 92,000 children aged 6โ€“14 today, with a 1.85% growth rate, and want to project 3 years out: diff --git a/calculators/environmental_change/README.md b/calculators/environmental_change/README.md index 2ba3635..c66b4c0 100644 --- a/calculators/environmental_change/README.md +++ b/calculators/environmental_change/README.md @@ -1,10 +1,10 @@ -# ๐ŸŒฑ Environmental Change Risk Calculator +# Environmental Change Risk Calculator This tool estimates environmental fragility for a district using ecological indicators like forest cover, rainfall, and temperature change. --- -## ๐Ÿ“ฆ Files +## Files - `environmental_change_calculator.html`: Interactive calculator - `environmental_change_logic.md`: Explanation of indicators and scoring @@ -12,7 +12,7 @@ This tool estimates environmental fragility for a district using ecological indi --- -## ๐Ÿง  How It Works +## How It Works Enter values for: - Forest cover (%) @@ -24,4 +24,4 @@ The calculator gives a composite score and risk category based on predefined thr --- -๐Ÿ“ Example based on Bundelkhand-style exposure + Example based on Bundelkhand-style exposure diff --git a/calculators/environmental_change/environmental_change_logic.md b/calculators/environmental_change/environmental_change_logic.md index 0853ef0..793e110 100644 --- a/calculators/environmental_change/environmental_change_logic.md +++ b/calculators/environmental_change/environmental_change_logic.md @@ -1,10 +1,10 @@ -# ๐ŸŒฑ Environmental Change Risk Estimation โ€“ Logic +# Environmental Change Risk Estimation โ€“ Logic This tool estimates climate fragility and environmental risk levels for a district using key ecological indicators. --- -## ๐Ÿ”ข Inputs +## Inputs - Forest Cover (% of total area) - Households with Drinking Water Nearby (%) @@ -13,16 +13,16 @@ This tool estimates climate fragility and environmental risk levels for a distri --- -## ๐Ÿ“ˆ Scoring Logic +## Scoring Logic Each variable is scored between 0โ€“1 and weighted to compute a composite risk score. -| Indicator | Weight | Risk Thresholds | +| Indicator | Weight | Risk Thresholds | |--------------------------|--------|------------------| -| Forest Cover (%) | 0.3 | <25% = high risk | -| Drinking Water (%) | 0.3 | <60% = high risk | -| Rainfall Deviation (mm) | 0.2 | >100mm = high | -| Temperature Change (ยฐC) | 0.2 | >1.5ยฐC = high | +| Forest Cover (%) | 0.3 | <25% = high risk | +| Drinking Water (%) | 0.3 | <60% = high risk | +| Rainfall Deviation (mm) | 0.2 | >100mm = high | +| Temperature Change (ยฐC) | 0.2 | >1.5ยฐC = high | Risk categories: @@ -32,7 +32,7 @@ Risk categories: --- -## ๐Ÿง  Example +## Example Forest cover = 21%, Water access = 55%, Rainfall dev = 120mm, Temp rise = 1.8ยฐC diff --git a/calculators/financial_inclusion/README.md b/calculators/financial_inclusion/README.md index 04da9ff..f637b30 100644 --- a/calculators/financial_inclusion/README.md +++ b/calculators/financial_inclusion/README.md @@ -1,10 +1,10 @@ -# ๐Ÿฆ Financial Inclusion Calculator +# Financial Inclusion Calculator This tool estimates how many access points (banks, ATMs, Bank Mitras) are needed in a district to meet population norms for financial access. --- -## ๐Ÿ“ฆ Files +## Files - `financial_inclusion_calculator.html`: Calculator for estimating service gaps - `financial_inclusion_logic.md`: Explanation of how the tool works @@ -12,7 +12,7 @@ This tool estimates how many access points (banks, ATMs, Bank Mitras) are needed --- -## ๐Ÿง  How It Works +## How It Works You enter: - Total population @@ -23,4 +23,4 @@ The calculator compares required vs existing access points and shows whether the --- -๐Ÿ“ Example District: Any in India (default data inspired by Chitrakoot, UP) + Example District: Any in India (default data inspired by Chitrakoot, UP) diff --git a/calculators/financial_inclusion/financial_inclusion_logic.md b/calculators/financial_inclusion/financial_inclusion_logic.md index 566bd68..3b05382 100644 --- a/calculators/financial_inclusion/financial_inclusion_logic.md +++ b/calculators/financial_inclusion/financial_inclusion_logic.md @@ -1,22 +1,22 @@ -# ๐Ÿฆ Financial Inclusion Projection Logic +# Financial Inclusion Projection Logic This tool helps estimate how many banking access points (banks, ATMs, CSPs) are needed in a district based on population and service norms. --- -## ๐Ÿ”ข Inputs +## Inputs - Current district population - Norm: people per access point (e.g., 2,000 people per bank point) - Current access points: - - Commercial Banks - - Rural Banks - - ATMs - - Bank Mitras / CSPs + - Commercial Banks + - Rural Banks + - ATMs + - Bank Mitras / CSPs --- -## ๐Ÿ“ˆ Formula +## Formula ``` Needed Access Points = Population / Norm @@ -26,7 +26,7 @@ Gap = Needed - Current --- -## ๐Ÿง  Example +## Example For a district with: - Population: 675,000 diff --git a/calculators/population_projection/README.md b/calculators/population_projection/README.md index f727829..ffe3dbe 100644 --- a/calculators/population_projection/README.md +++ b/calculators/population_projection/README.md @@ -1,10 +1,10 @@ -# ๐Ÿ“ˆ Population Projection Calculator +# Population Projection Calculator This tool projects future population based on a compound growth rate model. --- -## ๐Ÿ“ฆ Files +## Files - `population_projection_calculator.html`: Simple calculator for projecting population over time - `population_projection_logic.md`: Explanation of the formula and logic @@ -12,7 +12,7 @@ This tool projects future population based on a compound growth rate model. --- -## ๐Ÿง  How It Works +## How It Works You enter: - Base population (current year) @@ -23,4 +23,4 @@ The tool applies the compound growth formula and returns the projected value. --- -๐Ÿ“ Used in demographic planning, forecasting infrastructure demand, or service delivery estimation. + Used in demographic planning, forecasting infrastructure demand, or service delivery estimation. diff --git a/calculators/population_projection/population_projection_logic.md b/calculators/population_projection/population_projection_logic.md index 6ced547..ba3fdd3 100644 --- a/calculators/population_projection/population_projection_logic.md +++ b/calculators/population_projection/population_projection_logic.md @@ -1,10 +1,10 @@ -# ๐Ÿ“ˆ Population Projection Calculator โ€“ Logic +# Population Projection Calculator โ€“ Logic This tool helps project district or block population over time using a compound annual growth formula. --- -## ๐Ÿ”ข Inputs +## Inputs - Current population (base year) - Annual growth rate (%) @@ -12,7 +12,7 @@ This tool helps project district or block population over time using a compound --- -## ๐Ÿ“ˆ Formula Used +## Formula Used ``` Population in Year N = Base Population ร— (1 + Growth Rate)^N @@ -24,7 +24,7 @@ Where: --- -## ๐Ÿง  Example +## Example - Current population = 520,000 - Growth rate = 1.85% diff --git a/data_starters/README.md b/data_starters/README.md index 307f593..1ea85f4 100644 --- a/data_starters/README.md +++ b/data_starters/README.md @@ -1,43 +1,28 @@ # Data starters -Starter code for real public-use survey microdata, one folder per dataset, in -Stata, R and Python. +Loaders for real public-use survey microdata, one folder per dataset, in +Stata, R and Python. Each opens the files as they are distributed and +applies the weight and scale rules that the documentation states. -The rest of InsightStack teaches technique against data that stands in for -something. `stata_snippets/` imports a `health_survey.csv` and generates age -bands; that is a good way to learn `import delimited` and no help at all to -someone holding an actual survey file. This section is the other half: code that -knows about a specific named dataset, opens the files as they actually arrive, -and handles the things that produce a wrong answer rather than an error. +| Folder | Covers | Languages | +| --- | --- | --- | +| [`dhs-south-asia/`](dhs-south-asia/) | 28 DHS surveys: India (NFHS 1 to 5), Bangladesh, Nepal, Pakistan, Maldives, Afghanistan, Sri Lanka | Stata, R, Python | +| [`plfs-india/`](plfs-india/) | Periodic Labour Force Survey unit-level data, fixed-width text read from the round's own layout | Stata, R, Python | ## What a folder contains -| | | -|---|---| -| `README.md` | Which files to download and from where, what goes wrong silently, and what is not comparable across rounds | -| `load_*.do`, `load_*.R`, `load_*.py` | The same loader in three languages, with the same guards | -| `variables.csv` | Canonical name to the dataset's variable, with scale factors and caveats. Read by the loaders at runtime, so documentation and behaviour cannot drift apart | -| `make_fixture.py` | Builds synthetic files with the structure but no real data, since none of these datasets may be redistributed | -| `test_*.py` | Checks against those fixtures, one per failure mode | - -No folder ships data. Every dataset here needs a registration you hold -personally, and the READMEs say which. - -## Folders - -| Folder | Covers | Languages | -|---|---|---| -| [`dhs-south-asia/`](dhs-south-asia/) | 28 DHS surveys: India (NFHS 1 to 5), Bangladesh, Nepal, Pakistan, Maldives, Afghanistan, Sri Lanka | Stata, R, Python | -| [`plfs-india/`](plfs-india/) | Periodic Labour Force Survey unit-level data: fixed-width text read from the round's own layout | Stata, R, Python | +| File | What it is | +| --- | --- | +| `README.md` | Which files to download and from where, what goes wrong silently, what is not comparable across rounds | +| `load_*.do`, `load_*.R`, `load_*.py` | The same loader in three languages | +| `variables.csv` | Canonical name to the dataset's variable, with scale factors and caveats, read at runtime | +| `make_fixture.py` | Builds synthetic files with the structure and no real data | +| `test_*.py`, `test_*.R` | Checks against the fixtures | -## Adding one +No folder ships data. DHS and MoSPI both prohibit redistribution; each README +says what to download. -Copy the shape of `dhs-south-asia/`. A folder earns its place when its loader -opens the real files and its README names at least one error the data makes easy -and quiet. A folder that is a README and a stub is worse than no folder, because -it looks like coverage. +## Adding a folder -Nothing is listed here before it is built. Under the -[maintenance policy](https://github.com/Varnasr/OpenStacks-for-Change/blob/main/MAINTENANCE.md) -a roadmap entry is a promise to a reader, so datasets appear in the table above -when they work and not before. +Copy the shape of `dhs-south-asia/`. A folder is listed when its loader opens +the real files and its tests pass, not before. diff --git a/data_starters/dhs-south-asia/README.md b/data_starters/dhs-south-asia/README.md index d437348..111ce37 100644 --- a/data_starters/dhs-south-asia/README.md +++ b/data_starters/dhs-south-asia/README.md @@ -1,24 +1,18 @@ # DHS recode files, South Asia Starter code in Stata, R and Python for the Demographic and Health Surveys of -India, Bangladesh, Nepal, Pakistan, Maldives, Afghanistan and Sri Lanka. Twenty -eight surveys, one loader, because the recode structure is the same in all of +India, Bangladesh, Nepal, Pakistan, Maldives, Afghanistan and Sri Lanka. Twenty-eight surveys, one loader: the recode structure is the same in all of them. This folder does not contain data and cannot. The DHS Program licence lets you -use the files, not pass them on, so everyone downloads their own copy. What is -here is the part that takes a week to work out and five minutes to get wrong. +use the files, not pass them on, so everyone downloads their own copy. -## What this is for +## What the loaders do -You have `IAIR7EFL.DTA` on your desktop. It holds 724,115 women and roughly five -thousand variables named `v106`, `v190`, `hw70`. Opening it fills your memory, -the codebook is 800 pages, and the first four numbers you compute will be wrong -in ways that do not announce themselves. - -These scripts read only the columns you name, attach the right weight and design -for the recode you are holding, apply the documented scale factors, and stop with -an explanation when something is off. They are a starting point, not an analysis. +They read only the columns you name from a recode such as `IAIR7EFL.DTA` +(724,115 women, about five thousand variables), attach the weight and design +variables for that recode, apply the documented scale factors, and stop with an +explanation when something is off. ## Getting the files @@ -89,8 +83,7 @@ python load_dhs.py IAKR7EFL.DTA --vars v190 hw70 hw71 b5 --anthro --out stunting ## What goes wrong silently -Every item here produces a plausible number rather than an error. That is why the -scripts handle them rather than leaving them to a checklist. +Each of these produces a plausible number rather than an error. **Weights are stored with six implied decimals.** `v005` averages about a million and has to be divided by 1,000,000. Leaving it out does not change a weighted @@ -108,9 +101,7 @@ back to `v023` in older rounds. **Anthropometry is stored times 100, with flags above it.** `hw70` of `-162` means a height-for-age z-score of -1.62. Values of 9996 and up are flags and missing. Divide before you drop them and every flagged child becomes a plausible 99.96, -then a plausible 0.9996, and your stunting rate falls. This bug appeared in this -folder's own first draft and the test suite caught it, which is the argument for -the test suite. +then a plausible 0.9996, and your stunting rate falls. **The anthropometry columns are named differently in different recodes.** `hw70` to `hw73` in the children's recode, `hc70` to `hc73` in the household member @@ -141,10 +132,7 @@ NFHS-5 child stunting: 35.5 percent nationally, 46.1 in the poorest wealth quintile falling to 22.9 in the richest, with breakdowns by residence and mother's education. NFHS-4's national figure of 38.4 is there for comparison. -Reproducing a published table is the only cheap check that a pipeline is right -end to end. Each of the silent errors above produces a number that looks -reasonable on its own and visibly wrong beside the survey agency's own report. -Two worked examples do exactly this, one in R and one in Python: +Two worked examples reproduce the table, one in R and one in Python: - [FieldStack](https://github.com/Varnasr/FieldStack) `survey_tools/dhs_stunting.R` - [EquityStack](https://github.com/Varnasr/EquityStack) `survey_estimation/dhs_stunting.py` @@ -239,10 +227,10 @@ python test_load_dhs.py # 30 checks Rscript test_load_dhs.R # 33: the same ones, plus the design object ``` -The R suite mirrors the Python one check for check and adds three for the survey -design object, so both languages are held to the same standard, and both were run: verified on Python 3 with pandas and -pyreadstat, and on R 4.3.3 with survey 4.2.1 and haven 2.5.4. Where both read the -same fixture they return the same numbers. +The R suite mirrors the Python one and adds three checks for the survey +design object. Verified on Python 3 with pandas and pyreadstat, and on R 4.3.3 +with survey 4.2.1 and haven 2.5.4; both return the same numbers from the same +fixture. Stata has no free runtime, so `load_dhs.do` is the one file here that has not been executed. It carries the same logic and the same guards, and the fixture check at @@ -258,5 +246,4 @@ data. [dhsprogram.com/publications](https://dhsprogram.com/publications/). - Anthropometry plausibility bounds: WHO Child Growth Standards, 2006. -Where this folder and your survey's own codebook disagree, the codebook is right. -Rounds vary more than any summary of them does. +Where this folder and your survey's codebook disagree, the codebook is right. diff --git a/data_starters/plfs-india/README.md b/data_starters/plfs-india/README.md index f73cc5e..15e971a 100644 --- a/data_starters/plfs-india/README.md +++ b/data_starters/plfs-india/README.md @@ -4,8 +4,7 @@ Starter code in Stata, R and Python for the Periodic Labour Force Survey unit-level data published by MoSPI. This folder does not contain data and cannot. You register at -[microdata.gov.in](https://microdata.gov.in/) and download your own copy. What is -here is the part that is tedious to work out and easy to get wrong. +[microdata.gov.in](https://microdata.gov.in/) and download your own copy. ## What you are dealing with @@ -27,8 +26,7 @@ complaining. ## The weight is not MLTS divided by 100 -This is the one to get right, and it is the reason this folder exists. MoSPI's -README says, verbatim: +MoSPI's README says, verbatim: > For generating sub-sample wise estimate for the Calendar Year, weight may be > applied as follows: @@ -84,10 +82,9 @@ MoSPI gives the common primary key as: > Second Stage Stratum No. = 38(1) > Sample Household No. = 39(2) -with the sub-sample code at byte 27. Note that the parenthetical for Quarter -does not agree with the `11(2)` notation used for the rest, which is one more -reason to take positions from the layout file rather than from any prose, -including this page. +with the sub-sample code at byte 27. The parenthetical for Quarter does not +agree with the `11(2)` notation used for the rest; take positions from the +layout file, not from prose. Build the key by zero-padding each part to its declared width. Concatenating the parts unpadded collapses distinct households onto one key: FSU 1234 with @@ -210,9 +207,9 @@ Both suites were run and both pass, and they return identical numbers from the same fixture: 240 households, 1,099 persons, mean `MLTS` of 1217.72 and a correct sum of weights of 2190.4 against the naive rule's 2922.5. -The strongest check available without real data is the last one. Household size -is written into one file and the members into another, so the two agree only if -the byte positions, the zero padding and the merge are all correct at once. +Household size is written into one file and the members into another, so the +last check passes only if the byte positions, the zero padding and the merge +are all correct. Stata has no free runtime, so `load_plfs.do` is the one file here that has not been executed. The fixture check at the bottom of it takes about a minute and @@ -230,4 +227,4 @@ names the number to look for. included in the download for each round. Retrieved 2026-09-08. Where this page and the documents shipped with your round disagree, your round -is right. Positions, and occasionally field names, change. +is right. diff --git a/data_validation/README.md b/data_validation/README.md index 007316b..42e6746 100644 --- a/data_validation/README.md +++ b/data_validation/README.md @@ -1,6 +1,7 @@ # data_validation -A list of what is wrong with a file, by identifier, before it reaches a finding. +Checks a data file against a data dictionary and lists every problem by +identifier. ```python from data_validation import validate, Rules @@ -9,63 +10,47 @@ rules = Rules.from_csv("sample_data/data_dictionary.csv", id="id", names="snake_ report = validate(df, rules) report.issues # one row per problem: id, variable, value, check, message report.summary() # counts by check and severity -report.ok # True only when nothing fired +report.ok # True when nothing fired ``` ``` python data_validation/test_data_validation.py # 18 tests, 40 checks ``` -## What it checks +## Checks | Check | Fires when | -|---|---| +| --- | --- | | `id_blank`, `id_duplicate` | The identifier is missing or repeated | -| `required_blank` | A variable listed as required is blank, NA, `.`, or a sentinel code | -| `out_of_range` | A numeric value falls outside a declared `(min, max)`; either end may be open | -| `not_allowed` | A value is not in the declared list, compared as trimmed strings | -| `type_numeric`, `type_integer`, `type_binary`, `type_date` | A value cannot be read as the declared type, reported per value | -| `name_style` | A column name breaks `snake_case` or Stata's 32-character rule | +| `required_blank` | A required variable is blank, NA, `.`, or a sentinel code | +| `out_of_range` | A numeric value is outside the declared `(min, max)`; either end may be open | +| `not_allowed` | A value is not in the declared list | +| `type_numeric`, `type_integer`, `type_binary`, `type_date` | A value cannot be read as the declared type | +| `name_style` | A column name breaks `snake_case` or Stata's 32-character limit | | `column_missing`, `column_unexpected` | The file's columns differ from the dictionary's | -| `orphan_child`, `childless_parent` | `check_cross_file_ids`: a roster row whose household is not in the household file, and the reverse | +| `orphan_child`, `childless_parent` | `check_cross_file_ids`: a roster row without a household, or the reverse | -## Rules come from the dictionary +## The dictionary -`Rules.from_csv` reads the same dictionary that `label_variables/` uses. Add -`type`, `min`, `max`, `allowed` (pipe-separated) and `required` columns and the -rules are the dictionary; leave them out and only the name and column-set -checks run. One file describes the data for validation and for labelling, so -the two cannot drift. +`Rules.from_csv` reads the dictionary that `label_variables/` also uses, +with `type`, `min`, `max`, `allowed` (pipe-separated) and `required` +columns. Without them, only the name and column-set checks run. -## Three decisions that shape the output +## Behaviour -**Missing is not wrong, unless the variable is required.** A blank in a -skip-pattern question is correct data. Only variables in `required` are flagged -for blanks; every other check ignores NA. The opposite policy, which the -previous version of this folder had, produces hundreds of false flags and -teaches people to ignore the report. +Only variables listed in `required` are flagged for blanks. A blank in a +skip-pattern question is correct data. -**Sentinel codes are missing.** -999, -99 and the rest arrive from ODK and -Stata as numbers. A range check that does not know that reports every refusal -as an age of -999. `Rules.sentinels` lists them and defaults to the common set; -pass `sentinels=[]` if the codes are meaningful in your instrument. +Sentinel codes (-999, -99 and the rest) count as missing. `Rules.sentinels` +lists them; pass `sentinels=[]` if the codes mean something in your +instrument. -**Everything is reported by identifier, never by row number.** A row number -changes when the file is re-sorted; an id is what you phone the field team -with. The one exception is a blank id, which has nothing to be reported by, -and the message says so. +Problems are reported by identifier, not row number. A blank identifier is +the one exception, and the message says so. ## Companions -`companions/validate.do` and `companions/validate.R` run the same duplicate, -required, range and allowed checks against the same dictionary, for a team -that works in Stata or R. They are not tested in CI (Stata has no free runtime) -and they do fewer things than the Python; the Python is the reference. - -## What this replaced - -Three scripts that printed `df[~df.gender.isin(["M", "F"])]` and stopped, in -three languages, plus a second folder under `foundation_tools/` with a -different set of five-line functions that overlapped with the first. Neither -reported an id, neither knew about sentinels, and neither could be pointed at a -new file without editing the source. +`companions/validate.do` and `companions/validate.R` run the duplicate, +required, range and allowed checks against the same dictionary in Stata and +R. They are not tested in CI and do less than the Python, which is the +reference. diff --git a/docs/data_flow.md b/docs/data_flow.md index 979c1b3..d8091a9 100644 --- a/docs/data_flow.md +++ b/docs/data_flow.md @@ -2,34 +2,34 @@ This file explains the typical flow of data through the InsightStack toolkit. -## ๐Ÿ”„ Typical Workflow: +## Typical Workflow: 1. **Raw Data Entry** - - Source: External surveys, XLSForms, CSV, STATA/SPSS - - Tools: `survey_to_codebook/`, `data_validation/` + - Source: External surveys, XLSForms, CSV, STATA/SPSS + - Tools: `survey_to_codebook/`, `data_validation/` 2. **Data Validation** - - Scripts check for: - - Missing values - - Out-of-range entries - - Duplicates - - Folder: `data_validation/` + - Scripts check for: + - Missing values + - Out-of-range entries + - Duplicates + - Folder: `data_validation/` 3. **Labeling Variables** - - Apply human-readable labels to variables - - Folder: `label_variables/` + - Apply human-readable labels to variables + - Folder: `label_variables/` 4. **Exploration & Analysis** - - Can now run: - - Summary statistics - - Regressions - - Visualizations - - Folder: `replication/` or use external tools + - Can now run: + - Summary statistics + - Regressions + - Visualizations + - Folder: `replication/` or use external tools 5. **Documentation** - - Generate Markdown codebooks from XLSForms - - Folder: `survey_to_codebook/` + - Generate Markdown codebooks from XLSForms + - Folder: `survey_to_codebook/` 6. **Archival & Replication** - - Structure analysis for reuse or publication - - Folder: `replication/` \ No newline at end of file + - Structure analysis for reuse or publication + - Folder: `replication/` \ No newline at end of file diff --git a/eval_docs/README.md b/eval_docs/README.md index 3906858..4b530f6 100644 --- a/eval_docs/README.md +++ b/eval_docs/README.md @@ -1,34 +1,26 @@ # eval_docs -Templates and guidance for the three documents an evaluation is built on: the -logframe, the indicator reference sheet, and the MEL framework. +Templates for the logframe, the indicator reference sheet and the MEL +framework, with a completed example of each. | File | What it is | -|---|---| -| `logframe_template.md` | The four-row table, how to fill it in (outcome first), and the errors that recur | +| --- | --- | +| `logframe_template.md` | The four-row table, how to fill it in outcome first, and common errors | | `logframe_template.csv` | The same table as a spreadsheet | | `logframe_mhh_program.xlsx` | A completed example: school health clubs for menstrual health | -| `indicator_reference_sheet.md` | One sheet per indicator, with the three fields that matter most | +| `indicator_reference_sheet.md` | One sheet per indicator | | `indicator_reference_sheet.csv` | The fields as columns, for a whole indicator set | -| `indicator_guidance.md` | Five tests for an indicator, the types and what each is for, and the errors | +| `indicator_guidance.md` | Five tests for an indicator, the types, and common errors | | `mel_framework_outline.md` | Nine sections, with the question a reviewer asks of each | | `mel_framework_mhh_program.pdf` | A completed example, same programme | -The completed examples describe a hypothetical programme. The templates are -what to reuse. +The completed examples describe a hypothetical programme. -## The one thing to read if you read one +The assumptions column of the logframe, between outputs and outcomes, states +the programme's theory in one sentence. If it cannot be written, there is no +theory yet. -The assumptions column of the logframe, and specifically the assumption -between outputs and outcomes. That cell is the programme's theory in one -sentence: "trained peer leaders will run sessions, girls will attend, and -attending changes what girls do". If it cannot be written, there is no -theory yet, and no indicator will supply one. - -## Related - -`../writing_guides/` for the theory of change note and the results chain that -the logframe summarises. `../annotated_research/` for five worked examples of -what each evaluation design in section 4 of the framework can and cannot -claim. FieldStack `survey_tools/` for the sample size calculation section 5 -needs, and `field_ops/` for the data quality checks. +Related: `../writing_guides/` for the theory of change note and results +chain; `../annotated_research/` for what each evaluation design can claim; +FieldStack `survey_tools/` for sample size and `field_ops/` for data quality +checks. diff --git a/index.html b/index.html index 70cb3f9..49d9f52 100644 --- a/index.html +++ b/index.html @@ -27,9 +27,9 @@

InsightStack

-

Tools, templates and thinking for knowledge work in development. Calculators that run in - a browser, econometrics you can actually execute, and loaders that open survey microdata - in the state it arrives in. Part of OpenStacks.

+

Calculators that run in a browser, causal-inference code in Python and R, loaders for DHS and + PLFS microdata, and templates for the documents an evaluation produces. Part of + OpenStacks.

6Calculators
2Dataset loaders
@@ -43,7 +43,7 @@

InsightStack

Calculators

-

Six tools ยท run in the browser ยท nothing is sent anywhere

+

Six tools ยท run in the browser ยท nothing is sent to a server

-

Each one states its assumption on the page. Treat the output as an estimate to - think with. Where a published district figure exists, cite that figure instead.

+

Each calculator states its assumptions on the page. Where a published district figure + exists, use that instead.

-

No data ships, and none can: DHS and MoSPI both forbid passing the files on. You - download your own copy, and each guide names exactly which files to fetch.

+

No data ships. DHS and MoSPI both prohibit redistribution; each guide names the files + to download.

@@ -122,11 +121,11 @@

Code and tooling

EconometricsPython, R - Did the programme work, and can you defend the answer? Difference-in-differences, matching, instrumental variables and regression discontinuity, each with data to practise on. + Difference-in-differences, matching, instrumental variables, regression discontinuity and sensitivity analysis, with sample data. Stata snippets44 do-files - The Stata you end up rewriting on every project: merges, labels, graphs, regressions, survey settings. + Data management, merges, labels, graphs, regressions, survey settings. SPSS scripts20 files @@ -134,43 +133,43 @@

Code and tooling

Network effectsPython - Who influences whom in a self-help group, how far a practice spreads, and why the obvious peer-effects regression cannot answer the question it looks like it answers. + Centrality, peer association with leave-one-out means, and threshold diffusion for self-help group data. ReplicationPython, R - A package that checks itself: one command from raw data to results, a recorded answer, R against Python, and a test that the check can fail. + One command from raw data to results, a recorded answer, and an R cross-check. Data validationPy, R, Stata, SPSS - Catch what is wrong with a file, by household id, before it reaches a finding. Rules come from the data dictionary; blanks in skip-pattern questions are not flagged; sentinel codes count as missing. + Checks from a data dictionary, reported by household id: duplicates, required fields, ranges, allowed values, types, column set. Label variablesPy, R, Stata, SPSS - Put the labels from the dictionary into a Stata or SPSS file, where they survive. A CSV loses them on every round trip. + Variable and value labels from a dictionary, written into Stata and SPSS files. Survey to codebookPython - Turn an XLSForm into a codebook a reviewer can read top to bottom, and into the label dictionary for its own export. Reports the choice list the form names and does not have. + An XLSForm to a Markdown codebook and a label dictionary. Reports form defects such as a missing choice list. System dynamicsVensim - Where an intervention pushes back on itself: eight system models across health, agriculture, climate, migration and education. + Eight system models across health, agriculture, climate, migration and education. Tool notes9 tools - Excalidraw, Kumu, Observable, RawGraphs, Flourish, Power BI and Miro: when each is worth the setup, when it is not, and what goes wrong, with one worked file apiece. + Excalidraw, Kumu, Observable, RawGraphs, Flourish, Power BI, Miro, Excel and LaTeX: when to use each, when not to, and one example file apiece. Qualitative codingTaguette - One focus group coded start to finish, and the method: decide the frame first, code two transcripts twice, count carefully. Eleven of fourteen groups is a sentence; 78 per cent of respondents is a survey result a focus group cannot give. + One focus group coded start to finish in Taguette, with the method. Recorded fieldworkDescript - From recording to clip to quote, and what is decided at each step. Three separate consents, every quote checked against the audio, and a clip cut with its context visible to whoever approves it. + Recorded interviews: consent, transcription, clips and quotes. Annotated research5 briefs - Five research briefs marked up with the same eight questions, weakest design to strongest. Hand one out unmarked, have readers tag it, compare. + Five illustrative research briefs annotated with one eight-tag scheme, weakest design to strongest. Learning libraryReference @@ -178,22 +177,22 @@

Code and tooling

Learning layersPractice - A MEL system that changes nothing has no learning in the calendar. Three layers at three tempos, each a decision with a date, a person and the evidence in front of them. + Learning in the MEL cycle as scheduled decisions, at three tempos. Writing guides5 guides - Theory of change, results chain, the evaluation report, the policy brief, and how to write uncertainty into the same sentence as the number. The verb is decided by the design. + Theory of change, results chain, evaluation report, policy brief, writing about uncertainty. Evaluation documentsTemplates - Logframe, indicator reference sheet and MEL framework: the template, how to fill it in outcome-first, and the errors that recur. The assumptions column is the programme's theory. + Logframe, indicator reference sheet and MEL framework templates, with a completed example. Knowledge managementConventions - One folder structure and a README template, so a file's location says what it is. Raw data is never edited; every table came from a script still in the folder. + A folder structure, a README template, file naming and tagging conventions.
-

These open on GitHub, where the code lives.

+

Links open on GitHub.

@@ -202,12 +201,11 @@

Code and tooling

Status

Stable

-

This repository works and is correct, but is not under active development. Bug - reports are welcome and issues stay open; new features are unlikely, and replies are measured - in weeks rather than days. See the +

The code works and is not under active development. Bug reports are welcome; new + features are unlikely, and replies take weeks. See the maintenance policy.

-

Citable: 10.5281/zenodo.15245182. - The companion repositories are +

DOI 10.5281/zenodo.15245182. + Companion repositories: FieldStack for R and EquityStack for Python.

@@ -221,7 +219,7 @@

Status

Changelog MIT Licence -

Varna Sri Raman. Built for open knowledge, and licensed so you can take it.

+

Varna Sri Raman. MIT licence.

diff --git a/label_variables/README.md b/label_variables/README.md index 170aa8c..d99346c 100644 --- a/label_variables/README.md +++ b/label_variables/README.md @@ -1,14 +1,14 @@ # label_variables Variable and value labels from a data dictionary, applied to a frame and -written into a file that can carry them. +written into a Stata or SPSS file. ```python from label_variables import read_dictionary, apply_labels, write_labelled d = read_dictionary("input/data_dictionary.csv") -df, cov = apply_labels(df, d) # cov says what is unlabelled, and what has no column -write_labelled(df, "out/survey.dta") # labels are now in the file +df, cov = apply_labels(df, d) # cov lists unlabelled variables and dictionary rows with no column +write_labelled(df, "out/survey.dta") write_labelled(df, "out/survey.sav") ``` @@ -24,34 +24,24 @@ gender,Gender of respondent,1=Male|2=Female|3=Other consent,Consent to interview,1=Yes|0=No|-99=Refused ``` -`values` is optional and holds value labels as `code=label` pairs separated by -`|`. The same file serves `data_validation/`, which reads its `min`, `max`, -`allowed` and `required` columns; and `survey_to_codebook/` writes this exact -shape from an XLSForm, so a form's own choice lists become the value labels on -its export without retyping. +`values` is optional and holds value labels as `code=label` pairs separated +by `|`. `data_validation/` reads the same file for its `min`, `max`, +`allowed` and `required` columns, and `survey_to_codebook/` writes this +shape from an XLSForm. -## Why the export step is the point +## Behaviour -A CSV has no labels. A dataset that lives as CSV loses its labels on every -round-trip, and the previous version of this folder attached labels to -`df.attrs` and then wrote a CSV, which discards them on the same line. Stata -and SPSS files carry both variable and value labels in the file, so -`write_labelled` writes `.dta` or `.sav` and refuses `.csv` with an -explanation. +`write_labelled` writes `.dta` or `.sav` and refuses `.csv`, which cannot +carry labels. -`dictionary_from_file` goes the other way: given a labelled `.dta` or `.sav`, -it emits the dictionary, so a file you were handed becomes a dictionary you -can keep. The tests check the round trip in both formats. +`dictionary_from_file` reads a labelled `.dta` or `.sav` and writes the +dictionary. The tests check the round trip in both formats. -## Two Stata limits, enforced rather than truncated - -Variable names are limited to 32 characters and variable labels to 80. The -writer would truncate silently; `write_labelled` raises instead, because a -truncated label reads as a mistake to whoever opens the file next. +Stata limits variable names to 32 characters and variable labels to 80. +`write_labelled` raises on either rather than truncating. ## Companions `companions/label.do` and `companions/label.R` apply the same dictionary in -Stata and R. `label.do` reads the `values` column and builds `label define` -statements from it, so the value labels come along, which the previous -Stata script did not do. +Stata and R. `label.do` builds `label define` statements from the `values` +column. diff --git a/launch_master_checklist.md b/launch_master_checklist.md index c00e2ee..c687e3f 100644 --- a/launch_master_checklist.md +++ b/launch_master_checklist.md @@ -2,19 +2,19 @@ | Task | InsightStack | FieldStack | EquityStack | OpenStacks-for-Change | |-----|--------------|------------|-------------|----------------------| -| LICENSE file present (MIT) | โœ… | โœ… | โœ… | โœ… | -| CONTRIBUTING.md added | โฌœ๏ธ | โฌœ๏ธ | โฌœ๏ธ | (Optional) | -| CODE_OF_CONDUCT.md added | โฌœ๏ธ | โฌœ๏ธ | โฌœ๏ธ | (Optional) | -| CITATION.cff added | โฌœ๏ธ | โฌœ๏ธ | โฌœ๏ธ | (Optional) | -| FUNDING.yml added (.github folder) | โฌœ๏ธ | โฌœ๏ธ | โฌœ๏ธ | (Optional) | -| FUNDING link in README.md | โฌœ๏ธ | โฌœ๏ธ | โฌœ๏ธ | โฌœ๏ธ | -| GitHub Pages active | โœ… | โœ… | โœ… | โœ… | -| Auto-updating changelog.yml workflow | โœ… (fix applied) | โฌœ๏ธ | โฌœ๏ธ | (Optional) | -| CHANGELOG.md template created | โœ… | โฌœ๏ธ | โฌœ๏ธ | (Optional) | -| Zenodo DOI registered | โฌœ๏ธ | โฌœ๏ธ | โฌœ๏ธ | (Optional) | -| Zenodo badge added in README.md | โฌœ๏ธ | โฌœ๏ธ | โฌœ๏ธ | (Optional) | -| README.md: Badges block | โฌœ๏ธ | โฌœ๏ธ | โฌœ๏ธ | โฌœ๏ธ | -| README.md: About clean | โœ… | โœ… | โœ… | โœ… | -| First Release v1.0.0 created | โฌœ๏ธ | โฌœ๏ธ | โฌœ๏ธ | (Optional) | -| Open Public Readiness Issue | โฌœ๏ธ | โฌœ๏ธ | โฌœ๏ธ | (Optional) | -| Roadmap.md available (optional) | โฌœ๏ธ | โฌœ๏ธ | โฌœ๏ธ | (Optional) | \ No newline at end of file +| LICENSE file present (MIT) | Yes | Yes | Yes | Yes | +| CONTRIBUTING.md added | โฌœ | โฌœ | โฌœ | (Optional) | +| CODE_OF_CONDUCT.md added | โฌœ | โฌœ | โฌœ | (Optional) | +| CITATION.cff added | โฌœ | โฌœ | โฌœ | (Optional) | +| FUNDING.yml added (.github folder) | โฌœ | โฌœ | โฌœ | (Optional) | +| FUNDING link in README.md | โฌœ | โฌœ | โฌœ | โฌœ | +| GitHub Pages active | Yes | Yes | Yes | Yes | +| Auto-updating changelog.yml workflow | Yes (fix applied) | โฌœ | โฌœ | (Optional) | +| CHANGELOG.md template created | Yes | โฌœ | โฌœ | (Optional) | +| Zenodo DOI registered | โฌœ | โฌœ | โฌœ | (Optional) | +| Zenodo badge added in README.md | โฌœ | โฌœ | โฌœ | (Optional) | +| README.md: Badges block | โฌœ | โฌœ | โฌœ | โฌœ | +| README.md: About clean | Yes | Yes | Yes | Yes | +| First Release v1.0.0 created | โฌœ | โฌœ | โฌœ | (Optional) | +| Open Public Readiness Issue | โฌœ | โฌœ | โฌœ | (Optional) | +| Roadmap.md available (optional) | โฌœ | โฌœ | โฌœ | (Optional) | \ No newline at end of file diff --git a/learning_layers/README.md b/learning_layers/README.md index 6336192..bddd1e0 100644 --- a/learning_layers/README.md +++ b/learning_layers/README.md @@ -1,21 +1,16 @@ # learning_layers -How a programme learns from its own data, treated as a set of scheduled -decisions rather than a section heading. +Learning from a programme's own data, treated as scheduled decisions. | File | What it is | -|---|---| -| `embedding_learning_in_the_mel_cycle.md` | The practical note: three layers at three tempos, each a decision with a date, a person and the evidence in front of them | -| `learning_layer_framework.pdf` | The framework the note is drawn from, written for health systems building adaptive capacity | +| --- | --- | +| `embedding_learning_in_the_mel_cycle.md` | Three layers at three tempos, each a decision with a date, a person and the evidence in front of them | +| `learning_layer_framework.pdf` | The framework the note draws on, written for health systems | | `why_cite_insightstack.md` | Why a repository of methods and templates carries a DOI | -The argument in one paragraph: a MEL system collects a great deal and changes -nothing when "learning" has no place in the calendar. Start from the -decisions the programme will actually take in the next year, write down who -takes each, when, and what evidence could change it, and design the data -collection backwards from that. An evaluation cannot inform a monthly -decision, and monitoring data cannot answer an annual one; most systems try -to make each do the other's job. +Start from the decisions the programme will take in the next year, write +down who takes each, when, and what evidence could change it, and design the +data collection from that. Monitoring data cannot answer an annual decision +and an evaluation cannot inform a monthly one. -Related: `../eval_docs/mel_framework_outline.md` section 7, which is where -this goes in a framework document. +Related: `../eval_docs/mel_framework_outline.md`, section 7. diff --git a/learning_library/01_programming/README.md b/learning_library/01_programming/README.md index 6ee09cb..4edf27d 100644 --- a/learning_library/01_programming/README.md +++ b/learning_library/01_programming/README.md @@ -4,7 +4,7 @@ This folder focuses on creative and generative programming โ€” particularly for ## Contents -### ๐Ÿ“˜ An Artist's Guide to Programming (2022) +### An Artist's Guide to Programming (2022) **Author:** Jim Parker **Tags:** #processing #creativecoding #generativeart A beautifully structured guide for artists learning how to program visually using Processing. Includes practical sketches with code and visuals, covering motion, interactivity, graphics, and audio. diff --git a/learning_library/02_data_science/README.md b/learning_library/02_data_science/README.md index 146d626..88d27aa 100644 --- a/learning_library/02_data_science/README.md +++ b/learning_library/02_data_science/README.md @@ -4,14 +4,14 @@ These books help learners understand, analyze, and visualize data using tools li ## Contents -### ๐Ÿ“˜ An Introduction to R +### An Introduction to R **Author:** Dr. Mark Gardener **Tags:** #rstats #visualization #analysis Introductory text covering R basics, data manipulation, plotting, regression, and statistical modeling. Ideal for new users. > โ€œR is a statistical programming environment... that can produce high quality graphics.โ€ -### ๐Ÿ“˜ Learning Generative AI Tools for Excel +### Learning Generative AI Tools for Excel **Author:** Angelica Lo Duca **Tags:** #excel #chatgpt #copilot #openai Hands-on guide to using ChatGPT, Excel Copilot, and OpenAI APIs to supercharge spreadsheets โ€” from summarization to automation. diff --git a/learning_library/03_research_methods/README.md b/learning_library/03_research_methods/README.md index e1acc5c..09440c9 100644 --- a/learning_library/03_research_methods/README.md +++ b/learning_library/03_research_methods/README.md @@ -4,14 +4,14 @@ Foundational guides to designing and conducting research, particularly in open e ## Contents -### ๐Ÿ“˜ Research Methods Handbook +### Research Methods Handbook **Authors:** Farrow, Iniesto, Weller, Pitt (GO-GN) **Tags:** #openresearch #epistemology #paradigms An essential primer on ontology, epistemology, research paradigms, and methods โ€” from surveys to ethnography. Open access. > โ€œWe should never feel too comfortable with methodsโ€ฆ thatโ€™s how we stop being critical.โ€ -### ๐Ÿ“˜ Network Collective Action +### Network Collective Action **Author:** Unknown (PDF primer) **Tags:** #collectiveintelligence #activism #digitalmethods Explores how online networks drive collaboration, protest, and knowledge-sharing. diff --git a/learning_library/05_visual_summaries/README.md b/learning_library/05_visual_summaries/README.md index 2f6bd91..9a3ad03 100644 --- a/learning_library/05_visual_summaries/README.md +++ b/learning_library/05_visual_summaries/README.md @@ -4,7 +4,7 @@ Visual-first resources to reinforce learning โ€” ideal for refreshing concepts q ## Contents -### ๐Ÿ“˜ 101 Data Science Drawings +### 101 Data Science Drawings **Author:** Raymond Lim (@MinuteData) **Tags:** #visuallearning #ml #stats #sketchnotes A collection of colorful, informal one-pagers explaining concepts like regression, p-values, A/B tests, and more. diff --git a/learning_library/06_workbooks/excel_prompt_templates.md b/learning_library/06_workbooks/excel_prompt_templates.md index 69c558b..d5af587 100644 --- a/learning_library/06_workbooks/excel_prompt_templates.md +++ b/learning_library/06_workbooks/excel_prompt_templates.md @@ -4,18 +4,18 @@ A collection of reusable prompts for working with Excel and AI tools like ChatGP --- -## ๐Ÿ“Š Summarize Data Table +## Summarize Data Table > "Summarize the key trends and outliers in this Excel table. Highlight anything unusual." -## ๐Ÿ“ˆ Generate Chart Suggestion +## Generate Chart Suggestion > "Given this dataset, what type of chart best visualizes the difference between columns A and B?" -## ๐Ÿงน Clean Data +## Clean Data > "Identify and suggest fixes for inconsistencies, blank cells, or wrongly formatted dates." -## ๐Ÿ“‹ Validate Columns +## Validate Columns > "Check if all values in the 'Date' column follow DD-MM-YYYY format. Flag any mismatches." -## ๐Ÿ” Insight Extraction +## Insight Extraction > "Based on this data, give me three actionable insights that could be shared in a report." diff --git a/learning_library/06_workbooks/intro_to_r_cheatsheet.md b/learning_library/06_workbooks/intro_to_r_cheatsheet.md index 4dc947d..5ac94d5 100644 --- a/learning_library/06_workbooks/intro_to_r_cheatsheet.md +++ b/learning_library/06_workbooks/intro_to_r_cheatsheet.md @@ -4,25 +4,25 @@ A practical starter guide based on *An Introduction to R* by Mark Gardener. --- -## โœ… Load R and Get Help +## Yes Load R and Get Help ```r # Start R and use help help.start() ?mean ``` -## ๐Ÿ“Š Create a Simple Dataset +## Create a Simple Dataset ```r heights <- c(150, 160, 170, 165, 180) weights <- c(55, 60, 72, 68, 80) ``` -## ๐Ÿ“‰ Plot It +## Plot It ```r plot(heights, weights, main="Height vs Weight", xlab="Height (cm)", ylab="Weight (kg)") ``` -## ๐Ÿ“š Run a Linear Model +## Run a Linear Model ```r lm_result <- lm(weights ~ heights) summary(lm_result) diff --git a/learning_library/ABOUT_THIS_LIBRARY.md b/learning_library/ABOUT_THIS_LIBRARY.md index a041822..44b0e76 100644 --- a/learning_library/ABOUT_THIS_LIBRARY.md +++ b/learning_library/ABOUT_THIS_LIBRARY.md @@ -1,6 +1,6 @@ # ABOUT_THIS_LIBRARY.md -## ๐Ÿ“š What Is This? +## What Is This? This learning library is a curated collection of handbooks, guides, visual references, and templates designed to support: - Independent learners seeking to upskill in data science, programming, or AI tools @@ -11,7 +11,7 @@ It brings together open-access resources and review copies in a structured, them --- -## ๐ŸŽฏ Why It Was Built +## Why It Was Built This library was assembled to bridge practical learning (e.g., Excel + AI, creative programming) with foundational thinking (e.g., research design, epistemology). It reflects a commitment to: - Open learning @@ -20,7 +20,7 @@ This library was assembled to bridge practical learning (e.g., Excel + AI, creat --- -## ๐Ÿ“ How It's Organized +## How It's Organized Each folder in this library is organized by theme: @@ -32,7 +32,7 @@ Each folder in this library is organized by theme: --- -## โš–๏ธ Licensing Notes +## Licensing Notes Many files here are educational review copies or open-licensed works: diff --git a/learning_library/CHANGELOG.md b/learning_library/CHANGELOG.md index 571b0ff..f88155f 100644 --- a/learning_library/CHANGELOG.md +++ b/learning_library/CHANGELOG.md @@ -4,22 +4,22 @@ This version includes structural improvements, new value-add resources, and metadata support across the `learning_library/` folder. -### โœ… Enhancements +### Yes Enhancements - Added summaries, tags, and cross-links to each themed folder - Introduced new files: - - `USE_CASES.md` โ€“ Suggested reading tracks - - `ABOUT_THIS_LIBRARY.md` โ€“ Purpose and license context - - `CONTRIBUTING.md` โ€“ Guidelines for contributors - - `docs/index.md` โ€“ Offline learning hub - - `labels/tags.md` โ€“ Shared tags for discoverability - - `workbooks/` โ€“ Starter cheatsheets and AI prompt templates + - `USE_CASES.md` โ€“ Suggested reading tracks + - `ABOUT_THIS_LIBRARY.md` โ€“ Purpose and license context + - `CONTRIBUTING.md` โ€“ Guidelines for contributors + - `docs/index.md` โ€“ Offline learning hub + - `labels/tags.md` โ€“ Shared tags for discoverability + - `workbooks/` โ€“ Starter cheatsheets and AI prompt templates - Updated root `README.md` with: - - Full folder index - - Use suggestions - - Linked documents and learning tools + - Full folder index + - Use suggestions + - Linked documents and learning tools -### ๐Ÿ›ก๏ธ Integrity +### Integrity - **No original files were deleted** - All source PDFs are preserved diff --git a/learning_library/CONTRIBUTING.md b/learning_library/CONTRIBUTING.md index 41ae279..ba84e7f 100644 --- a/learning_library/CONTRIBUTING.md +++ b/learning_library/CONTRIBUTING.md @@ -6,16 +6,16 @@ This project is open to thoughtful additions, annotations, and organizational im --- -## โœ… What You Can Contribute +## Yes What You Can Contribute -- ๐Ÿ“˜ **New resources**: Books, guides, or papers in PDF/Markdown format -- ๐Ÿ“ **Summaries or excerpt notes** for existing files -- ๐Ÿงฐ **Templates**: R markdowns, prompt libraries, or research checklists -- ๐Ÿ”– **Tags**: Add useful topical tags to `README.md` entries +- **New resources**: Books, guides, or papers in PDF/Markdown format +- **Summaries or excerpt notes** for existing files +- **Templates**: R markdowns, prompt libraries, or research checklists +- **Tags**: Add useful topical tags to `README.md` entries --- -## ๐Ÿ“ Folder Placement +## Folder Placement - Place programming/visual examples in `01_programming/` - Data and analytics guides in `02_data_science/` @@ -25,7 +25,7 @@ This project is open to thoughtful additions, annotations, and organizational im --- -## ๐Ÿงพ Naming Convention +## Naming Convention ``` [AuthorLastName] - [ShortTitle] ([Year]).pdf @@ -37,11 +37,11 @@ Examples: --- -## ๐Ÿ”„ How to Contribute +## How to Contribute 1. Fork this repository 2. Add your files to the appropriate folder 3. Update the folder's `README.md` with a summary, tags, and excerpt 4. Open a pull request describing your changes -Thank you for supporting open learning โœจ +Thank you for supporting open learning diff --git a/learning_library/README.md b/learning_library/README.md index 91eb817..ed09901 100644 --- a/learning_library/README.md +++ b/learning_library/README.md @@ -1,60 +1,21 @@ -# ๐Ÿ“š InsightStack โ€“ Learning Library - -Welcome to the InsightStack Learning Library โ€” a curated, structured, and enriched folder of books, handbooks, visual references, and templates across key knowledge domains: - -- ๐ŸŽจ Programming & Creative Coding -- ๐Ÿ“Š Data Science with R and Excel -- ๐ŸŽ“ Research Design & Methodology -- ๐Ÿค– AI-enhanced Workflows -- โœ๏ธ Visual Learning & Concept Sketches - -Each folder includes: -- PDFs or guides -- README with summary, tags, and key excerpts -- Cross-references to related folders -- Prompts, cheatsheets, or learning templates where applicable - ---- - -## ๐Ÿ“‚ Folder Structure - -| Folder | Description | -|--------|-------------| -| [`01_programming/`](01_programming/) | Creative and generative coding resources | -| [`02_data_science/`](02_data_science/) | R programming, Excel, visualization, data analysis | -| [`03_research_methods/`](03_research_methods/) | Research paradigms, design, and digital methods | -| [`04_ai_tools/`](04_ai_tools/) | AI-enhanced workflows and prompt engineering | -| [`05_visual_summaries/`](05_visual_summaries/) | Sketch-based, illustrated learning guides | - ---- - -## ๐Ÿงญ Quick Access Index - -- ๐Ÿ”„ [USE_CASES.md](USE_CASES.md) โ€“ Suggested learning paths by goal -- ๐Ÿงฐ [workbooks/](06_workbooks/) โ€“ Markdown-based templates, cheatsheets, and prompt guides -- ๐Ÿ“˜ [ABOUT_THIS_LIBRARY.md](ABOUT_THIS_LIBRARY.md) โ€“ Background, use rationale, licensing -- ๐Ÿค [CONTRIBUTING.md](CONTRIBUTING.md) โ€“ How to add summaries, templates, or new resources -- ๐Ÿงพ [docs/index.md](docs/index.md) โ€“ Offline-friendly guide to the full structure -- ๐Ÿท๏ธ [labels/tags.md](labels/tags.md) โ€“ Shared tagging structure - ---- - -## ๐Ÿง‘โ€๐ŸŽ“ Who This Is For - -- Independent learners building real-world skills -- Researchers navigating methodology and digital tools -- Development practitioners blending tech + social insight -- Teams who want to explore LLM-enhanced productivity - ---- - -## โš–๏ธ Licensing Notes - -- Open-access items retain attribution and license info -- Fair-use PDFs are for educational, private, or review use only -- If any resource needs to be removed or replaced, open an issue or pull request - ---- - -**Created and maintained by [@varnasr](https://github.com/varnasr)** -Part of the broader [InsightStack](https://github.com/varnasr/InsightStack) repository for accessible knowledge tooling. +# Learning library + +Books, handbooks, visual references and templates in five categories. + +| Folder | Contents | +| --- | --- | +| [`01_programming/`](01_programming/) | Creative and generative coding | +| [`02_data_science/`](02_data_science/) | R, Excel, visualisation, data analysis | +| [`03_research_methods/`](03_research_methods/) | Research design and digital methods | +| [`04_ai_tools/`](04_ai_tools/) | AI-assisted workflows and prompting | +| [`05_visual_summaries/`](05_visual_summaries/) | Illustrated learning guides | + +Also: [USE_CASES.md](USE_CASES.md) for suggested reading by goal, +[workbooks/](06_workbooks/) for templates and cheat sheets, +[ABOUT_THIS_LIBRARY.md](ABOUT_THIS_LIBRARY.md) for background and licensing, +[CONTRIBUTING.md](CONTRIBUTING.md), [docs/index.md](docs/index.md) and +[labels/tags.md](labels/tags.md). + +Open-access items keep their attribution and licence. Fair-use PDFs are for +educational, private or review use. Open an issue to have a resource removed +or replaced. diff --git a/learning_library/USE_CASES.md b/learning_library/USE_CASES.md index 12d9f3e..832653c 100644 --- a/learning_library/USE_CASES.md +++ b/learning_library/USE_CASES.md @@ -4,30 +4,30 @@ This guide outlines how to navigate the Learning Library depending on your goals --- -## ๐ŸŽ“ 1. For Researchers Designing a Study +## 1. For Researchers Designing a Study **Goal:** Ground your research in solid paradigms and practical methods. **Recommended Path:** -- ๐Ÿ“˜ `03_research_methods/Research Methods Handbook.pdf` -- ๐Ÿ“˜ `03_research_methods/Network Collective Action.pdf` -- ๐Ÿ“˜ `02_data_science/An Introduction to R.pdf` (for analyzing collected data) +- `03_research_methods/Research Methods Handbook.pdf` +- `03_research_methods/Network Collective Action.pdf` +- `02_data_science/An Introduction to R.pdf` (for analyzing collected data) --- -## ๐Ÿค– 2. For AI-Enhanced Productivity in Excel +## 2. For AI-Enhanced Productivity in Excel **Goal:** Use AI tools like Copilot and ChatGPT to speed up spreadsheet work. **Recommended Path:** -- ๐Ÿ“˜ `02_data_science/Learning Generative AI Tools for Excel.pdf` -- ๐Ÿงฐ `workbooks/excel_prompt_templates.md` (includes reusable prompts) +- `02_data_science/Learning Generative AI Tools for Excel.pdf` +- `workbooks/excel_prompt_templates.md` (includes reusable prompts) - Also keep an eye on `04_ai_tools/` for future additions --- -## ๐Ÿ“ˆ 3. For Self-Learners Upskilling in Data Science +## 3. For Self-Learners Upskilling in Data Science **Goal:** Build foundations in programming, analysis, and visual interpretation. **Recommended Path:** -- ๐ŸŽจ `01_programming/An Artist's Guide to Programming.pdf` (especially for visual thinkers) -- ๐Ÿ“˜ `02_data_science/An Introduction to R.pdf` -- ๐Ÿ–๏ธ `05_visual_summaries/101 Data Science Drawings.pdf` +- `01_programming/An Artist's Guide to Programming.pdf` (especially for visual thinkers) +- `02_data_science/An Introduction to R.pdf` +- `05_visual_summaries/101 Data Science Drawings.pdf` diff --git a/learning_library/docs/index.md b/learning_library/docs/index.md index 04dce05..0e2fab7 100644 --- a/learning_library/docs/index.md +++ b/learning_library/docs/index.md @@ -1,4 +1,4 @@ -# Welcome to the Learning Library ๐Ÿ“š +# Welcome to the Learning Library This documentation index introduces the curated resource library found in this repository. Youโ€™ll find books, handbooks, visual aids, and templates across: diff --git a/learning_library/labels/tags.md b/learning_library/labels/tags.md index 9266652..7704bea 100644 --- a/learning_library/labels/tags.md +++ b/learning_library/labels/tags.md @@ -2,13 +2,13 @@ This file lists commonly used tags across the learning library to aid discoverability and future search/filtering. -## ๐ŸŽจ Programming & Visual Coding +## Programming & Visual Coding - #processing - #creativecoding - #generativeart - #visuallearners -## ๐Ÿ“Š Data Science & Analytics +## Data Science & Analytics - #rstats - #datavis - #excel @@ -16,19 +16,19 @@ This file lists commonly used tags across the learning library to aid discoverab - #openai - #chatgpt -## ๐ŸŽ“ Research Methods +## Research Methods - #epistemology - #paradigms - #qualitativemethods - #digitalmethods - #mixedmethods -## ๐Ÿค– AI Tools +## AI Tools - #copilot - #promptengineering - #automation -## ๐Ÿ“š Resource Types +## Resource Types - #handbook - #cheatsheet - #template diff --git a/network_effects_sni/README.md b/network_effects_sni/README.md index 066d59c..b66403a 100644 --- a/network_effects_sni/README.md +++ b/network_effects_sni/README.md @@ -1,8 +1,8 @@ # network_effects_sni -Social network analysis on self-help group and village data: who is connected to -whom, whether outcomes co-move within a group, and how far a practice would -spread from a given set of seeds. +Social network analysis on self-help group and village data: who is +connected to whom, whether outcomes move together within a group, and how +far a practice spreads from a set of seeds. ```bash python -m network_effects_sni.demo # the whole chain @@ -11,89 +11,54 @@ python -m network_effects_sni.test_network_effects # 17 tests, 40 checks Needs `networkx`, `pandas`, `numpy`, `statsmodels`, `scipy`. -## Three steps +## Modules -**`network.py`** builds the graph and measures position. `attach_centrality` -returns degree, betweenness and eigenvector centrality merged back onto the -frame. +`network.py` builds the graph and measures position. `attach_centrality` +returns degree, betweenness and eigenvector centrality merged onto the frame. -**`peer_effects.py`** asks whether a member's savings move with her peers'. +`peer_effects.py` tests whether a member's savings move with her peers'. `peer_association` uses leave-one-out peer means, clusters standard errors on -the group, and optionally absorbs village fixed effects. - -**`diffusion.py`** runs a linear threshold cascade. `compare_strategies` puts -the same seeding budget behind random, degree, betweenness and one-per-group and -reports how far each gets. - -## Three things this will not tell you - -**Centrality here is group size wearing a different name.** The graph is built by -assuming everyone in a self-help group is connected to everyone else in it, so -within a group every member has identical degree and identical eigenvector -centrality. All the variation across the sample is variation in how big the -groups are. A test asserts this rather than leaving it to be discovered. - -To measure individual position you need the instrument to ask who each member -actually goes to for advice. That gives a directed graph with real within-group -variation, and then centrality means what people assume it means. - -**The peer regression is an association and cannot be more.** Manski's reflection -problem: a positive coefficient is consistent with three different worlds and the -data cannot separate them. Members may respond to each other's behaviour -(the thing you want), or to each other's characteristics, or they may simply -share a village, a bank, a rainfall shock, and the fact that they chose each -other in the first place. Leave-one-out means remove the mechanical part of the -problem and leave the identification part exactly where it was. - -What would identify it is exogenous variation in who is grouped with whom: -randomised assignment, or the intransitive network structure Bramoullรฉ, -Djebbari and Fortin (2009) exploit, where a friend's friend who is not your -friend supplies the instrument. Fully connected groups have no such structure. -`peer_association` returns an `interpretation` string saying so, and -`print_result` prints it under every estimate. - -**A cascade cannot leave the component it starts in.** On this data the five -groups have no edges between them, so no seeding strategy reaches a group it did -not seed. That is worth seeing, because it says the binding constraint is the -network rather than the targeting rule. - -## What the demo shows, and why it is counterintuitive - -With five seeds and a 0.3 threshold, concentrating all five in the largest group -reaches fifteen members. Spreading one per group reaches five, which is to say -nobody beyond the women who were trained. - -The reason is arithmetic on the threshold, not anything about centrality. Five -seeds in a group of fifteen is a third of it, which clears 0.3 and takes the -whole group. One seed in a group of five is a fifth, clears nothing, and stops. -Change the threshold and the ranking changes with it. This is why the model is -worth running with your own threshold rather than quoting a rule of thumb about -targeting central nodes. - -## What this replaced - -Four scripts that could not run as a chain. `sni_analysis.py` wrote its plot to -a `visualizations/` directory that does not exist in the repository, so it -raised `FileNotFoundError` after doing all the work. `calculate_sni.py` -duplicated most of it under different column names and wrote a file nothing -read. `peer_effects_regression.py` opened a CSV under a path neither script -wrote. `diffusion_model.py` picked its seed with `random.choice` and no seed -set, so two runs gave different answers and neither could be checked. - -The peer regression also computed a group mean *including* the member's own -savings, on the line above the leave-one-out version, and left both in the -frame. `test_including_your_own_value_would_manufacture_the_finding` shows what -that costs: on pure noise with no peer structure at all, the with-self version -returns a large positive coefficient, because the regressor contains the -dependent variable. +the group, and can absorb village fixed effects. + +`diffusion.py` runs a linear threshold cascade. `compare_strategies` gives +the same seeding budget to random, degree, betweenness and one-per-group +seeding and reports the reach of each. + +## Limits + +Centrality on this data is group size. The graph assumes every member of a +group is connected to every other, so within a group all members have the +same degree and eigenvector centrality. To measure individual position, the +instrument has to ask who each member goes to for advice. + +The peer regression is an association. A positive coefficient is consistent +with members responding to each other's behaviour, responding to each other's +characteristics, or sharing a village, a bank and a rainfall shock (Manski +1993). Leave-one-out means remove the mechanical part of the problem, not the +identification part. Identification needs exogenous variation in group +membership, such as randomised assignment or the network structure Bramoullรฉ, +Djebbari and Fortin (2009) use. `peer_association` returns an +`interpretation` string saying this and `print_result` prints it. + +A cascade cannot leave the component it starts in. On this data the five +groups have no edges between them, so no seeding strategy reaches a group it +did not seed. + +## The demo + +With five seeds and a 0.3 threshold, five seeds in the largest group (fifteen +members) reach the whole group, because a third of it clears the threshold. +One seed per group reaches nobody beyond the seeds, because a fifth of a +five-member group does not. The ranking of strategies depends on the +threshold; run it with your own. ## Sources -Manski, "Identification of endogenous social effects: the reflection problem", -*Review of Economic Studies* 60(3), 1993, 531-542. +Manski, "Identification of endogenous social effects: the reflection +problem", *Review of Economic Studies* 60(3), 1993, 531-542. -Bramoullรฉ, Djebbari and Fortin, "Identification of peer effects through social -networks", *Journal of Econometrics* 150(1), 2009, 41-55. +Bramoullรฉ, Djebbari and Fortin, "Identification of peer effects through +social networks", *Journal of Econometrics* 150(1), 2009, 41-55. Granovetter, "Threshold models of collective behavior", *American Journal of Sociology* 83(6), 1978, 1420-1443. diff --git a/replication/README.md b/replication/README.md index 2283fa8..450afd2 100644 --- a/replication/README.md +++ b/replication/README.md @@ -1,66 +1,48 @@ # replication -A replication package that can be verified, not just re-run. +A replication package with one entry point, a recorded result and a check +that the run still matches it. ``` python replication/run_all.py # run from raw data, write output/, verify against the record -Rscript replication/run_regression.R # the same model in R; run_all then checks the two agree +Rscript replication/run_regression.R # the same model in R python replication/test_replication.py # 4 tests, 12 checks ``` -## What "verified" means here +`run_all.py` fits the model, writes every output, and compares the key +results with `expected_results.json`. Any difference exits 1 and names the +result that moved. `--record` overwrites the record after a deliberate +change. -`run_all.py` fits the model, writes every output, and compares the numbers a -reader would quote against `expected_results.json`. Any difference exits 1 and -names the result that moved. `--record` overwrites the record after a -deliberate change, and that change then shows in the diff of one small file. +`run_regression.R` fits the same model in R. `verify.py` checks that Python +and R agree on point estimates, R-squared and group means, to six places. +Standard errors are not compared: the Python uses HC1, the R uses +conventional errors. -`run_regression.R` fits the same model and writes the same key results, and -`verify.py` checks that Python and R agree on the point estimates, R-squared -and group means. They do, to six places. Standard errors are not compared, -because the Python uses HC1 and the R uses conventional errors; installing -`sandwich` was not worth it for a check on point estimates. +`test_replication.py` corrupts one value in a copy and confirms the +verification fails. -`test_replication.py` corrupts one outcome value in a copy and confirms the -verification fails. A verification step that cannot fail is not verifying -anything, and that test is the reason to trust the green run. - -## Layout +## Files | File | What it is | -|---|---| -| `data/simulated_study_data.csv` | 100 rows, synthetic. `id`, `treatment`, `age`, `income`, `outcome` | +| --- | --- | +| `data/simulated_study_data.csv` | 100 synthetic rows: `id`, `treatment`, `age`, `income`, `outcome` | | `analysis.py` | The model as functions: load, descriptives, fit, coefficient table, key results | | `run_all.py` | Runs it end to end and verifies | | `verify.py` | The comparison, and the Python-against-R check | -| `expected_results.json` | The record: eight numbers and the model spec | +| `expected_results.json` | Eight numbers and the model spec | | `run_regression.R` | The R cross-check | | `output/` | Written on each run; not committed | -## Checklist for your own package - -The structure is the point; the model is a placeholder. When you replace it: - -1. **Data.** Raw data in `data/`, never edited by hand. If it cannot be - shared, a `make_fixture.py` that builds a synthetic file with the same - structure, as `data_starters/` does in this repository. -2. **One entry point.** A reader runs one command. Every intermediate file is - produced by it, so nothing depends on a step that happened once on your - laptop. -3. **Environment.** `output/environment.txt` records exact versions on every - run. Pin them in a `requirements.txt` when you publish. -4. **The record.** Round the key results to what the data supports, store - them, and compare exactly. A tolerance hides drift; rounding in one place - does not. -5. **A second implementation** of the headline number, in another language or - at least another library. Agreement between two independent routes is the - cheapest strong evidence that neither is wrong. -6. **A test that the verification can fail.** Corrupt a value in a copy and - confirm the run goes red. - -## What this replaced - -Two scripts, one Python and one R, each fitting the regression and writing a -text summary to a path that only resolved from inside `scripts/`. Nothing -compared them to each other or to anything, so a changed dataset produced a -different summary and no signal. +## Using the structure for your own package + +1. Raw data in `data/`, never edited by hand. If it cannot be shared, a + `make_fixture.py` that builds a synthetic file with the same structure. +2. One entry point that produces every intermediate file. +3. `output/environment.txt` records versions on every run; pin them in a + `requirements.txt` when you publish. +4. Round the key results to what the data supports, store them, and compare + exactly. +5. A second implementation of the headline number, in another language or + another library. +6. A test that the verification can fail. diff --git a/spss_scripts/README.md b/spss_scripts/README.md index a5a26da..3ef4551 100644 --- a/spss_scripts/README.md +++ b/spss_scripts/README.md @@ -1,12 +1,12 @@ -# SPSS MEL Scripts +# SPSS scripts -This folder includes real `.sps` syntax files for MEL-related recoding, tabulations, and Excel exports โ€” based on field research formats in India. +Syntax files for recoding, tabulation and export, in the formats used in +field research in India. -## ๐Ÿ“‚ Folder Contents -- `recode_demographics.sps` โ€“ Recode gender and education variables -- `tabulate_indicators.sps` โ€“ Crosstab indicators by gender and district -- `export_results_excel.sps` โ€“ OMS command to export SPSS tables to `.xlsx` -- `sample_spss_data.csv` โ€“ Cleaned data file to test logic +- `recode_demographics.sps`: recode gender and education variables +- `tabulate_indicators.sps`: crosstab indicators by gender and district +- `export_results_excel.sps`: OMS command to export tables to `.xlsx` +- `sample_spss_data.csv`: a data file to test the syntax on -## ๐Ÿง  Use Case -SPSS is still widely used in government programs and legacy research contexts in India. These scripts match the workflows of health surveys, education assessments, and program evaluations. \ No newline at end of file +`spss_tools/` holds further files for cleaning, regression, missing data +and frequencies. diff --git a/stata_snippets/README.md b/stata_snippets/README.md index e2b99ea..4937efd 100644 --- a/stata_snippets/README.md +++ b/stata_snippets/README.md @@ -1,6 +1,6 @@ -## ๐Ÿ“‚ Repository Structure: Folder-by-Folder +# Stata snippets -This repository is organized by functional workflow. Each folder contains complete `.do` files and simulated Indian datasets. All code is runnable and documented for clarity and reproducibility. +Do-files organised by task, each with the simulated dataset it reads. | Folder | Description | Scripts Inside | Dataset(s) Used | |----------------------|----------------------------------------------------------|------------------------------------------------|--------------------------------| diff --git a/stata_snippets/ROADMAP.md b/stata_snippets/ROADMAP.md index 819f172..6cf5b76 100644 --- a/stata_snippets/ROADMAP.md +++ b/stata_snippets/ROADMAP.md @@ -1,10 +1,10 @@ -# ๐Ÿงญ Roadmap: Future Expansions for the Stata Methods Repository +# Roadmap: Future Expansions for the Stata Methods Repository This repository already includes a comprehensive set of applied Stata scripts for survey, analysis, and evaluation workflows. Below are planned and proposed expansions to support more advanced or niche methods. --- -## ๐ŸŸก Planned for Addition +## Planned for Addition ### 1. Stratified Block Randomization - Simulate block assignment in RCT design @@ -13,7 +13,7 @@ This repository already includes a comprehensive set of applied Stata scripts fo --- -## ๐Ÿ”ด Advanced/External Integration (Future) +## Advanced/External Integration (Future) ### 2. Synthetic Control Methods - Often used in policy evaluation and comparative interrupted time series @@ -22,7 +22,7 @@ This repository already includes a comprehensive set of applied Stata scripts fo --- -## ๐Ÿง  Other Ideas (Open for Contributions) +## Other Ideas (Open for Contributions) - Regression Discontinuity with bandwidth diagnostics - Heterogeneous treatment models using `grteffects`, `xteffects` @@ -31,5 +31,5 @@ This repository already includes a comprehensive set of applied Stata scripts fo --- -๐Ÿ“ฌ Have a method you'd like added? + Have a method you'd like added? File an issue or send a suggestion to `varna.sr@gmail.com` \ No newline at end of file diff --git a/stata_snippets/design_coverage.md b/stata_snippets/design_coverage.md index 8440acb..6a7c006 100644 --- a/stata_snippets/design_coverage.md +++ b/stata_snippets/design_coverage.md @@ -1,8 +1,8 @@ -# ๐Ÿงช Research Designs Covered in This Repository +# Research Designs Covered in This Repository This repository includes working Stata scripts and datasets aligned to multiple real-world research designs commonly used in evaluation, development economics, and applied social science. -## โœ… Design Types and Coverage +## Yes Design Types and Coverage | Design Type | Folder | Script(s) | Description | |-------------|--------|-----------|-------------| @@ -17,6 +17,6 @@ This repository includes working Stata scripts and datasets aligned to multiple --- -## ๐Ÿ“Œ All scripts are paired with synthetic, simulated Indian datasets and annotated for clarity and reproducibility. +## All scripts are paired with synthetic, simulated Indian datasets and annotated for clarity and reproducibility. For questions or extensions (e.g., RDD, synthetic controls), please open an issue or contact the repository author. \ No newline at end of file diff --git a/stata_snippets/stata_mel/README.md b/stata_snippets/stata_mel/README.md index dba7c4f..d80c2b7 100644 --- a/stata_snippets/stata_mel/README.md +++ b/stata_snippets/stata_mel/README.md @@ -2,11 +2,11 @@ This folder contains `.do` scripts for standard analysis in Monitoring, Evaluation, and Learning work using [Stata](https://www.stata.com/). -## ๐Ÿ“‚ Folder Contents +## Folder Contents - `survey_weights.do` โ€“ Survey design and weighting syntax for Indian household surveys - `did_estimator.do` โ€“ Difference-in-Differences model for before-after evaluation - `equity_plot.do` โ€“ Code to visualize coverage by economic quintile - `sample_mel_data.csv` โ€“ Sample MEL dataset to test the code -## ๐Ÿง  Use Case +## Use Case These scripts are used in evaluations of public programs, social protection, and gender audits. They follow common practices in Indian survey data analysis and program evaluation. \ No newline at end of file diff --git a/survey_to_codebook/README.md b/survey_to_codebook/README.md index 2372e4d..ffdbcdc 100644 --- a/survey_to_codebook/README.md +++ b/survey_to_codebook/README.md @@ -1,48 +1,35 @@ # survey_to_codebook -An XLSForm already contains everything a codebook needs, question by question. -This writes it out as one document a reviewer or analyst can read top to -bottom, and reports the defects it finds in the form on the way. +Writes a codebook from an XLSForm, one document a reviewer can read top to +bottom, and reports defects in the form. ``` python -m survey_to_codebook input/survey.xlsx -o output/codebook.md --csv output/dictionary.csv python survey_to_codebook/test_survey_to_codebook.py # 9 tests, 27 checks ``` -Exit status is 1 when the form has a problem, so it can gate a deployment. +Exit status is 1 when the form has a problem. -## What the codebook records +## Output -For every variable: the export path (`group/question`, matching the column name -the platform will produce), type, label, hint, whether it is required, the -relevance expression it is asked under, its constraint, and for a select the -full choice list with codes. Metadata rows (`start`, `end`, `deviceid`, -`calculate`, `note`) are kept and marked, so a reader knows which columns in -the export are not answers. +For every variable: the export path (`group/question`, matching the column +name the platform produces), type, label, hint, whether it is required, its +relevance expression, its constraint, and for a select the full choice list +with codes. Metadata rows (`start`, `end`, `deviceid`, `calculate`, `note`) +are kept and marked. -The `--csv` output is a flat dictionary in the shape `label_variables/` reads, -with the choice lists as `code=label|...` value labels. So a form's own choices -become the value labels on its exported data, with nothing retyped. +`--csv` writes a flat dictionary in the shape `label_variables/` reads, with +choice lists as `code=label|...` value labels. -## What it catches +## Defects reported -| Problem | Why it matters | -|---|---| -| A select naming a choice list that is not on the choices sheet | The form will not deploy, and a codebook that silently prints an empty list hides why | -| A choice list no question uses | Usually a renamed question; the old list is a fossil | +| Problem | Effect | +| --- | --- | +| A select names a choice list not on the choices sheet | The form will not deploy | +| A choice list no question uses | Usually a renamed question | | A group opened and never closed | Every later path is wrong | | The same variable name twice | The export overwrites one column with the other | -| A group name written in the `type` cell (`begin_group personal`) with `name` blank | Some exports do this; both spellings are read | +| A group name in the `type` cell (`begin_group personal`) with `name` blank | Read either way | -The bundled `input/survey.xlsx` shipped with the first of these: the form said -`select_multiple hobbies` and the choices sheet named the list `hobby`. The -previous notebook printed a codebook with an empty choice list and no comment. -This tool reported it on the first run, and the sample is now fixed. - -## What this replaced - -A notebook that iterated the survey sheet and printed a heading per row. It did -not know about groups, so every path was wrong for a grouped question; it -handled `select_one` and not `select_multiple`; and it looked up choice lists -by splitting on whitespace and taking the second token, which works until a -list name has a space in it. +The bundled `input/survey.xlsx` once had the first of these (`select_multiple +hobbies` against a list named `hobby`); it is fixed. diff --git a/taguette_coding/README.md b/taguette_coding/README.md index d4e9141..a9122bb 100644 --- a/taguette_coding/README.md +++ b/taguette_coding/README.md @@ -1,58 +1,39 @@ # Qualitative coding with Taguette -One coded focus group discussion, start to finish: the transcript, the tag -file Taguette produced, and the export that goes to analysis. This is the -worked example for the qualitative half of a mixed-methods evaluation, and -the method note that goes with it. +One focus group discussion coded start to finish: the transcript, the tag +file, and the export that goes to analysis. | File | What it is | -|---|---| -| `chhattisgarh_chw_fgd.txt` | A focus group discussion with community health workers, as the transcript Taguette reads. Illustrative, not a real group | -| `chhattisgarh_chw_fgd.tag.json` | The tags applied to it, with the highlighted spans, in Taguette's own export format | -| `tag_summary_export.html` | Every highlight grouped by tag, which is the document you actually analyse from | - -Taguette is free, open source, and runs locally (`pip install taguette`, -then `taguette`) or on the hosted service. It does one thing: highlight a -span of text and attach a tag. That is the whole of qualitative coding, and -the expensive tools do not do it better. - -## The method, in the order it happens - -**1. Decide the coding frame before opening the transcript.** A codebook of -eight to fifteen tags, each with a one-line definition and an example, drawn -from the evaluation questions. Tags invented while reading are fine and -should be added, but a frame that exists only in the coder's head cannot be -applied by a second coder, and a second coder is the whole check. - -**2. Code the same two transcripts independently, then compare.** Where two -coders tag the same passage differently, the definition is ambiguous. Fix -the definition, not the coder. Do this before coding the other thirty. - -**3. Code for what is said, not for what you expected.** The tag -`barrier_transport` goes on a passage about the bus not coming, whether or -not the evaluation question was about transport. Tags for the questions you -came with are necessary; tags for what the respondents brought are where the -finding is. - -**4. Export by tag, and read each tag's passages together.** That is what -`tag_summary_export.html` is. A theme is a tag whose passages, read -together, say something the individual quotes did not. - -**5. Count, carefully.** "Eleven of fourteen groups raised transport -unprompted" is a defensible sentence. "78 per cent of respondents cited -transport as a barrier" is the same fact dressed as a survey result, and a -focus group is not a sample. - -## What this cannot do - -Taguette has no query language, no co-occurrence matrix, no inter-coder -statistic. For a study with a hundred transcripts and three coders, that -matters, and NVivo or MAXQDA earn their price. For an evaluation with -fifteen focus groups and one coder checked by a second, they do not. - -## Related - -`../visual_ethnography_descript/` for the same discipline applied to recorded -rather than transcribed material. `../annotated_research/annotation_scheme.md` -tag **[MEASURE]** for what a self-reported answer in a group setting is -evidence of. +| --- | --- | +| `chhattisgarh_chw_fgd.txt` | A focus group discussion with community health workers. Illustrative, not a real group | +| `chhattisgarh_chw_fgd.tag.json` | The tags and highlighted spans, in Taguette's export format | +| `tag_summary_export.html` | Every highlight grouped by tag | + +Taguette is free and open source. It runs locally (`pip install taguette`, +then `taguette`) or on the hosted service. It highlights a span of text and +attaches a tag. + +## Method + +1. Decide the coding frame before opening the transcript: eight to fifteen + tags, each with a one-line definition and an example, drawn from the + evaluation questions. Add tags while reading, but write them down. +2. Code the same two transcripts independently, then compare. Where two + coders differ on a passage, fix the definition. +3. Code what is said, not what you expected. `barrier_transport` goes on a + passage about the bus not coming whether or not transport was a question. +4. Export by tag and read each tag's passages together. That is + `tag_summary_export.html`. +5. Count carefully. "Eleven of fourteen groups raised transport unprompted" is + defensible. "78 per cent of respondents cited transport" is not, because a + focus group is not a sample. + +## Limits + +Taguette has no query language, co-occurrence matrix or inter-coder +statistic. For a hundred transcripts and three coders, NVivo or MAXQDA are +worth their price. For fifteen focus groups and one coder checked by a +second, they are not. + +Related: `../visual_ethnography_descript/` for recorded material; +`../annotated_research/annotation_scheme.md`, tag **[MEASURE]**. diff --git a/tool_notes/README.md b/tool_notes/README.md index 79d3d1a..6cf8391 100644 --- a/tool_notes/README.md +++ b/tool_notes/README.md @@ -1,41 +1,23 @@ # tool_notes -Short, honest notes on nine visual, document and collaboration tools, with the one -worked file each note needs to make its point. When the tool is worth the -setup, when it is not, and what will go wrong. +Notes on nine visual, document and collaboration tools: when to use each, +when not to, and what goes wrong, with one example file per tool. -These were nine top-level folders, each presented as a module. None of them -is: the tools live on their own sites, and what a repository can usefully hold -about them is a page of judgement plus a small example, which is what each -folder now contains. They are here together so nobody mistakes a -screenshot for a template again. +| Note | Tool | In the folder | +| --- | --- | --- | +| [`excalidraw_frameworks/`](excalidraw_frameworks/) | Excalidraw | Two editable diagrams, a MEL results chain and a district ecosystem map, with PNG previews | +| [`kumu_maps/`](kumu_maps/) | Kumu | A stakeholder map of a district health network as Kumu JSON, with a preview | +| [`observable_notebooks/`](observable_notebooks/) | Observable | An `.ojs` notebook plotting district coverage, its CSV, and a screenshot | +| [`open_data_editor/`](open_data_editor/) | RawGraphs, Datawrapper, Open Data Editor | A district indicators CSV shaped for those tools, and one chart | +| [`flourish_charts/`](flourish_charts/) | Flourish | The embed snippet and a screenshot | +| [`powerbi_reports/`](powerbi_reports/) | Power BI | An adaptation note and a screenshot; no `.pbix` ships | +| [`miro/`](miro/) | Miro | A design-session outline and links; no board ships | +| [`excel_visuals/`](excel_visuals/) | Excel | Three chart templates: bullet, waterfall, Gantt | +| [`latex/`](latex/) | LaTeX | A report skeleton that compiles with `pdflatex` | -| Note | Tool | What is actually in the folder | -|---|---|---| -| [`excalidraw_frameworks/`](excalidraw_frameworks/) | Excalidraw | Two editable `.excalidraw` diagrams, a MEL results chain and a district ecosystem map, with PNG previews | -| [`kumu_maps/`](kumu_maps/) | Kumu | One stakeholder map of a district health network as Kumu JSON, with a preview | -| [`observable_notebooks/`](observable_notebooks/) | Observable | One `.ojs` notebook plotting district coverage, its CSV, and a screenshot | -| [`open_data_editor/`](open_data_editor/) | RawGraphs, Datawrapper, Open Data Editor | A district indicators CSV shaped for those tools, and one chart made from it | -| [`flourish_charts/`](flourish_charts/) | Flourish | The iframe embed snippet, and a screenshot of a chart | -| [`powerbi_reports/`](powerbi_reports/) | Power BI | An adaptation note. No `.pbix` ships; the note links to Microsoft's sample | -| [`miro/`](miro/) | Miro | A human-centred design session outline and links. No board ships | -| [`excel_visuals/`](excel_visuals/) | Excel | Three chart templates as `.xlsx`: bullet, waterfall, Gantt | -| [`latex/`](latex/) | LaTeX | A report skeleton that compiles with `pdflatex`, and where it is worth the learning curve | - -## The one judgement that applies to all seven - -Each of these tools is quicker than code for the first version and slower than -code for the tenth. A Flourish chart takes twenty minutes to make and twenty -minutes to remake when the data changes; a script takes two hours the first -time and two seconds thereafter. So the deciding question is how many times the -output will change. A one-off workshop artefact belongs in Miro or Excalidraw. -A quarterly indicator chart belongs in `ggplot2` or `matplotlib`, and this -repository's `stata_snippets/`, `econometrics/` and FieldStack's -`visualisation/` are where to start. - -The second judgement is where the file lives. Everything in Kumu, Flourish, -Observable and Miro lives on their servers under their terms. A district health -network map with named officials is data about people, and it should not sit on -a third-party server without someone having decided that it can. Excalidraw and -RawGraphs run in the browser without an account and keep nothing, which is why -they are the two of the seven that this repository recommends without a caveat. +Two points apply to all of them. These tools are quicker than code for a +first version and slower for the tenth, so a one-off workshop artefact +belongs in Miro or Excalidraw and a quarterly indicator chart belongs in +`ggplot2` or `matplotlib`. And Kumu, Flourish, Observable and Miro keep +files on their servers under their terms; Excalidraw and RawGraphs run in +the browser and keep nothing. diff --git a/tool_notes/excel_visuals/README.md b/tool_notes/excel_visuals/README.md index 12f9e73..ce0495d 100644 --- a/tool_notes/excel_visuals/README.md +++ b/tool_notes/excel_visuals/README.md @@ -19,8 +19,7 @@ report needs and a default Excel chart does badly. ## When not to Anything that will be produced more than once from data that arrives as a -file. Paste-into-a-template is a manual step every time, and it is the step -that gets done wrong at 6 p.m. before a deadline. FieldStack's +file. Pasting into a template is a manual step every time. FieldStack's `custom_viz/` has the bullet and waterfall charts as R code that reads the data and draws. diff --git a/tool_notes/kumu_maps/README.md b/tool_notes/kumu_maps/README.md index 4c26871..7eb6745 100644 --- a/tool_notes/kumu_maps/README.md +++ b/tool_notes/kumu_maps/README.md @@ -15,8 +15,7 @@ lays it out; you adjust. Stakeholder and influence mapping where the point is the *structure* of a system rather than any number in it, and where the map will be presented and -talked through rather than analysed. Kumu's strength is that a non-technical -audience reads it immediately. Power and interest analysis, supervision chains, +talked through rather than analysed. Power and interest analysis, supervision chains, who-talks-to-whom in a district health system. ## When not to diff --git a/tool_notes/latex/README.md b/tool_notes/latex/README.md index 58e7caa..caa68d0 100644 --- a/tool_notes/latex/README.md +++ b/tool_notes/latex/README.md @@ -25,7 +25,7 @@ reviewer who does not write it. Overleaf softens this and does not remove it. For a donor report, a policy brief, or anything a non-technical colleague must edit, use Word or Quarto, which renders to Word. -Quarto is the honest middle: Markdown with code chunks, rendering to PDF +Quarto is the middle option: Markdown with code chunks, rendering to PDF through LaTeX when you want that and to Word when you do not. FieldStack's `notebooks/` and `automated_reporting/` are Quarto. diff --git a/tool_notes/latex/field_use_case_latex.md b/tool_notes/latex/field_use_case_latex.md index c55ca2d..1e3dab6 100644 --- a/tool_notes/latex/field_use_case_latex.md +++ b/tool_notes/latex/field_use_case_latex.md @@ -1,5 +1,5 @@ -# ๐Ÿ“š Field Use Case: Using LaTeX for Community Documentation in Assam +# Field Use Case: Using LaTeX for Community Documentation in Assam ## Context diff --git a/tool_notes/miro/README.md b/tool_notes/miro/README.md index 0f038b0..c6e7345 100644 --- a/tool_notes/miro/README.md +++ b/tool_notes/miro/README.md @@ -22,8 +22,8 @@ good substitute for a wall and a stack of Post-its when there is no wall. A workshop where everyone is in the room. Paper is faster, needs no login, and the people least comfortable with a laptop are often the people whose input -matters most. Miro in a physical room is a way of making the facilitator the -only person who can write on the wall. +matters most. In a physical room Miro makes the facilitator the only person who can +write on the wall. And anything that needs to survive: a Miro board is a snapshot on a third-party server, and the free plan limits how many you can keep. Export the diff --git a/tool_notes/miro/miro_use_case_india.md b/tool_notes/miro/miro_use_case_india.md index 3bf39cb..198df89 100644 --- a/tool_notes/miro/miro_use_case_india.md +++ b/tool_notes/miro/miro_use_case_india.md @@ -1,7 +1,7 @@ # Using Miro in a Real-World Indian Field Context -## ๐Ÿงพ Case Title: Mapping Frontline Health Gaps in Khunti, Jharkhand +## Case Title: Mapping Frontline Health Gaps in Khunti, Jharkhand In early 2023, a participatory Theory of Change (ToC) session was organized in Khunti district, Jharkhand, with IHCRF fellows, local NGO staff, and district ASHA supervisors. The goal was to jointly identify bottlenecks in maternal health access and visualize realistic solutions. @@ -13,12 +13,12 @@ Using Miroโ€™s color-coded notes (yellow for gaps, blue for opportunities), the By the end, the board included four clear clusters and a visual ToC that the block-level planning unit adopted into their next quarterly strategy. The exported Miro board (PDF + PNG) was printed and shared in Hindi with community partners. -## ๐Ÿ” Why Miro Worked +## Why Miro Worked - **Remote prep**: The board was created collaboratively by the facilitators in advance, saving time. - **Hybrid-ready**: Those unable to use Miro participated via WhatsApp or phone while facilitators added their inputs. - **Transparency**: The visual trace of discussion allowed revisiting any idea or missed voice post-session. -## ๐Ÿง  Key Tip +## Key Tip Prep anchor participants (e.g., one fellow and one ASHA) ahead of time to model confidence in using the board during the live session. diff --git a/tool_notes/observable_notebooks/README.md b/tool_notes/observable_notebooks/README.md index 562498b..28a118a 100644 --- a/tool_notes/observable_notebooks/README.md +++ b/tool_notes/observable_notebooks/README.md @@ -34,4 +34,4 @@ breaks when someone forks it and the file attachment does not come along. And `.ojs` is not JavaScript, whatever the extension suggests: cells are declarative and execution order is by dependency, so a cell that uses a variable defined "later" in the file is fine and a loop that mutates one is -not. If you are debugging something that "should work", that is usually why. +not. diff --git a/tool_notes/open_data_editor/README.md b/tool_notes/open_data_editor/README.md index 6353988..fd6f725 100644 --- a/tool_notes/open_data_editor/README.md +++ b/tool_notes/open_data_editor/README.md @@ -15,7 +15,7 @@ data that is already clean. RawGraphs (rawgraphs.io) runs in the browser and keeps nothing, so it is safe with real data. Datawrapper hosts the chart and gives you an embed, so it is the right choice when the chart is going on a web page. The Open Data Editor (from Frictionless Data) is for checking a CSV's -structure before charting it, which is more useful than it sounds. +structure before charting it, before charting it. ## When not to diff --git a/tool_notes/powerbi_reports/README.md b/tool_notes/powerbi_reports/README.md index 494087b..54a2e17 100644 --- a/tool_notes/powerbi_reports/README.md +++ b/tool_notes/powerbi_reports/README.md @@ -1,8 +1,7 @@ # Power BI -An adaptation note. No `.pbix` file ships here, and none is going to: a Power BI -report is bound to its data source, and a template with no data behind it is a -blank canvas with a menu. +An adaptation note. No `.pbix` file ships: a Power BI report is bound to its +data source, and a template without data is an empty canvas. | File | What it is | |---|---| @@ -30,7 +29,7 @@ PDF export works without asking anyone to buy anything. ## What goes wrong -**The refresh schedule is the product.** A dashboard is only as current as its +A dashboard is only as current as its last refresh, and a `.pbix` on someone's laptop refreshes when they open it. Publishing to the service with a scheduled refresh against a source the organisation controls is the whole setup; without it you have a screenshot diff --git a/tools_used.md b/tools_used.md index a43ebf1..d882a18 100644 --- a/tools_used.md +++ b/tools_used.md @@ -2,28 +2,28 @@ This repository includes examples and scripts using the following open-source tools: -## ๐Ÿ Python +## Python - pandas - numpy - statsmodels - pyreadstat (optional) - Jupyter Notebooks -## ๐Ÿงฎ R +## R - haven - labelled - dplyr - base R -## ๐Ÿ“Š STATA +## STATA - .do file scripting - misstable, duplicates report, label variable -## ๐Ÿ“„ SPSS (notebook) +## SPSS (notebook) - .sav file handling - visual analytics (descriptives, factor analysis) -## ๐Ÿงพ Others +## Others - Excel (XLSForms) - Markdown (documentation/codebooks) - Excalidraw, Miro (visual diagrams) diff --git a/visual_ethnography_descript/README.md b/visual_ethnography_descript/README.md index e4e650d..0fe41c1 100644 --- a/visual_ethnography_descript/README.md +++ b/visual_ethnography_descript/README.md @@ -1,53 +1,39 @@ # Working with recorded fieldwork -A transcript, and a storyboard that shows how a recording becomes analysable -material. Descript is the tool named because it transcribes and lets you cut -the recording by editing the text, but the method is the same in any -transcription tool, and most of it is about what happens before the -recording is made. +A transcript and a storyboard showing how a recording becomes material for +analysis. Descript is named because it transcribes and lets you cut the +recording by editing the text; the method applies to any transcription tool. | File | What it is | -|---|---| -| `climate_field_transcript.txt` | A transcript of an interview about a flood season with a farming household. Illustrative | +| --- | --- | +| `climate_field_transcript.txt` | An interview about a flood season with a farming household. Illustrative | | `descript_storyboard.md` | The sequence from recording to clips to quotes, and what is decided at each step | -## The method - -**Consent covers the recording, and it is a different consent.** Agreeing to -be interviewed is not agreeing to be recorded, and agreeing to be recorded is -not agreeing to have a clip of your voice shown at a workshop. Three -consents, asked separately, and the third can be withheld while the first -two are given. The storyboard has the wording. - -**Transcribe everything, quote sparingly.** Automatic transcription of Hindi -or Bangla speech in a noisy courtyard is around 80 per cent accurate on a -good day, which is good enough to find the passages and not good enough to -quote. Every quoted passage is checked against the audio by someone who -speaks the language. Descript makes this fast because the transcript is -time-linked; it does not make it optional. - -**Cut for the respondent's meaning, not the report's.** A twelve-second clip -in which a farmer says the embankment failed is compelling and may be -exactly what she said. If the following forty seconds explain that it -failed because her own village removed the sluice gate, the clip is a -misrepresentation and the fact that every word in it is hers does not -change that. The storyboard's rule is that a clip is cut with its context -visible to whoever approves it. - -**Recorded material identifies people.** A voice is identifying; a face is -identifying; a description of the field next to the embankment identifies -the household to everyone in the village. Anonymisation of a recording is -not bleeping a name. It is a decision about whether the material can be -shown at all, and to whom. - -## What this is for - -Learning products, workshop material, a donor's field visit that could not -happen. It is not evidence in the sense an evaluation needs: one household's -account, chosen because it was vivid, is an illustration of a finding -established elsewhere, and the report should say so. - -## Related - -`../taguette_coding/` for coding transcripts once they exist. -`../annotated_research/annotation_scheme.md` tag **[ETHICS]**. +## Method + +Consent for the recording is separate from consent for the interview, and +consent to show a clip at a workshop is separate again. Ask for all three; +the third can be withheld. The storyboard has the wording. + +Transcribe everything; quote sparingly. Automatic transcription of Hindi or +Bangla in a noisy courtyard is about 80 per cent accurate, which finds the +passages and does not quote them. Check every quoted passage against the +audio with someone who speaks the language. + +Cut for the respondent's meaning. A twelve-second clip in which a farmer says +the embankment failed misrepresents her if the next forty seconds explain +that her own village removed the sluice gate. A clip is approved with its +context visible. + +A voice, a face and a description of the field next to the embankment all +identify the household. Anonymising a recording is a decision about whether +the material can be shown, and to whom. + +## Use + +Learning products, workshop material, a field visit that could not happen. +One household's account is an illustration of a finding established +elsewhere, and the report should say so. + +Related: `../taguette_coding/`; `../annotated_research/annotation_scheme.md`, +tag **[ETHICS]**. diff --git a/writing_guides/README.md b/writing_guides/README.md index 7ca2c58..34e478a 100644 --- a/writing_guides/README.md +++ b/writing_guides/README.md @@ -4,22 +4,14 @@ Guides for the documents an evaluation produces, in the order they are written. | Guide | What it is for | -|---|---| -| `theory_of_change_notes.md` | The programme's theory as a short note: problem, pathway, assumptions, outcomes. `sample_theory_of_change_note.pdf` is a worked example; the `.qmd` is the same note as a Quarto source | -| `results_chain.md` | The theory with the arrows made explicit: "if A then B because C", one link at a time, to find the link everyone assumed | -| `evaluation_report_structure.md` | The report: what goes in which section, and the table of which verb each design permits in the summary | -| `policy_brief.md` | Two pages, one message, one ask, for a reader who decides things | -| `writing_about_uncertainty.md` | Sampling, design and measurement uncertainty, and how to write each in the same sentence as the number | +| --- | --- | +| `theory_of_change_notes.md` | The programme's theory as a short note: problem, pathway, assumptions, outcomes. `sample_theory_of_change_note.pdf` is a worked example; the `.qmd` is its Quarto source | +| `results_chain.md` | The theory one link at a time: "if A then B because C" | +| `evaluation_report_structure.md` | What goes in which section, and which verb each design permits in the summary | +| `policy_brief.md` | Two pages, one message, one ask | +| `writing_about_uncertainty.md` | Sampling, design and measurement uncertainty, written in the same sentence as the number | -## The idea that runs through all five - -The verb is decided by the design. "Rose among participants", "was higher -than in comparison areas", "increased relative to comparison areas", -"caused": these are not stylistic choices, they are claims of different -strength, and the design in the methods section fixes which one the summary -is allowed. Most misleading evaluation writing is a strong verb on a weak -design, and it usually happens in the summary or the brief, written last, by -someone who did not write the methods. - -`../annotated_research/` has five reports read this way, with the verb -errors marked. +The design decides the verb. "Rose among participants", "was higher than in +comparison areas", "increased relative to comparison areas" and "caused" are +claims of different strength, and the methods section fixes which one the +summary may use. `../annotated_research/` has five reports read this way.