Tunisia 2014 Census (RGPH) — R data package
# rgph2014tn
**Delegation-level data from Tunisia's 2014 General Census of Population and Housing** (*Recensement Général de la Population et de l'Habitat*), published by the Institut National de la Statistique (INS).
169 variables · 264 délégations · 24 gouvernorats · 28 disaggregated data sheets
---
## What's in the data?
The package ships a pre-merged master dataset (`rgph_master`) covering all 264 delegations, plus 28 disaggregated sheets broken down by sex and milieu (urban/rural).
| Domain | Variables | Examples |
|---|---|---|
| Demography | 15 | Population, age structure, marital status |
| Education | 10 | Enrollment, literacy, attainment, internet use |
| Employment | 36 | Unemployment rate, sectoral composition, graduate unemployment |
| Migration | 19 | International and internal flows, motives |
| Household | 31 | Water, energy, tenure, equipment, communications |
| Housing | 29 | Type, size, occupancy, infrastructure, facilities |
| Services | 24 | Distance to schools, health centres, sports facilities |
| Geography | 3 | Governorate, delegation (Arabic & French) |
**Disaggregated sheets** provide breakdowns by sex (male/female/total) and milieu (communal/non-communal/total) at multiple geographic levels, with up to 2,172 rows per sheet.
## Installation
```r
# From GitHub:
# install.packages("remotes")
remotes::install_github("MedDhia/rgph2014tn")
```
## Quick start
```r
library(rgph2014tn)
# The master dataset loads lazily
data(rgph_master)
dim(rgph_master)
#> [1] 264 169
# Explore variable definitions
cb [1] "master_merged" "demo1" "demo2" "educ1" "educ2" ...
# Load a sheet disaggregated by sex and milieu
demo [1] 2172 14
```
## Example: regional inequality
```r
# Unemployment by governorate
gov_unemp [1] 0.56
# Simple regression
fit <- lm(pct_scolarisation_6_14 ~ pct_eau_potable_sonede,
data = rgph_master)
summary(fit)
```
## Data details
**Master dataset:** `rgph_master` — 264 rows (one per délégation) × 169 columns. …