@wentorai/research-plugins 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +204 -0
- package/curated/analysis/README.md +64 -0
- package/curated/domains/README.md +104 -0
- package/curated/literature/README.md +53 -0
- package/curated/research/README.md +62 -0
- package/curated/tools/README.md +87 -0
- package/curated/writing/README.md +61 -0
- package/index.ts +39 -0
- package/mcp-configs/academic-db/ChatSpatial.json +17 -0
- package/mcp-configs/academic-db/academia-mcp.json +17 -0
- package/mcp-configs/academic-db/academic-paper-explorer.json +17 -0
- package/mcp-configs/academic-db/academic-search-mcp-server.json +17 -0
- package/mcp-configs/academic-db/agentinterviews-mcp.json +17 -0
- package/mcp-configs/academic-db/all-in-mcp.json +17 -0
- package/mcp-configs/academic-db/apple-health-mcp.json +17 -0
- package/mcp-configs/academic-db/arxiv-latex-mcp.json +17 -0
- package/mcp-configs/academic-db/arxiv-mcp-server.json +17 -0
- package/mcp-configs/academic-db/bgpt-mcp.json +17 -0
- package/mcp-configs/academic-db/biomcp.json +17 -0
- package/mcp-configs/academic-db/biothings-mcp.json +17 -0
- package/mcp-configs/academic-db/catalysishub-mcp-server.json +17 -0
- package/mcp-configs/academic-db/clinicaltrialsgov-mcp-server.json +17 -0
- package/mcp-configs/academic-db/deep-research-mcp.json +17 -0
- package/mcp-configs/academic-db/dicom-mcp.json +17 -0
- package/mcp-configs/academic-db/enrichr-mcp-server.json +17 -0
- package/mcp-configs/academic-db/fec-mcp-server.json +17 -0
- package/mcp-configs/academic-db/fhir-mcp-server-themomentum.json +17 -0
- package/mcp-configs/academic-db/fhir-mcp.json +19 -0
- package/mcp-configs/academic-db/gget-mcp.json +17 -0
- package/mcp-configs/academic-db/google-researcher-mcp.json +17 -0
- package/mcp-configs/academic-db/idea-reality-mcp.json +17 -0
- package/mcp-configs/academic-db/legiscan-mcp.json +19 -0
- package/mcp-configs/academic-db/lex.json +17 -0
- package/mcp-configs/ai-platform/Adaptive-Graph-of-Thoughts-MCP-server.json +17 -0
- package/mcp-configs/ai-platform/ai-counsel.json +17 -0
- package/mcp-configs/ai-platform/atlas-mcp-server.json +17 -0
- package/mcp-configs/ai-platform/counsel-mcp.json +17 -0
- package/mcp-configs/ai-platform/cross-llm-mcp.json +17 -0
- package/mcp-configs/ai-platform/gptr-mcp.json +17 -0
- package/mcp-configs/browser/decipher-research-agent.json +17 -0
- package/mcp-configs/browser/deep-research.json +17 -0
- package/mcp-configs/browser/everything-claude-code.json +17 -0
- package/mcp-configs/browser/gpt-researcher.json +17 -0
- package/mcp-configs/browser/heurist-agent-framework.json +17 -0
- package/mcp-configs/data-platform/4everland-hosting-mcp.json +17 -0
- package/mcp-configs/data-platform/context-keeper.json +17 -0
- package/mcp-configs/data-platform/context7.json +19 -0
- package/mcp-configs/data-platform/contextstream-mcp.json +17 -0
- package/mcp-configs/data-platform/email-mcp.json +17 -0
- package/mcp-configs/note-knowledge/ApeRAG.json +17 -0
- package/mcp-configs/note-knowledge/In-Memoria.json +17 -0
- package/mcp-configs/note-knowledge/agent-memory.json +17 -0
- package/mcp-configs/note-knowledge/aimemo.json +17 -0
- package/mcp-configs/note-knowledge/biel-mcp.json +19 -0
- package/mcp-configs/note-knowledge/cognee.json +17 -0
- package/mcp-configs/note-knowledge/context-awesome.json +17 -0
- package/mcp-configs/note-knowledge/context-mcp.json +17 -0
- package/mcp-configs/note-knowledge/conversation-handoff-mcp.json +17 -0
- package/mcp-configs/note-knowledge/cortex.json +17 -0
- package/mcp-configs/note-knowledge/devrag.json +17 -0
- package/mcp-configs/note-knowledge/easy-obsidian-mcp.json +17 -0
- package/mcp-configs/note-knowledge/engram.json +17 -0
- package/mcp-configs/note-knowledge/gnosis-mcp.json +17 -0
- package/mcp-configs/note-knowledge/graphlit-mcp-server.json +19 -0
- package/mcp-configs/reference-mgr/arxiv-cli.json +17 -0
- package/mcp-configs/reference-mgr/arxiv-search-mcp.json +17 -0
- package/mcp-configs/reference-mgr/chiken.json +17 -0
- package/mcp-configs/reference-mgr/claude-scholar.json +17 -0
- package/mcp-configs/reference-mgr/devonthink-mcp.json +17 -0
- package/mcp-configs/registry.json +447 -0
- package/openclaw.plugin.json +21 -0
- package/package.json +61 -0
- package/skills/analysis/dataviz/color-accessibility-guide/SKILL.md +230 -0
- package/skills/analysis/dataviz/geospatial-viz-guide/SKILL.md +218 -0
- package/skills/analysis/dataviz/interactive-viz-guide/SKILL.md +287 -0
- package/skills/analysis/dataviz/network-visualization-guide/SKILL.md +195 -0
- package/skills/analysis/dataviz/publication-figures-guide/SKILL.md +238 -0
- package/skills/analysis/dataviz/python-dataviz-guide/SKILL.md +195 -0
- package/skills/analysis/econometrics/causal-inference-guide/SKILL.md +197 -0
- package/skills/analysis/econometrics/iv-regression-guide/SKILL.md +198 -0
- package/skills/analysis/econometrics/panel-data-guide/SKILL.md +274 -0
- package/skills/analysis/econometrics/robustness-checks/SKILL.md +250 -0
- package/skills/analysis/econometrics/stata-regression/SKILL.md +117 -0
- package/skills/analysis/econometrics/time-series-guide/SKILL.md +235 -0
- package/skills/analysis/statistics/bayesian-statistics-guide/SKILL.md +221 -0
- package/skills/analysis/statistics/hypothesis-testing-guide/SKILL.md +210 -0
- package/skills/analysis/statistics/meta-analysis-guide/SKILL.md +206 -0
- package/skills/analysis/statistics/nonparametric-tests-guide/SKILL.md +221 -0
- package/skills/analysis/statistics/power-analysis-guide/SKILL.md +240 -0
- package/skills/analysis/statistics/sem-guide/SKILL.md +231 -0
- package/skills/analysis/statistics/survival-analysis-guide/SKILL.md +195 -0
- package/skills/analysis/wrangling/missing-data-handling/SKILL.md +224 -0
- package/skills/analysis/wrangling/pandas-data-wrangling/SKILL.md +242 -0
- package/skills/analysis/wrangling/questionnaire-design-guide/SKILL.md +234 -0
- package/skills/analysis/wrangling/text-mining-guide/SKILL.md +225 -0
- package/skills/domains/ai-ml/computer-vision-guide/SKILL.md +213 -0
- package/skills/domains/ai-ml/deep-learning-papers-guide/SKILL.md +200 -0
- package/skills/domains/ai-ml/llm-evaluation-guide/SKILL.md +194 -0
- package/skills/domains/ai-ml/prompt-engineering-research/SKILL.md +233 -0
- package/skills/domains/ai-ml/reinforcement-learning-guide/SKILL.md +254 -0
- package/skills/domains/ai-ml/transformer-architecture-guide/SKILL.md +233 -0
- package/skills/domains/biomedical/clinical-research-guide/SKILL.md +232 -0
- package/skills/domains/biomedical/clinicaltrials-api/SKILL.md +177 -0
- package/skills/domains/biomedical/epidemiology-guide/SKILL.md +200 -0
- package/skills/domains/biomedical/genomics-analysis-guide/SKILL.md +270 -0
- package/skills/domains/business/market-analysis-guide/SKILL.md +112 -0
- package/skills/domains/business/strategic-management-guide/SKILL.md +154 -0
- package/skills/domains/chemistry/computational-chemistry-guide/SKILL.md +266 -0
- package/skills/domains/chemistry/retrosynthesis-guide/SKILL.md +215 -0
- package/skills/domains/cs/algorithms-complexity-guide/SKILL.md +194 -0
- package/skills/domains/cs/dblp-api/SKILL.md +129 -0
- package/skills/domains/cs/software-engineering-research/SKILL.md +218 -0
- package/skills/domains/ecology/biodiversity-data-guide/SKILL.md +296 -0
- package/skills/domains/ecology/conservation-biology-guide/SKILL.md +198 -0
- package/skills/domains/ecology/gbif-api/SKILL.md +158 -0
- package/skills/domains/ecology/inaturalist-api/SKILL.md +173 -0
- package/skills/domains/economics/behavioral-economics-guide/SKILL.md +239 -0
- package/skills/domains/economics/development-economics-guide/SKILL.md +181 -0
- package/skills/domains/economics/fred-api/SKILL.md +189 -0
- package/skills/domains/education/curriculum-design-guide/SKILL.md +144 -0
- package/skills/domains/education/learning-science-guide/SKILL.md +150 -0
- package/skills/domains/finance/financial-data-analysis/SKILL.md +152 -0
- package/skills/domains/finance/quantitative-finance-guide/SKILL.md +151 -0
- package/skills/domains/geoscience/climate-science-guide/SKILL.md +158 -0
- package/skills/domains/geoscience/gis-remote-sensing-guide/SKILL.md +129 -0
- package/skills/domains/humanities/digital-humanities-guide/SKILL.md +181 -0
- package/skills/domains/humanities/philosophy-research-guide/SKILL.md +148 -0
- package/skills/domains/law/courtlistener-api/SKILL.md +213 -0
- package/skills/domains/law/legal-research-guide/SKILL.md +250 -0
- package/skills/domains/math/linear-algebra-applications/SKILL.md +227 -0
- package/skills/domains/math/numerical-methods-guide/SKILL.md +236 -0
- package/skills/domains/math/oeis-api/SKILL.md +158 -0
- package/skills/domains/pharma/clinical-pharmacology-guide/SKILL.md +165 -0
- package/skills/domains/pharma/drug-development-guide/SKILL.md +177 -0
- package/skills/domains/physics/computational-physics-guide/SKILL.md +300 -0
- package/skills/domains/physics/nasa-ads-api/SKILL.md +150 -0
- package/skills/domains/physics/quantum-computing-guide/SKILL.md +234 -0
- package/skills/domains/social-science/social-research-methods/SKILL.md +194 -0
- package/skills/domains/social-science/survey-research-guide/SKILL.md +182 -0
- package/skills/literature/discovery/citation-alert-guide/SKILL.md +154 -0
- package/skills/literature/discovery/conference-proceedings-guide/SKILL.md +142 -0
- package/skills/literature/discovery/literature-mapping-guide/SKILL.md +175 -0
- package/skills/literature/discovery/paper-tracking-guide/SKILL.md +211 -0
- package/skills/literature/discovery/rss-paper-feeds/SKILL.md +214 -0
- package/skills/literature/discovery/semantic-scholar-recs-guide/SKILL.md +164 -0
- package/skills/literature/fulltext/doaj-api/SKILL.md +120 -0
- package/skills/literature/fulltext/interlibrary-loan-guide/SKILL.md +163 -0
- package/skills/literature/fulltext/open-access-guide/SKILL.md +183 -0
- package/skills/literature/fulltext/pmc-oai-api/SKILL.md +184 -0
- package/skills/literature/fulltext/preprint-servers-guide/SKILL.md +128 -0
- package/skills/literature/fulltext/repository-harvesting-guide/SKILL.md +207 -0
- package/skills/literature/fulltext/unpaywall-api/SKILL.md +113 -0
- package/skills/literature/metadata/altmetrics-guide/SKILL.md +132 -0
- package/skills/literature/metadata/citation-network-guide/SKILL.md +236 -0
- package/skills/literature/metadata/crossref-api/SKILL.md +133 -0
- package/skills/literature/metadata/datacite-api/SKILL.md +126 -0
- package/skills/literature/metadata/doi-resolution-guide/SKILL.md +168 -0
- package/skills/literature/metadata/h-index-guide/SKILL.md +183 -0
- package/skills/literature/metadata/journal-metrics-guide/SKILL.md +188 -0
- package/skills/literature/metadata/opencitations-api/SKILL.md +128 -0
- package/skills/literature/metadata/orcid-api/SKILL.md +136 -0
- package/skills/literature/metadata/orcid-integration-guide/SKILL.md +178 -0
- package/skills/literature/search/arxiv-api/SKILL.md +95 -0
- package/skills/literature/search/biorxiv-api/SKILL.md +123 -0
- package/skills/literature/search/boolean-search-guide/SKILL.md +199 -0
- package/skills/literature/search/citation-chaining-guide/SKILL.md +148 -0
- package/skills/literature/search/database-comparison-guide/SKILL.md +100 -0
- package/skills/literature/search/europe-pmc-api/SKILL.md +120 -0
- package/skills/literature/search/google-scholar-guide/SKILL.md +182 -0
- package/skills/literature/search/mesh-terms-guide/SKILL.md +164 -0
- package/skills/literature/search/openalex-api/SKILL.md +134 -0
- package/skills/literature/search/pubmed-api/SKILL.md +130 -0
- package/skills/literature/search/scientify-literature-survey/SKILL.md +203 -0
- package/skills/literature/search/semantic-scholar-api/SKILL.md +134 -0
- package/skills/literature/search/systematic-search-strategy/SKILL.md +214 -0
- package/skills/research/automation/ai-scientist-guide/SKILL.md +228 -0
- package/skills/research/automation/data-collection-automation/SKILL.md +248 -0
- package/skills/research/automation/research-workflow-automation/SKILL.md +266 -0
- package/skills/research/deep-research/meta-synthesis-guide/SKILL.md +174 -0
- package/skills/research/deep-research/research-cog/SKILL.md +153 -0
- package/skills/research/deep-research/scoping-review-guide/SKILL.md +217 -0
- package/skills/research/deep-research/systematic-review-guide/SKILL.md +250 -0
- package/skills/research/funding/figshare-api/SKILL.md +163 -0
- package/skills/research/funding/grant-writing-guide/SKILL.md +233 -0
- package/skills/research/funding/nsf-grant-guide/SKILL.md +206 -0
- package/skills/research/funding/open-science-guide/SKILL.md +255 -0
- package/skills/research/funding/zenodo-api/SKILL.md +174 -0
- package/skills/research/methodology/action-research-guide/SKILL.md +201 -0
- package/skills/research/methodology/experimental-design-guide/SKILL.md +236 -0
- package/skills/research/methodology/grad-school-guide/SKILL.md +182 -0
- package/skills/research/methodology/grounded-theory-guide/SKILL.md +171 -0
- package/skills/research/methodology/mixed-methods-guide/SKILL.md +208 -0
- package/skills/research/methodology/qualitative-research-guide/SKILL.md +234 -0
- package/skills/research/methodology/scientify-idea-generation/SKILL.md +222 -0
- package/skills/research/paper-review/paper-reading-assistant/SKILL.md +266 -0
- package/skills/research/paper-review/peer-review-guide/SKILL.md +227 -0
- package/skills/research/paper-review/rebuttal-writing-guide/SKILL.md +185 -0
- package/skills/research/paper-review/scientify-write-review-paper/SKILL.md +209 -0
- package/skills/tools/code-exec/jupyter-notebook-guide/SKILL.md +178 -0
- package/skills/tools/code-exec/python-reproducibility-guide/SKILL.md +341 -0
- package/skills/tools/code-exec/r-reproducibility-guide/SKILL.md +236 -0
- package/skills/tools/code-exec/sandbox-execution-guide/SKILL.md +221 -0
- package/skills/tools/diagram/mermaid-diagram-guide/SKILL.md +269 -0
- package/skills/tools/diagram/plantuml-guide/SKILL.md +397 -0
- package/skills/tools/diagram/scientific-illustration-guide/SKILL.md +225 -0
- package/skills/tools/document/anystyle-api/SKILL.md +199 -0
- package/skills/tools/document/grobid-pdf-parsing/SKILL.md +294 -0
- package/skills/tools/document/markdown-academic-guide/SKILL.md +217 -0
- package/skills/tools/document/pdf-extraction-guide/SKILL.md +321 -0
- package/skills/tools/knowledge-graph/knowledge-graph-construction/SKILL.md +306 -0
- package/skills/tools/knowledge-graph/ontology-design-guide/SKILL.md +214 -0
- package/skills/tools/knowledge-graph/rag-methodology-guide/SKILL.md +325 -0
- package/skills/tools/ocr-translate/formula-recognition-guide/SKILL.md +367 -0
- package/skills/tools/ocr-translate/handwriting-recognition-guide/SKILL.md +211 -0
- package/skills/tools/ocr-translate/latex-ocr-guide/SKILL.md +204 -0
- package/skills/tools/ocr-translate/multilingual-research-guide/SKILL.md +234 -0
- package/skills/tools/scraping/academic-web-scraping/SKILL.md +326 -0
- package/skills/tools/scraping/api-data-collection-guide/SKILL.md +301 -0
- package/skills/tools/scraping/web-scraping-ethics-guide/SKILL.md +250 -0
- package/skills/writing/citation/bibtex-management-guide/SKILL.md +246 -0
- package/skills/writing/citation/citation-style-guide/SKILL.md +248 -0
- package/skills/writing/citation/reference-manager-comparison/SKILL.md +208 -0
- package/skills/writing/citation/zotero-api/SKILL.md +188 -0
- package/skills/writing/composition/abstract-writing-guide/SKILL.md +188 -0
- package/skills/writing/composition/discussion-writing-guide/SKILL.md +194 -0
- package/skills/writing/composition/introduction-writing-guide/SKILL.md +194 -0
- package/skills/writing/composition/literature-review-writing/SKILL.md +196 -0
- package/skills/writing/composition/methods-section-guide/SKILL.md +185 -0
- package/skills/writing/composition/response-to-reviewers/SKILL.md +215 -0
- package/skills/writing/composition/scientific-writing-guide/SKILL.md +152 -0
- package/skills/writing/latex/bibliography-management-guide/SKILL.md +206 -0
- package/skills/writing/latex/latex-drawing-guide/SKILL.md +234 -0
- package/skills/writing/latex/latex-ecosystem-guide/SKILL.md +240 -0
- package/skills/writing/latex/math-typesetting-guide/SKILL.md +231 -0
- package/skills/writing/latex/overleaf-collaboration-guide/SKILL.md +211 -0
- package/skills/writing/latex/tikz-diagrams-guide/SKILL.md +211 -0
- package/skills/writing/polish/academic-translation-guide/SKILL.md +175 -0
- package/skills/writing/polish/academic-writing-refiner/SKILL.md +143 -0
- package/skills/writing/polish/ai-writing-humanizer/SKILL.md +178 -0
- package/skills/writing/polish/grammar-checker-guide/SKILL.md +184 -0
- package/skills/writing/polish/plagiarism-detection-guide/SKILL.md +167 -0
- package/skills/writing/templates/beamer-presentation-guide/SKILL.md +263 -0
- package/skills/writing/templates/conference-paper-template/SKILL.md +219 -0
- package/skills/writing/templates/thesis-template-guide/SKILL.md +200 -0
- package/skills/writing/templates/thesis-writing-guide/SKILL.md +220 -0
- package/src/tools/arxiv.ts +131 -0
- package/src/tools/crossref.ts +112 -0
- package/src/tools/openalex.ts +174 -0
- package/src/tools/pubmed.ts +166 -0
- package/src/tools/semantic-scholar.ts +108 -0
- package/src/tools/unpaywall.ts +58 -0
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: inaturalist-api
|
|
3
|
+
description: "Citizen science platform API for biodiversity observations"
|
|
4
|
+
metadata:
|
|
5
|
+
openclaw:
|
|
6
|
+
emoji: "🔍"
|
|
7
|
+
category: "domains"
|
|
8
|
+
subcategory: "ecology"
|
|
9
|
+
keywords: ["ecology", "biodiversity", "taxonomy", "evolutionary biology"]
|
|
10
|
+
source: "https://www.inaturalist.org/pages/api+reference"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# iNaturalist API Guide
|
|
14
|
+
|
|
15
|
+
## Overview
|
|
16
|
+
|
|
17
|
+
iNaturalist is a citizen science platform and social network for naturalists, jointly operated by the California Academy of Sciences and the National Geographic Society. The platform enables users to record and share observations of organisms in nature, which are then identified by the community and validated by computer vision models. With over 150 million observations of more than 400,000 species, iNaturalist is one of the largest biodiversity data sources in the world.
|
|
18
|
+
|
|
19
|
+
The iNaturalist API provides programmatic access to this massive observational dataset. Researchers can query observations by taxonomy, geography, time period, observer, and data quality grade. The API also provides access to taxonomic information, place boundaries, and project data. Research-grade observations (those with community-verified identifications) are automatically shared with GBIF for integration into the global biodiversity data infrastructure.
|
|
20
|
+
|
|
21
|
+
Ecologists, conservation biologists, evolutionary biologists, and citizen science coordinators use the iNaturalist API to analyze species distributions, track phenological patterns, study urban biodiversity, monitor invasive species, and validate species distribution models. The platform's broad geographic and taxonomic coverage makes it particularly valuable for large-scale ecological analyses.
|
|
22
|
+
|
|
23
|
+
## Authentication
|
|
24
|
+
|
|
25
|
+
No authentication is required for read-only access to public data. The iNaturalist API v1 allows anonymous queries for observations, taxa, and places. Authentication via OAuth 2.0 is only needed for write operations such as creating observations, adding identifications, or managing projects.
|
|
26
|
+
|
|
27
|
+
For authenticated requests, register an application at https://www.inaturalist.org/oauth/applications and use the OAuth 2.0 flow to obtain an access token.
|
|
28
|
+
|
|
29
|
+
## Core Endpoints
|
|
30
|
+
|
|
31
|
+
### observations: Search Biodiversity Observations
|
|
32
|
+
|
|
33
|
+
Query the iNaturalist observation database with filters for taxonomy, geography, time, and data quality.
|
|
34
|
+
|
|
35
|
+
- **URL**: `GET https://api.inaturalist.org/v1/observations`
|
|
36
|
+
- **Parameters**:
|
|
37
|
+
|
|
38
|
+
| Parameter | Type | Required | Description |
|
|
39
|
+
|----------------|--------|----------|---------------------------------------------------------|
|
|
40
|
+
| taxon_id | int | No | iNaturalist taxon ID to filter by |
|
|
41
|
+
| place_id | int | No | Place ID to filter by geographic area |
|
|
42
|
+
| lat | float | No | Latitude for geographic search |
|
|
43
|
+
| lng | float | No | Longitude for geographic search |
|
|
44
|
+
| radius | int | No | Search radius in km (used with lat/lng) |
|
|
45
|
+
| d1 | string | No | Start date (YYYY-MM-DD) |
|
|
46
|
+
| d2 | string | No | End date (YYYY-MM-DD) |
|
|
47
|
+
| quality_grade | string | No | `research`, `needs_id`, or `casual` |
|
|
48
|
+
| per_page | int | No | Results per page (default 30, max 200) |
|
|
49
|
+
| page | int | No | Page number |
|
|
50
|
+
| order_by | string | No | Sort field: `created_at`, `observed_on`, `votes` |
|
|
51
|
+
|
|
52
|
+
- **Example**:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
curl "https://api.inaturalist.org/v1/observations?taxon_id=3&quality_grade=research&place_id=1&per_page=10"
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
- **Response**: Returns `total_results`, `results` array with `id`, `species_guess`, `taxon` (name, rank, ancestry), `location` (lat,lng), `observed_on`, `quality_grade`, `photos`, `user`, `identifications_count`, and `geojson`.
|
|
59
|
+
|
|
60
|
+
### taxa: Taxonomic Information
|
|
61
|
+
|
|
62
|
+
Look up taxonomic information, search for species, and retrieve taxonomic hierarchies.
|
|
63
|
+
|
|
64
|
+
- **URL**: `GET https://api.inaturalist.org/v1/taxa`
|
|
65
|
+
- **Parameters**:
|
|
66
|
+
|
|
67
|
+
| Parameter | Type | Required | Description |
|
|
68
|
+
|-----------|--------|----------|----------------------------------------------|
|
|
69
|
+
| q | string | No | Name search query |
|
|
70
|
+
| taxon_id | int | No | Specific taxon ID |
|
|
71
|
+
| rank | string | No | Filter by rank: `species`, `genus`, etc. |
|
|
72
|
+
| is_active | bool | No | Filter for active/inactive taxa |
|
|
73
|
+
| per_page | int | No | Results per page (default 30, max 200) |
|
|
74
|
+
|
|
75
|
+
- **Example**:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
curl "https://api.inaturalist.org/v1/taxa?q=monarch+butterfly&rank=species"
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
- **Response**: Returns `results` array with `id`, `name`, `preferred_common_name`, `rank`, `observations_count`, `ancestors`, `default_photo`, `wikipedia_url`, and `conservation_status`.
|
|
82
|
+
|
|
83
|
+
### places: Geographic Place Boundaries
|
|
84
|
+
|
|
85
|
+
Retrieve geographic place definitions used for filtering observations.
|
|
86
|
+
|
|
87
|
+
- **URL**: `GET https://api.inaturalist.org/v1/places`
|
|
88
|
+
- **Parameters**:
|
|
89
|
+
|
|
90
|
+
| Parameter | Type | Required | Description |
|
|
91
|
+
|-----------|--------|----------|---------------------------------------|
|
|
92
|
+
| q | string | No | Place name search query |
|
|
93
|
+
| per_page | int | No | Results per page |
|
|
94
|
+
|
|
95
|
+
- **Example**:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
curl "https://api.inaturalist.org/v1/places/autocomplete?q=Yellowstone"
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
- **Response**: Returns `results` with `id`, `name`, `display_name`, `bounding_box_geojson`, `location`, and `admin_level`.
|
|
102
|
+
|
|
103
|
+
## Rate Limits
|
|
104
|
+
|
|
105
|
+
The iNaturalist API enforces a rate limit of 100 requests per minute. Exceeding this limit returns HTTP 429 responses. For large-scale data exports, iNaturalist recommends using their export tools at https://www.inaturalist.org/observations/export or downloading the GBIF-shared dataset. The API also supports `If-Modified-Since` headers for efficient polling of updated records.
|
|
106
|
+
|
|
107
|
+
## Common Patterns
|
|
108
|
+
|
|
109
|
+
### Species Distribution Analysis
|
|
110
|
+
|
|
111
|
+
Retrieve research-grade observations of a species for distribution modeling:
|
|
112
|
+
|
|
113
|
+
```python
|
|
114
|
+
import requests
|
|
115
|
+
|
|
116
|
+
params = {
|
|
117
|
+
"taxon_id": 48484, # Danaus plexippus (Monarch Butterfly)
|
|
118
|
+
"quality_grade": "research",
|
|
119
|
+
"per_page": 200,
|
|
120
|
+
"order_by": "observed_on"
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
resp = requests.get("https://api.inaturalist.org/v1/observations", params=params)
|
|
124
|
+
data = resp.json()
|
|
125
|
+
|
|
126
|
+
for obs in data["results"]:
|
|
127
|
+
if obs.get("location"):
|
|
128
|
+
lat, lng = obs["location"].split(",")
|
|
129
|
+
print(f"{obs['observed_on']}: ({lat}, {lng}) - {obs['taxon']['name']}")
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### Phenology Tracking
|
|
133
|
+
|
|
134
|
+
Monitor seasonal patterns by analyzing observation dates across years:
|
|
135
|
+
|
|
136
|
+
```python
|
|
137
|
+
import requests
|
|
138
|
+
from collections import Counter
|
|
139
|
+
|
|
140
|
+
params = {
|
|
141
|
+
"taxon_id": 48484,
|
|
142
|
+
"quality_grade": "research",
|
|
143
|
+
"per_page": 200,
|
|
144
|
+
"place_id": 1 # United States
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
resp = requests.get("https://api.inaturalist.org/v1/observations", params=params)
|
|
148
|
+
months = Counter()
|
|
149
|
+
|
|
150
|
+
for obs in resp.json()["results"]:
|
|
151
|
+
if obs.get("observed_on"):
|
|
152
|
+
month = obs["observed_on"][5:7]
|
|
153
|
+
months[month] += 1
|
|
154
|
+
|
|
155
|
+
for month in sorted(months):
|
|
156
|
+
print(f"Month {month}: {months[month]} observations")
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### Invasive Species Monitoring
|
|
160
|
+
|
|
161
|
+
Track observations of invasive species in a specific region:
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
# Search for Spotted Lanternfly observations in Pennsylvania
|
|
165
|
+
curl "https://api.inaturalist.org/v1/observations?taxon_id=325295&place_id=46&quality_grade=research&per_page=50"
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## References
|
|
169
|
+
|
|
170
|
+
- Official API reference: https://www.inaturalist.org/pages/api+reference
|
|
171
|
+
- API v1 documentation: https://api.inaturalist.org/v1/docs/
|
|
172
|
+
- iNaturalist homepage: https://www.inaturalist.org/
|
|
173
|
+
- Data export tools: https://www.inaturalist.org/observations/export
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: behavioral-economics-guide
|
|
3
|
+
description: "Behavioral economics research methods and key frameworks"
|
|
4
|
+
metadata:
|
|
5
|
+
openclaw:
|
|
6
|
+
emoji: "brain"
|
|
7
|
+
category: "domains"
|
|
8
|
+
subcategory: "economics"
|
|
9
|
+
keywords: ["behavioral economics", "microeconomics", "development economics"]
|
|
10
|
+
source: "wentor-research-plugins"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Behavioral Economics Guide
|
|
14
|
+
|
|
15
|
+
Conduct behavioral economics research using experimental methods, prospect theory, nudge frameworks, and key empirical tools for studying decision-making under bounded rationality.
|
|
16
|
+
|
|
17
|
+
## Core Theoretical Frameworks
|
|
18
|
+
|
|
19
|
+
### Prospect Theory (Kahneman & Tversky, 1979)
|
|
20
|
+
|
|
21
|
+
People evaluate outcomes relative to a reference point, with losses looming larger than equivalent gains:
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
Key features:
|
|
25
|
+
1. Reference dependence: Utility is defined over gains and losses, not absolute wealth
|
|
26
|
+
2. Loss aversion: lambda ≈ 2.25 (losses hurt ~2.25x more than equivalent gains)
|
|
27
|
+
3. Diminishing sensitivity: Marginal impact decreases as you move away from reference
|
|
28
|
+
4. Probability weighting: Overweight small probabilities, underweight large ones
|
|
29
|
+
|
|
30
|
+
Value function:
|
|
31
|
+
v(x) = x^alpha if x >= 0 (alpha ≈ 0.88)
|
|
32
|
+
v(x) = -lambda * (-x)^beta if x < 0 (beta ≈ 0.88, lambda ≈ 2.25)
|
|
33
|
+
|
|
34
|
+
Probability weighting function (Prelec, 1998):
|
|
35
|
+
w(p) = exp(-(-ln(p))^alpha) (alpha ≈ 0.65 for gains, 0.69 for losses)
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Dual Process Theory (Kahneman, 2011)
|
|
39
|
+
|
|
40
|
+
| System 1 (Fast) | System 2 (Slow) |
|
|
41
|
+
|-----------------|-----------------|
|
|
42
|
+
| Automatic, effortless | Deliberate, effortful |
|
|
43
|
+
| Intuitive, heuristic-based | Analytical, rule-based |
|
|
44
|
+
| Parallel processing | Serial processing |
|
|
45
|
+
| Emotional | Logical |
|
|
46
|
+
| Prone to biases | Can override biases |
|
|
47
|
+
| Default mode | Activated when needed |
|
|
48
|
+
|
|
49
|
+
### Nudge Theory (Thaler & Sunstein, 2008)
|
|
50
|
+
|
|
51
|
+
Nudges alter choice architecture to influence decisions without restricting options:
|
|
52
|
+
|
|
53
|
+
| Nudge Type | Example | Mechanism |
|
|
54
|
+
|-----------|---------|-----------|
|
|
55
|
+
| Default setting | Opt-out organ donation | Status quo bias |
|
|
56
|
+
| Salience | Calorie labels at point of sale | Attention focus |
|
|
57
|
+
| Social norms | "9 out of 10 neighbors recycle" | Conformity |
|
|
58
|
+
| Commitment device | Pre-commitment to savings plans | Present bias correction |
|
|
59
|
+
| Simplification | Pre-filled tax forms | Reduce cognitive load |
|
|
60
|
+
| Feedback | Real-time energy usage display | Information salience |
|
|
61
|
+
| Framing | "90% survival" vs "10% mortality" | Reference frame |
|
|
62
|
+
|
|
63
|
+
## Key Behavioral Biases and Experimental Tests
|
|
64
|
+
|
|
65
|
+
| Bias | Definition | Classic Experiment |
|
|
66
|
+
|------|-----------|-------------------|
|
|
67
|
+
| **Anchoring** | Over-reliance on first piece of information | Wheel of fortune + estimation task |
|
|
68
|
+
| **Endowment effect** | Overvaluing what you own | Mug trading experiment (Kahneman et al., 1990) |
|
|
69
|
+
| **Status quo bias** | Preference for current state | Default choice experiments |
|
|
70
|
+
| **Present bias** | Overweighting immediate outcomes | Discount rate elicitation |
|
|
71
|
+
| **Sunk cost fallacy** | Continuing due to past investment | Theater ticket scenario |
|
|
72
|
+
| **Overconfidence** | Overestimating own knowledge/ability | Calibration tasks |
|
|
73
|
+
| **Availability heuristic** | Judging probability by ease of recall | Frequency estimation tasks |
|
|
74
|
+
| **Representativeness** | Judging probability by similarity | Linda problem |
|
|
75
|
+
| **Framing effect** | Choices depend on how options are presented | Asian disease problem |
|
|
76
|
+
|
|
77
|
+
## Experimental Methods
|
|
78
|
+
|
|
79
|
+
### Lab Experiments
|
|
80
|
+
|
|
81
|
+
```python
|
|
82
|
+
# Example: Dictator Game implementation with oTree
|
|
83
|
+
# oTree is the standard platform for behavioral economics experiments
|
|
84
|
+
|
|
85
|
+
# models.py
|
|
86
|
+
class Player(BasePlayer):
|
|
87
|
+
dictator_give = models.CurrencyField(
|
|
88
|
+
min=0, max=100,
|
|
89
|
+
label="How much do you want to give to the other participant?"
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
# pages.py
|
|
93
|
+
class Decision(Page):
|
|
94
|
+
form_model = 'player'
|
|
95
|
+
form_fields = ['dictator_give']
|
|
96
|
+
|
|
97
|
+
def vars_for_template(self):
|
|
98
|
+
return {'endowment': 100}
|
|
99
|
+
|
|
100
|
+
class Results(Page):
|
|
101
|
+
def vars_for_template(self):
|
|
102
|
+
return {
|
|
103
|
+
'kept': 100 - self.player.dictator_give,
|
|
104
|
+
'given': self.player.dictator_give
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### Field Experiments and RCTs
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
Design checklist for a behavioral field experiment:
|
|
112
|
+
|
|
113
|
+
1. RESEARCH QUESTION
|
|
114
|
+
"Does changing the default retirement contribution rate from 3% to 6%
|
|
115
|
+
increase average savings?"
|
|
116
|
+
|
|
117
|
+
2. TREATMENT ARMS
|
|
118
|
+
- Control: Default contribution = 3% (status quo)
|
|
119
|
+
- Treatment 1: Default contribution = 6% (higher default)
|
|
120
|
+
- Treatment 2: Default contribution = 6% + active choice prompt
|
|
121
|
+
|
|
122
|
+
3. RANDOMIZATION
|
|
123
|
+
- Unit: Individual employees
|
|
124
|
+
- Method: Stratified randomization by age, salary, tenure
|
|
125
|
+
- Balance checks: t-tests on observables across treatment arms
|
|
126
|
+
|
|
127
|
+
4. SAMPLE SIZE
|
|
128
|
+
- Power calculation: N = 1,200 per arm (power=0.80, MDE=2pp,
|
|
129
|
+
alpha=0.05, ICC adjusted for clustering by department)
|
|
130
|
+
|
|
131
|
+
5. OUTCOME MEASURES
|
|
132
|
+
- Primary: Contribution rate at 6 months
|
|
133
|
+
- Secondary: Total savings at 12 months, opt-out rate
|
|
134
|
+
- Administrative data (no survey needed)
|
|
135
|
+
|
|
136
|
+
6. PRE-REGISTRATION
|
|
137
|
+
- Register on AEA RCT Registry before treatment assignment
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### Survey Experiments
|
|
141
|
+
|
|
142
|
+
```python
|
|
143
|
+
# Example: Willingness-to-Pay (WTP) elicitation using BDM mechanism
|
|
144
|
+
# Becker-DeGroot-Marschak procedure
|
|
145
|
+
|
|
146
|
+
import numpy as np
|
|
147
|
+
|
|
148
|
+
def bdm_auction(stated_wtp, item_cost_range=(0, 20)):
|
|
149
|
+
"""
|
|
150
|
+
Becker-DeGroot-Marschak incentive-compatible mechanism.
|
|
151
|
+
Random price drawn; participant buys if WTP >= price.
|
|
152
|
+
"""
|
|
153
|
+
random_price = np.random.uniform(*item_cost_range)
|
|
154
|
+
buys = stated_wtp >= random_price
|
|
155
|
+
payment = random_price if buys else 0
|
|
156
|
+
return {
|
|
157
|
+
"stated_wtp": stated_wtp,
|
|
158
|
+
"random_price": round(random_price, 2),
|
|
159
|
+
"purchased": buys,
|
|
160
|
+
"payment": round(payment, 2)
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
# This is incentive-compatible: truthfully reporting WTP is optimal
|
|
164
|
+
# because the price is determined independently of the stated WTP
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
## Time Preferences and Discounting
|
|
168
|
+
|
|
169
|
+
```python
|
|
170
|
+
# Estimating discount factors from multiple price list (MPL) choices
|
|
171
|
+
|
|
172
|
+
def estimate_discount_factor(choices, amounts, delays):
|
|
173
|
+
"""
|
|
174
|
+
Estimate quasi-hyperbolic discounting parameters (beta, delta)
|
|
175
|
+
from a series of smaller-sooner vs. larger-later choices.
|
|
176
|
+
|
|
177
|
+
beta: present bias (< 1 means present-biased)
|
|
178
|
+
delta: long-run discount factor (per period)
|
|
179
|
+
"""
|
|
180
|
+
from scipy.optimize import minimize
|
|
181
|
+
|
|
182
|
+
def neg_log_likelihood(params):
|
|
183
|
+
beta, delta = params
|
|
184
|
+
ll = 0
|
|
185
|
+
for choice, (ss, ll_amt), (t_ss, t_ll) in zip(choices, amounts, delays):
|
|
186
|
+
# Discounted utility of each option
|
|
187
|
+
if t_ss == 0:
|
|
188
|
+
u_ss = ss # No discounting for immediate
|
|
189
|
+
u_ll = beta * (delta ** t_ll) * ll_amt
|
|
190
|
+
else:
|
|
191
|
+
u_ss = beta * (delta ** t_ss) * ss
|
|
192
|
+
u_ll = beta * (delta ** t_ll) * ll_amt
|
|
193
|
+
|
|
194
|
+
p_ll = 1 / (1 + np.exp(-(u_ll - u_ss))) # Logit
|
|
195
|
+
ll += choice * np.log(p_ll + 1e-10) + (1-choice) * np.log(1-p_ll + 1e-10)
|
|
196
|
+
return -ll
|
|
197
|
+
|
|
198
|
+
result = minimize(neg_log_likelihood, [0.9, 0.95],
|
|
199
|
+
bounds=[(0.01, 1.5), (0.8, 1.0)])
|
|
200
|
+
return {"beta": result.x[0], "delta": result.x[1]}
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
## Data Analysis in Behavioral Economics
|
|
204
|
+
|
|
205
|
+
### Common Estimation Methods
|
|
206
|
+
|
|
207
|
+
| Method | Use Case | Software |
|
|
208
|
+
|--------|----------|----------|
|
|
209
|
+
| OLS / Logit | Treatment effects, survey experiments | Stata, R, Python |
|
|
210
|
+
| IV / 2SLS | Endogeneity in field settings | Stata (`ivregress`), R (`ivreg`) |
|
|
211
|
+
| Difference-in-differences | Policy evaluation | Stata, R (`did` package) |
|
|
212
|
+
| Structural estimation | Utility function parameters | Stata, MATLAB, Python |
|
|
213
|
+
| Random utility models | Discrete choice experiments | R (`mlogit`), Python (`pylogit`) |
|
|
214
|
+
| Clustering corrections | Within-group correlation | Stata `vce(cluster)`, R `sandwich` |
|
|
215
|
+
|
|
216
|
+
## Key Resources
|
|
217
|
+
|
|
218
|
+
| Resource | Type | Description |
|
|
219
|
+
|----------|------|-------------|
|
|
220
|
+
| oTree | Software | Open-source platform for behavioral experiments |
|
|
221
|
+
| Gorilla | Platform | Online experiment builder (psychology/economics) |
|
|
222
|
+
| LIONESS Lab | Platform | Real-time interactive online experiments |
|
|
223
|
+
| AEA RCT Registry | Registry | Pre-registration for economics experiments |
|
|
224
|
+
| J-PAL | Organization | Poverty Action Lab, methodological resources |
|
|
225
|
+
| NBER Behavioral Finance | Working papers | Latest research in behavioral finance |
|
|
226
|
+
|
|
227
|
+
## Top Journals and Venues
|
|
228
|
+
|
|
229
|
+
| Journal | Focus |
|
|
230
|
+
|---------|-------|
|
|
231
|
+
| American Economic Review | Top 5, publishes major behavioral papers |
|
|
232
|
+
| Quarterly Journal of Economics | Top 5, strong behavioral presence |
|
|
233
|
+
| Journal of Political Economy | Top 5 |
|
|
234
|
+
| Econometrica | Top 5, theory + experiments |
|
|
235
|
+
| Journal of the European Economic Association | Top field journal |
|
|
236
|
+
| Management Science | Behavioral operations, decision-making |
|
|
237
|
+
| Experimental Economics | Dedicated experiments journal |
|
|
238
|
+
| Journal of Behavioral and Experimental Economics | Broader behavioral |
|
|
239
|
+
| Journal of Economic Behavior & Organization | Interdisciplinary behavioral |
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: development-economics-guide
|
|
3
|
+
description: "Apply development economics research methods and data sources"
|
|
4
|
+
metadata:
|
|
5
|
+
openclaw:
|
|
6
|
+
emoji: "earth_africa"
|
|
7
|
+
category: "domains"
|
|
8
|
+
subcategory: "economics"
|
|
9
|
+
keywords: ["development economics", "RCT", "impact evaluation", "poverty", "causal inference", "field experiments"]
|
|
10
|
+
source: "wentor-research-plugins"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Development Economics Guide
|
|
14
|
+
|
|
15
|
+
A skill for conducting development economics research, covering impact evaluation methods, field experiment design, household survey analysis, key data sources, and the methodological toolkit used to study poverty, education, health, and institutions in developing countries.
|
|
16
|
+
|
|
17
|
+
## Impact Evaluation Methods
|
|
18
|
+
|
|
19
|
+
### The Identification Problem
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
Fundamental question: What is the causal effect of a program/policy?
|
|
23
|
+
|
|
24
|
+
Challenge: We observe outcomes for treated individuals, but we cannot
|
|
25
|
+
observe what would have happened to them without treatment
|
|
26
|
+
(the counterfactual).
|
|
27
|
+
|
|
28
|
+
Solutions (from strongest to weakest causal identification):
|
|
29
|
+
1. Randomized Controlled Trials (RCTs / field experiments)
|
|
30
|
+
2. Regression Discontinuity Design (RDD)
|
|
31
|
+
3. Instrumental Variables (IV)
|
|
32
|
+
4. Difference-in-Differences (DiD)
|
|
33
|
+
5. Matching / Propensity Score Methods
|
|
34
|
+
6. Cross-sectional regression with controls (weakest)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Randomized Controlled Trials in Development
|
|
38
|
+
|
|
39
|
+
```python
|
|
40
|
+
def design_field_experiment(intervention: str,
|
|
41
|
+
unit: str,
|
|
42
|
+
clusters: int,
|
|
43
|
+
expected_effect: float) -> dict:
|
|
44
|
+
"""
|
|
45
|
+
Design a cluster-randomized field experiment.
|
|
46
|
+
|
|
47
|
+
Args:
|
|
48
|
+
intervention: Description of the program/policy
|
|
49
|
+
unit: Unit of randomization (individual, household, village, school)
|
|
50
|
+
clusters: Number of clusters available
|
|
51
|
+
expected_effect: Expected effect size (standard deviations)
|
|
52
|
+
"""
|
|
53
|
+
return {
|
|
54
|
+
"intervention": intervention,
|
|
55
|
+
"randomization_unit": unit,
|
|
56
|
+
"design_considerations": {
|
|
57
|
+
"cluster_vs_individual": (
|
|
58
|
+
"Cluster randomization when intervention operates at group level "
|
|
59
|
+
"or to avoid spillovers between treated and control within clusters."
|
|
60
|
+
),
|
|
61
|
+
"stratification": (
|
|
62
|
+
"Stratify randomization by baseline covariates (e.g., region, "
|
|
63
|
+
"baseline outcome) to improve balance and statistical power."
|
|
64
|
+
),
|
|
65
|
+
"sample_size": {
|
|
66
|
+
"clusters": clusters,
|
|
67
|
+
"note": (
|
|
68
|
+
"With cluster randomization, power depends more on number "
|
|
69
|
+
"of clusters than individuals per cluster. Aim for 20+ "
|
|
70
|
+
"clusters per arm. Account for ICC (intracluster correlation)."
|
|
71
|
+
)
|
|
72
|
+
},
|
|
73
|
+
"expected_effect": expected_effect,
|
|
74
|
+
"pre_registration": "Register at AEA RCT Registry (socialscienceregistry.org)"
|
|
75
|
+
},
|
|
76
|
+
"threats": [
|
|
77
|
+
"Attrition (differential dropout between arms)",
|
|
78
|
+
"Non-compliance (some treated do not take up, some controls do)",
|
|
79
|
+
"Spillovers (treatment affects control units)",
|
|
80
|
+
"Hawthorne effects (behavior changes from being observed)",
|
|
81
|
+
"Ethical concerns (withholding a beneficial intervention)"
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Difference-in-Differences
|
|
87
|
+
|
|
88
|
+
### Standard DiD Framework
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
Setup:
|
|
92
|
+
Treatment group and control group
|
|
93
|
+
Observed before and after the intervention
|
|
94
|
+
|
|
95
|
+
Estimator:
|
|
96
|
+
DiD = (Y_treat_after - Y_treat_before) - (Y_control_after - Y_control_before)
|
|
97
|
+
|
|
98
|
+
Key assumption: Parallel trends
|
|
99
|
+
In the absence of treatment, treatment and control groups would have
|
|
100
|
+
followed the same trajectory over time.
|
|
101
|
+
|
|
102
|
+
Validation:
|
|
103
|
+
- Plot pre-treatment trends for both groups
|
|
104
|
+
- Test for pre-treatment differences in trends
|
|
105
|
+
- Consider event-study specification with leads and lags
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
```python
|
|
109
|
+
import pandas as pd
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
def estimate_did(df: pd.DataFrame, outcome: str,
|
|
113
|
+
treatment_col: str, post_col: str) -> dict:
|
|
114
|
+
"""
|
|
115
|
+
Estimate a Difference-in-Differences model.
|
|
116
|
+
|
|
117
|
+
Args:
|
|
118
|
+
df: Panel DataFrame
|
|
119
|
+
outcome: Outcome variable name
|
|
120
|
+
treatment_col: Binary treatment indicator
|
|
121
|
+
post_col: Binary post-period indicator
|
|
122
|
+
"""
|
|
123
|
+
from statsmodels.formula.api import ols
|
|
124
|
+
|
|
125
|
+
df["treat_post"] = df[treatment_col] * df[post_col]
|
|
126
|
+
|
|
127
|
+
model = ols(
|
|
128
|
+
f"{outcome} ~ {treatment_col} + {post_col} + treat_post",
|
|
129
|
+
data=df
|
|
130
|
+
).fit(cov_type="cluster", cov_kwds={"groups": df["cluster_id"]})
|
|
131
|
+
|
|
132
|
+
return {
|
|
133
|
+
"did_estimate": model.params["treat_post"],
|
|
134
|
+
"std_error": model.bse["treat_post"],
|
|
135
|
+
"p_value": model.pvalues["treat_post"],
|
|
136
|
+
"ci_95": model.conf_int().loc["treat_post"].tolist(),
|
|
137
|
+
"note": "Standard errors clustered at the cluster level"
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## Key Data Sources
|
|
142
|
+
|
|
143
|
+
### Major Datasets for Development Research
|
|
144
|
+
|
|
145
|
+
| Dataset | Coverage | Content |
|
|
146
|
+
|---------|----------|---------|
|
|
147
|
+
| World Bank LSMS | Multi-country | Household consumption, income, agriculture |
|
|
148
|
+
| DHS (Demographic and Health Surveys) | 90+ countries | Health, fertility, education, household |
|
|
149
|
+
| MICS (UNICEF) | 100+ countries | Child welfare indicators |
|
|
150
|
+
| World Development Indicators | Global | Macro indicators (GDP, poverty, health) |
|
|
151
|
+
| Penn World Tables | Global | PPP-adjusted GDP, capital, productivity |
|
|
152
|
+
| IPUMS International | Global | Census microdata harmonized across countries |
|
|
153
|
+
| Afrobarometer / Latinobarometro | Regional | Attitudes, governance, democracy |
|
|
154
|
+
|
|
155
|
+
## Measurement Challenges
|
|
156
|
+
|
|
157
|
+
### Common Issues in Development Data
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
Poverty measurement:
|
|
161
|
+
- Consumption vs. income (consumption preferred in developing countries)
|
|
162
|
+
- Purchasing power parity (PPP) adjustments
|
|
163
|
+
- Poverty line selection ($2.15/day international line)
|
|
164
|
+
|
|
165
|
+
Survey design:
|
|
166
|
+
- Sampling frame may miss mobile/nomadic populations
|
|
167
|
+
- Recall period affects consumption estimates
|
|
168
|
+
- Sensitive questions (income, violence) require careful design
|
|
169
|
+
- Translation and cultural adaptation of instruments
|
|
170
|
+
|
|
171
|
+
Administrative data:
|
|
172
|
+
- Often incomplete or of variable quality
|
|
173
|
+
- Can complement survey data for larger populations
|
|
174
|
+
- Satellite imagery increasingly used as proxy (nighttime lights, rooftop material)
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## Publishing in Development Economics
|
|
178
|
+
|
|
179
|
+
### Where to Publish
|
|
180
|
+
|
|
181
|
+
Top general journals that publish development economics: AER, QJE, Econometrica, ReStud, JPE. Field journals: Journal of Development Economics, World Development, Economic Development and Cultural Change, World Bank Economic Review. Pre-register field experiments at the AEA RCT Registry. Make data and code available in a replication package (AEA Data and Code Repository). Follow the J-PAL research transparency guidelines for field experiments.
|