Nicar2026_skills_in_codex_claude majority-minority-change
This skill should be used when users need to analyze county-level racial composition change between two Census snapshots and identify where places crossed a majority-minority threshold.
install
source · Clone the upstream repo
git clone https://github.com/amkessler/nicar2026_skills_in_codex_claude
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/amkessler/nicar2026_skills_in_codex_claude "$T" && mkdir -p ~/.claude/skills && cp -r "$T/.codex/skills/majority-minority-change" ~/.claude/skills/amkessler-nicar2026-skills-in-codex-claude-majority-minority-change-dcf8c6 && rm -rf "$T"
manifest:
.codex/skills/majority-minority-change/SKILL.mdsource content
Majority Minority Change
Use this skill to compare county demographics across two years and flag threshold crossings.
Requirements
- R with
,dplyr
,readr
, andstringrjsonlite - Two local CSV files with county identifiers and required race/population fields
- Bundled Census CSV snapshots for immediate use:
skills/majority-minority-change/data/county_race_acs5_2010.csvskills/majority-minority-change/data/county_race_acs5_2020.csv
- No API key required
Required Input Columns
- Join keys available in both files:
(preferred), orcounty_fips- both
andstatecounty
- Metrics in both files:
total_populationnon_hispanic_white
Standard Workflow
- Confirm start/end files and year labels.
accepts full names or USPS abbreviations (for example,--state
orGeorgia
).GA- Default bundled files:
- start:
skills/majority-minority-change/data/county_race_acs5_2010.csv - end:
skills/majority-minority-change/data/county_race_acs5_2020.csv
- start:
- Review
for exact derived/output field names before downstream filtering or selecting columns.skills/majority-minority-change/references/DATA_SCHEMA.md- Expected output naming includes
andnonwhite_share_<year_label>
.delta_nonwhite_share_pp
- Expected output naming includes
- Run script with optional state filter.
- Example:
Rscript skills/majority-minority-change/scripts/analyze_majority_minority_change.R --input-start skills/majority-minority-change/data/county_race_acs5_2010.csv --input-end skills/majority-minority-change/data/county_race_acs5_2020.csv --start-label 2010 --end-label 2020
- Example:
- Review counties with largest percentage-point shifts and threshold crossings.
Output
Return:
- non-white share in each year
- percentage-point change
crossed_to_majority_minoritycrossed_out_of_majority_minority