الفقر في مجال ترابي
معلومة مهمة. إحصاء 2024 والسلاسل التاريخية للمندوبية السامية للتخطيط. راجع meta لمعرفة المصدر والتاريخ.
فهم السياق
RGPH هو الإحصاء العام للسكان الذي تنجزه المندوبية السامية للتخطيط HCP. المقيم ليس بالضرورة مغربي الجنسية. مثال توضيحي: 100 مقيم، منهم 95 مغربياً و5 أجانب، يعني مجموعاً من 100؛ لا تجمعهم مرة ثانية. الأرقام توضيحية.
فهم الإجابة
data: النتائج المطلوبة، في كائن أو قائمة.
meta: مصادر البيانات ورخصتها وتواريخها. تعني null أن القيمة غير معروفة أو غير متاحة.
API v2 هو المسار المرجعي. تبقى مسارات /api/v1 القديمة أسماء بديلة متوافقة مع السلوك المنشور حالياً، بما فيه تقسيم الصفحات؛ لم يُحدد موعد لحذفها.
حقول الإجابة 31
تشير [] إلى كل عنصر في القائمة. تعني null غير معروف أو غير متاح، ولا تعني صفراً. لغة الدليل لا تترجم قيم المصادر.
dataobjectالنتيجة المطلوبة: كائن واحد أو قائمة.
data.territoryobjectالمجال الترابي الذي تصفه المؤشرات، مع رموزه واسمه.
data.territory.levelstringالمستوى الترابي: national أو regions أو subdivisions (الأقاليم والعمالات) أو prefectures-of-arrondissements أو communes أو arrondissements.
القيم المقبولة:
"national""regions""subdivisions""prefectures-of-arrondissements""communes""arrondissements"data.territory.codestring | nullمعرّف المورد في MoroccoAPI؛ استعمله في روابط المورد المناسبة.
data.territory.hcp_codestring | nullرمز المندوبية السامية للتخطيط، جهاز الإحصاء المغربي. احتفظ به كنص للحفاظ على الأصفار الأولى.
data.territory.nameobjectاسم المورد، وقد يكون موزّعاً حسب اللغة.
data.territory.name.arstringالقيمة بالعربية؛ null عند غياب الترجمة.
data.territory.name.frstringالقيمة بالفرنسية؛ null عند غياب الترجمة.
data.territory.name.enstring | nullالقيمة بالإنجليزية؛ null عند غياب الترجمة.
data.territory.region_codestring | nullمعرّف الجهة الأم، وهي المستوى الإداري الأول في المغرب.
data.territory.province_codestring | nullمعرّف الإقليم أو العمالة الأم، تحت الجهة.
data.observationsobject[]القيم حسب الوسط وسنة الإحصاء؛ يغيب الوسط الذي لا قيمة له في المصدر.
data.observations[].areastringوسط الإقامة: all (الحضري والقروي معاً) أو urban أو rural.
القيم المقبولة:
"all""urban""rural"data.observations[].yearnumberالسنة التي تصفها البيانات، وليست سنة تنزيلها.
القيم المقبولة:
20242014data.observations[].mpinumber | nullمؤشر الفقر متعدد الأبعاد (MPI = H × A) بين 0 و1؛ null عندما لا يوجد أي فقير.
data.observations[].poverty_ratenumber | nullمعدل الفقر (H): نسبة السكان في وضعية فقر متعدد الأبعاد.
data.observations[].poverty_intensitynumber | nullشدة الفقر (A): متوسط نسبة الحرمان لدى الفقراء بالنسبة المئوية؛ null عندما لا يوجد أي فقير.
data.observations[].vulnerability_ratenumber | nullنسبة السكان المعرضين للفقر متعدد الأبعاد.
data.observations[].deprivation_ratesobjectنسبة السكان المحرومين في كل مؤشر من المؤشرات العشرة للمؤشر.
data.observations[].deprivation_rates.child_mortalitynumber | nullنسبة السكان المحرومين في وفيات الأطفال (الصحة).
data.observations[].deprivation_rates.disabilitynumber | nullنسبة السكان المحرومين في الإعاقة (الصحة).
data.observations[].deprivation_rates.school_attendancenumber | nullنسبة السكان المحرومين في تمدرس الأطفال (التعليم).
data.observations[].deprivation_rates.years_of_schoolingnumber | nullنسبة السكان المحرومين في عدد سنوات التمدرس (التعليم).
data.observations[].deprivation_rates.electricitynumber | nullنسبة السكان المحرومين في الكهرباء (ظروف العيش).
data.observations[].deprivation_rates.waternumber | nullنسبة السكان المحرومين في الماء (ظروف العيش).
data.observations[].deprivation_rates.sanitationnumber | nullنسبة السكان المحرومين في التطهير (ظروف العيش).
data.observations[].deprivation_rates.housingnumber | nullنسبة السكان المحرومين في السكن (ظروف العيش).
data.observations[].deprivation_rates.cooking_fuelnumber | nullنسبة السكان المحرومين في طريقة الطهي (ظروف العيش).
data.observations[].deprivation_rates.communication_assetsnumber | nullنسبة السكان المحرومين في وسائل الاتصال (الممتلكات).
data.observations[].mpi_trendstring | nullقراءة HCP لتطور المؤشر بين 2014 و2024: decrease أو increase أو stagnation أو new_urban_centre؛ null لسنة 2014.
data.observations[].aligned_with_dakhlabooleanتكون true لقيم 2014 لأربع جماعات وحّدتها HCP مع جماعة الداخلة بسبب التنقل الموسمي أثناء الإحصاء.
بنية البيانات
{
"type": "object",
"additionalProperties": false,
"required": [
"data",
"meta"
],
"properties": {
"data": {
"type": "object",
"additionalProperties": false,
"required": [
"territory",
"observations"
],
"properties": {
"territory": {
"type": "object",
"additionalProperties": false,
"required": [
"level",
"code",
"hcp_code",
"name",
"region_code",
"province_code"
],
"properties": {
"level": {
"enum": [
"national",
"regions",
"subdivisions",
"prefectures-of-arrondissements",
"communes",
"arrondissements"
]
},
"code": {
"anyOf": [
{
"type": "string"
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
],
"description": "MoroccoAPI geography code; null for the national total."
},
"hcp_code": {
"anyOf": [
{
"type": "string"
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
],
"description": "HCP geographic code in the dotted form used by the geography endpoints; null for the national total."
},
"name": {
"type": "object",
"additionalProperties": false,
"required": [
"ar",
"fr",
"en"
],
"properties": {
"ar": {
"type": "string"
},
"fr": {
"type": "string"
},
"en": {
"anyOf": [
{
"type": "string"
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
]
}
}
},
"region_code": {
"anyOf": [
{
"type": "string"
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
]
},
"province_code": {
"anyOf": [
{
"type": "string"
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
]
}
}
},
"observations": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"area",
"year",
"mpi",
"poverty_rate",
"poverty_intensity",
"vulnerability_rate",
"deprivation_rates",
"mpi_trend",
"aligned_with_dakhla"
],
"properties": {
"area": {
"enum": [
"all",
"urban",
"rural"
],
"description": "all (urban and rural together), urban or rural."
},
"year": {
"enum": [
2024,
2014
],
"description": "Census year: 2024, or 2014 as revised by HCP for comparison."
},
"mpi": {
"anyOf": [
{
"type": "number",
"minimum": 0,
"maximum": 1
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
],
"description": "Multidimensional poverty index (MPI = H × A), between 0 and 1. HCP leaves it empty (null) when no one is poor."
},
"poverty_rate": {
"anyOf": [
{
"type": "number",
"minimum": 0,
"maximum": 100
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
],
"description": "H: percentage of the population in multidimensional poverty."
},
"poverty_intensity": {
"anyOf": [
{
"type": "number",
"minimum": 0,
"maximum": 100
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
],
"description": "A: average share of deprivations among poor people, in percent. Null when no one is poor."
},
"vulnerability_rate": {
"anyOf": [
{
"type": "number",
"minimum": 0,
"maximum": 100
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
],
"description": "Percentage of the population vulnerable to multidimensional poverty."
},
"deprivation_rates": {
"type": "object",
"additionalProperties": false,
"required": [
"child_mortality",
"disability",
"school_attendance",
"years_of_schooling",
"electricity",
"water",
"sanitation",
"housing",
"cooking_fuel",
"communication_assets"
],
"description": "Percentage of the population deprived in each of the ten indicators.",
"properties": {
"child_mortality": {
"anyOf": [
{
"type": "number",
"minimum": 0,
"maximum": 100
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
]
},
"disability": {
"anyOf": [
{
"type": "number",
"minimum": 0,
"maximum": 100
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
]
},
"school_attendance": {
"anyOf": [
{
"type": "number",
"minimum": 0,
"maximum": 100
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
]
},
"years_of_schooling": {
"anyOf": [
{
"type": "number",
"minimum": 0,
"maximum": 100
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
]
},
"electricity": {
"anyOf": [
{
"type": "number",
"minimum": 0,
"maximum": 100
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
]
},
"water": {
"anyOf": [
{
"type": "number",
"minimum": 0,
"maximum": 100
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
]
},
"sanitation": {
"anyOf": [
{
"type": "number",
"minimum": 0,
"maximum": 100
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
]
},
"housing": {
"anyOf": [
{
"type": "number",
"minimum": 0,
"maximum": 100
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
]
},
"cooking_fuel": {
"anyOf": [
{
"type": "number",
"minimum": 0,
"maximum": 100
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
]
},
"communication_assets": {
"anyOf": [
{
"type": "number",
"minimum": 0,
"maximum": 100
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
]
}
}
},
"mpi_trend": {
"anyOf": [
{
"enum": [
"decrease",
"increase",
"stagnation",
"new_urban_centre"
]
},
{
"type": "string",
"nullable": true,
"enum": [
null
]
}
],
"description": "HCP's reading of the MPI change between 2014 and 2024, on 2024 observations only; null on 2014 observations."
},
"aligned_with_dakhla": {
"type": "boolean",
"description": "True for the 2014 values of four communes that HCP aligned on the commune of Dakhla because of seasonal mobility during the 2014 census."
}
}
},
"description": "One entry per area and year with source values, all areas first and 2024 before 2014."
}
}
},
"meta": {
"type": "object",
"additionalProperties": false,
"required": [
"dataset",
"total",
"license",
"retrieved_at",
"transformation_version",
"sources"
],
"properties": {
"dataset": {
"enum": [
"population-poverty"
]
},
"total": {
"type": "integer",
"minimum": 0
},
"license": {
"enum": [
"CC-BY-4.0"
]
},
"retrieved_at": {
"enum": [
"2026-10-26"
]
},
"transformation_version": {
"enum": [
"1.0.0"
]
},
"sources": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"dataset",
"producer",
"source_url",
"resource_url",
"license",
"source_updated_at"
],
"properties": {
"dataset": {
"type": "string"
},
"producer": {
"type": "string"
},
"source_url": {
"type": "string",
"format": "uri"
},
"resource_url": {
"type": "string",
"format": "uri"
},
"license": {
"enum": [
"CC-BY-4.0"
]
},
"source_updated_at": {
"type": "string",
"format": "date"
}
}
}
}
}
}
}
}المصادر وتقسيم الصفحات 13
metaobjectسياق النتيجة: المصادر والتواريخ والرخصة وتقسيم الصفحات عند الاقتضاء.
meta.datasetstringاسم مجموعة البيانات الخاصة بالنتيجة أو المصدر.
القيم المقبولة:
"population-poverty"meta.totalintegerعدد النتائج المطابقة للمرشحات قبل تقسيم الصفحات؛ وليس حجم هذه الصفحة.
meta.licensestringرخصة إعادة الاستخدام. تعني mixed وجود رخص مختلفة: راجع كل مصدر.
القيم المقبولة:
"CC-BY-4.0"meta.retrieved_atstringتاريخ جلب المشروع لملف المصدر؛ وليس تاريخ رصد البيانات.
القيم المقبولة:
"2026-10-26"meta.transformation_versionstringإصدار قواعد تحويل مجموعة البيانات؛ مستقل عن إصدار الواجهة.
القيم المقبولة:
"1.0.0"meta.sourcesobject[]المصادر المستخدمة لهذه النتيجة مع الجهات المنتجة والرخص.
meta.sources[].datasetstringاسم مجموعة البيانات الخاصة بالنتيجة أو المصدر.
meta.sources[].producerstringالجهة التي تنشر البيانات الأصلية.
meta.sources[].source_urlstringصفحة نشر المصدر أو التعريف ببياناته.
meta.sources[].resource_urlstringرابط الملف أو المورد المستخدم فعلياً.
meta.sources[].licensestringرخصة إعادة الاستخدام. تعني mixed وجود رخص مختلفة: راجع كل مصدر.
القيم المقبولة:
"CC-BY-4.0"meta.sources[].source_updated_atstringآخر تحديث معلن من المصدر؛ وليس تاريخ جلب الملف.
الأخطاء
400: معامل غير صالح أو مفقود.404: المورد غير موجود.
تتضمن الأخطاء error.code وerror.message وerror.request_id.
errorobjectتفاصيل الطلب الفاشل؛ تحل محل data وmeta.
error.codestringرمز ثابت للخطأ، مثل RESOURCE_NOT_FOUND؛ استعمله في منطق التطبيق.
error.messagestringشرح مقروء للخطأ؛ استعمل code في منطق التطبيق.
error.request_idstringمعرّف هذا الطلب، يفيد عند الإبلاغ عن مشكلة.