This repository contains the source for the EGAP Methods website, a collection of methods guides for impact evaluation, along with software tools and teaching materials.
We welcome contributions to improve existing guides, fix errors, add translations, or propose new content.
- Use GitHub Issues to report errors, suggest improvements, or propose new guides
- Please check existing issues before creating a new one
- Fork the repository
- Create a branch for your changes
- Make your edits (see sections below for guidelines)
- Test locally with
quarto preview - Submit a pull request with a clear description of changes
When you make changes to one language version, note whether corresponding changes should be made to other language versions. If you can make the change in other languages, please do so.
# Clone the repository
git clone https://github.com/egap/methodsweb.git
cd methodsweb
# Restore R package dependencies (renv will activate automatically)
R -e "renv::restore()"
# Preview the site locally
quarto previewThe site will open in your browser with live reload enabled.
# Render all pages (outputs to _site/)
quarto render
# Render a single guide
quarto render guides/research-questions/effect-types_en.qmdguides/
├── analysis-procedures/ # Statistical analysis methods
├── assessing-designs/ # Power, external validity
├── causal-inference/ # Causal inference fundamentals
├── data-collection/ # Randomization, measurement, sampling
├── implementation/ # Field implementation guidance
├── interpretation/ # Interpreting results
├── planning/ # Pre-analysis plans, survey design
└── research-questions/ # Effect types, mechanisms
All guide files use underscore + language code before .qmd:
- English:
guide-name_en.qmd - Spanish:
guide-name_es.qmd - French:
guide-name_fr.qmd
Each guide also has associated files in the same directory:
guide-name.bib— BibTeX referencesguide-name.png— Thumbnail image for listings
Each guide should include YAML frontmatter:
---
title: "10 Things to Know About [Topic]"
author:
- name: "Author Name"
url: https://author-website.com/
image: guide-name.png
bibliography: guide-name.bib
abstract: |
A brief summary of what this guide covers and who it is for.
---For translated guides, also include sidebar: to enable the language switcher:
sidebar: guide-id # Must match the id in _quarto.yml- Guides follow a "10 Things to Know" format where appropriate
- Use clear, accessible language suitable for researchers and practitioners
- Include concrete examples and, where helpful, R code demonstrations
- Use numbered sections (
#,##) for the main points - Cite sources using BibTeX references
R code chunks should generally use:
{r}
#| echo: true
#| message: false
# Your code here
Code is folded by default (readers click to expand). Use #| code-fold: false for code that should always be visible.
When linking to other guides on the site, use absolute paths:
See [10 Things to Know About Causal Inference](https://methods.egap.org/guides/causal-inference/causal-inference_en.html)- Copy the English version (
guide-name_en.qmd) to a new file with the appropriate language suffix (e.g.,guide-name_es.qmd) - Add
sidebar: guide-idto the YAML frontmatter (use the same id as other translations of that guide) - Translate the content, keeping the same structure and section numbering
- Update
_quarto.ymlto add the new language to the sidebar menu if needed
- Maintain the same document structure as the English version
- Keep code chunks and their output unchanged (unless translating comments)
- Translate figure captions and alt text
- Keep bibliographic references unchanged
- Open an issue to propose the new guide topic
- Once approved, create the guide following the template above
- Add a thumbnail image (PNG, approximately 800x600)
- Add the guide to the appropriate sidebar in
_quarto.ymlif it needs a language switcher - Submit a pull request
The site is automatically built and deployed to GitHub Pages when changes are pushed to the main branch. The GitHub Actions workflow:
- Sets up R and restores renv dependencies
- Installs Quarto
- Renders the site
- Publishes to the
gh-pagesbranch
- For technical issues with the site: Open a GitHub issue
- For questions about EGAP: Visit egap.org