Census indicators
get_indicatorsHCP's census figures for Morocco or any région, province or préfecture, cercle, commune or arrondissement: age, marital status, fertility, disability, schooling, illiteracy, the languages people read and write and the local languages they use, education, work, employment status and how people get to work, and for households their size, dwelling, occupancy, amenities, wastewater, waste and cooking fuel.
Reading them: shares and rates are percentages from 0 to 100. Null means HCP publishes no figure there. Most come from the long questionnaire, which went to a random 20% of households in communes of 2,000 households or more, so there they're estimates.
Ranking and comparing: to order communes by one figure, call list_communes with sort set to its path. To compare the régions, the provinces or the arrondissements, give level without a unit and get them all in one call.
The 2014 census is here too, under census. Age, education, local languages, illiteracy, fertility, disability, work, the ways of getting to work, dwellings, amenities, wastewater and waste ask what 2024 asks and can be read against it. Where people work and how children get to school are 2014 only. Five topics changed and can't be subtracted: marital status covered everyone rather than people aged 15 and over, schooling ages 7 to 12 rather than 6 to 11, reading and writing was asked as combinations of languages rather than one at a time, a household counted under every cooking fuel it used, and the employment shares took in unemployed people who had worked before. A unit the 2014 census didn't count has null there, Casablanca and the 5 other cities with arrondissements among them, since 2014 published those by arrondissement.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sex | No | Everyone (all), men, women, or each of the three. all when left out. Household figures have no sex. | |
| area | No | The whole unit (total), its urban or rural part, or each of the three. total when left out. | |
| unit | No | A région, province or préfecture, cercle, commune or arrondissement, by code or slug. Morocco as a whole when left out. | |
| level | No | With a unit, the level it's at, where a name is shared: Tiznit is a commune and a province, and a name alone means the commune. Without a unit, region, province or arrondissement gives every one of that level in one call. | |
| census | No | Which census. 2024 when left out. both gives the two together, to see what changed. | |
| topics | No | Only these topics. Every topic when left out. Two are easy to confuse: labour holds the labour force, the activity rate and the unemployment rate, while employmentStatus is how the people in work are employed, as employees, self-employed or apprentices. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| results | Yes |