File size: 1,454 Bytes
e9cca4d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | ---
license: cc0-1.0
---
# Census Earners (Cleaned)
A cleaned subset of the `openintro/census` dataset (a random sample of the
2000 U.S. Census), sourced via Vincent Arel-Bundock's Rdatasets collection.
## Cleaning steps
- Started from 500 rows, 9 columns.
- Removed 108 rows where `total_personal_income` was null — confirmed via
age check to be children (ages 0-14, median age 6), for whom personal
income is not applicable.
- Removed 52 working-age adults (ages 15-87) with `total_personal_income`
equal to 0 — mostly supported by household income, kept out to preserve
a clean positive-income target.
- Median-filled 11 remaining `total_family_income` nulls (genuinely unknown
for real earners). Median used instead of mean due to strong right-skew.
- Added `income_band`: a derived Low/Medium/High split (terciles) of
`total_personal_income`, for classification use cases.
## Final shape
339 rows x 10 columns. Zero nulls.
## Columns
- `rownames`: original row ID (not meaningful data)
- `census_year`: constant, 2000
- `state_fips_code`: U.S. state name (misleadingly named -- holds text, not a FIPS code)
- `total_family_income`: household income, USD
- `age`: age in years
- `sex`: Female / Male
- `race_general`: race category (8 levels)
- `marital_status`: marital status (6 levels)
- `total_personal_income`: personal income, USD (strictly positive)
- `income_band`: derived Low / Medium / High tercile of personal income
|