microdata_extract_to_code
Reproduce an IPUMS microdata extract by generating ready-to-run R or Python code from the extract number, making workflows repeatable.
Instructions
Generate ready-to-run R (ipumsr) and/or Python (ipumspy) code to reproduce a microdata extract. Fetches the extract definition by number and emits code that re-submits the same request. Use this after microdata_create_extract to capture a reproducible workflow.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| language | No | Output language(s): 'r', 'python', or 'both' (default: 'both') | both |
| collection | Yes | IPUMS microdata collection (e.g. 'usa', 'cps') | |
| extractNumber | Yes | Extract number to generate code for |