electricsheepafrica/africa-kenya-population-households-and-density-by-sublocations-2009
收藏Hugging Face2026-04-07 更新2026-04-12 收录
下载链接:
https://hf-mirror.com/datasets/electricsheepafrica/africa-kenya-population-households-and-density-by-sublocations-2009
下载链接
链接失效反馈官方服务:
资源简介:
---
annotations_creators:
- no-annotation
language_creators:
- found
language:
- en
license: other
multilinguality:
- monolingual
size_categories:
- 1K<n<10K
source_datasets:
- original
task_categories:
- other
task_ids: []
tags:
- africa
- humanitarian
- hdx
- electric-sheep-africa
- baseline-population
- governance-and-civil-society
- ken
pretty_name: "Kenya - Population, Households and Density by Sub locations in 2009"
dataset_info:
splits:
- name: train
num_examples: 5720
- name: test
num_examples: 1430
---
# Kenya - Population, Households and Density by Sub locations in 2009
**Publisher:** Kenya Open Data Initiative (inactive) · **Source:** [HDX](https://data.humdata.org/dataset/kenya-population-households-and-density-by-sublocations-2009) · **License:** `other-pd-nr` · **Updated:** 2023-03-03
---
## Abstract
This dataset comes from the Kenya Census Volume 1 Question 1 Population, Households and Density by Sublocations - 2009
Each row in this dataset represents subnational administrative unit observations. Data was last updated on HDX on 2023-03-03. Geographic scope: **KEN**.
*Curated into ML-ready Parquet format by [Electric Sheep Africa](https://huggingface.co/electricsheepafrica).*
---
## Dataset Characteristics
| | |
|---|---|
| **Domain** | Demographics and population |
| **Unit of observation** | Subnational administrative unit observations |
| **Rows (total)** | 7,150 |
| **Columns** | 14 (7 numeric, 7 categorical, 0 datetime) |
| **Train split** | 5,720 rows |
| **Test split** | 1,430 rows |
| **Geographic scope** | KEN |
| **Publisher** | Kenya Open Data Initiative (inactive) |
| **HDX last updated** | 2023-03-03 |
---
## Variables
**Geographic** — `district` (SIAYA, KITUI, NYERI SOUTH), `location` (TOWNSHIP, MUKARO, IRIAINI), `sublocation` (TOWNSHIP, MILIMANI, MAJENGO), `population_density` (range 0.0–119054.61), `province` (RIFT VALLEY, EASTERN, NYANZA).
**Demographic** — `male` (range 0.0–71619.0), `female` (range 0.0–70656.0), `households` (range 0.0–49198.0).
**Outcome / Measurement** — `total` (range 0.0–140321.0).
**Identifier / Metadata** — `objectid` (range 0.0–7149.0), `esa_source` (HDX), `esa_processed` (2026-04-07).
**Other** — `area_in_sq_km` (range 0.06–6302.71), `division` (CENTRAL, NANDI HILLS, SIGOR).
---
## Quick Start
```python
from datasets import load_dataset
ds = load_dataset("electricsheepafrica/africa-kenya-population-households-and-density-by-sublocations-2009")
train = ds["train"].to_pandas()
test = ds["test"].to_pandas()
print(train.shape)
train.head()
```
---
## Schema
| Column | Type | Null % | Range / Sample Values |
|---|---|---|---|
| `district` | object | 0.0% | SIAYA, KITUI, NYERI SOUTH |
| `location` | object | 0.0% | TOWNSHIP, MUKARO, IRIAINI |
| `sublocation` | object | 0.0% | TOWNSHIP, MILIMANI, MAJENGO |
| `male` | int64 | 0.0% | 0.0 – 71619.0 (mean 2684.2599) |
| `female` | int64 | 0.0% | 0.0 – 70656.0 (mean 2715.7537) |
| `total` | int64 | 0.0% | 0.0 – 140321.0 (mean 5400.0136) |
| `households` | int64 | 0.0% | 0.0 – 49198.0 (mean 1226.2873) |
| `area_in_sq_km` | float64 | 0.0% | 0.06 – 6302.71 (mean 81.3026) |
| `population_density` | float64 | 0.0% | 0.0 – 119054.61 (mean 805.8568) |
| `division` | object | 0.0% | CENTRAL, NANDI HILLS, SIGOR |
| `province` | object | 0.0% | RIFT VALLEY, EASTERN, NYANZA |
| `objectid` | int64 | 0.0% | 0.0 – 7149.0 (mean 3574.5) |
| `esa_source` | object | 0.0% | HDX |
| `esa_processed` | object | 0.0% | 2026-04-07 |
---
## Numeric Summary
| Column | Min | Max | Mean | Median |
|---|---|---|---|---|
| `male` | 0.0 | 71619.0 | 2684.2599 | 1837.0 |
| `female` | 0.0 | 70656.0 | 2715.7537 | 1886.5 |
| `total` | 0.0 | 140321.0 | 5400.0136 | 3724.0 |
| `households` | 0.0 | 49198.0 | 1226.2873 | 781.0 |
| `area_in_sq_km` | 0.06 | 6302.71 | 81.3026 | 15.325 |
| `population_density` | 0.0 | 119054.61 | 805.8568 | 259.92 |
| `objectid` | 0.0 | 7149.0 | 3574.5 | 3574.5 |
---
## Curation
Raw data was downloaded from HDX via the CKAN API and converted to Parquet. Column names were lowercased and standardised to snake_case. Common missing-value markers (`N/A`, `null`, `none`, `-`, `unknown`, `no data`, `#N/A`) were unified to `NaN`. The dataset was split 80/20 into train and test partitions using a fixed random seed (42) and saved as Snappy-compressed Parquet.
---
## Limitations
- Data originates from Kenya Open Data Initiative (inactive) and has not been independently validated by ESA.
- Automated cleaning cannot correct for misreported values, definitional inconsistencies, or sampling bias in the original collection.
- Refer to the [original HDX dataset page](https://data.humdata.org/dataset/kenya-population-households-and-density-by-sublocations-2009) for the publisher's own methodology notes and caveats.
---
## Citation
```bibtex
@dataset{hdx_africa_kenya_population_households_and_density_by_sublocations_2009,
title = {Kenya - Population, Households and Density by Sub locations in 2009},
author = {Kenya Open Data Initiative (inactive)},
year = {2023},
url = {https://data.humdata.org/dataset/kenya-population-households-and-density-by-sublocations-2009},
note = {Repackaged for machine learning by Electric Sheep Africa (https://huggingface.co/electricsheepafrica)}
}
```
---
*[Electric Sheep Africa](https://huggingface.co/electricsheepafrica) — Africa's ML dataset infrastructure. Lagos, Nigeria.*
annotations_creators:
- 无注释
language_creators:
- 现有资源采集
language:
- 英语
license:
- 其他许可
multilinguality:
- 单语言
size_categories:
- 1000 < 样本量 < 10000
source_datasets:
- 原创数据集
task_categories:
- 其他
task_ids: []
tags:
- 非洲
- 人道主义
- HDX(人道主义数据交换平台)
- Electric Sheep Africa
- 基线人口
- 治理与公民社会
- KEN(肯尼亚ISO 3166国家代码)
pretty_name: "2009年肯尼亚次区域人口、家庭与密度数据集"
dataset_info:
splits:
- name: 训练集
num_examples: 5720
- name: 测试集
num_examples: 1430
# 2009年肯尼亚次区域人口、家庭与密度数据集
**发布方:** 肯尼亚开放数据倡议(已停用) · **数据源:** [HDX](https://data.humdata.org/dataset/kenya-population-households-and-density-by-sublocations-2009) · **许可协议:** `other-pd-nr` · **最后更新时间:** 2023-03-03
---
## 摘要
本数据集源自2009年肯尼亚人口普查第一卷第一题:次区域人口、家庭与密度。数据集中每一行代表一个次国家级行政单元的观测数据。该数据最后一次在HDX平台更新于2023-03-03。地理覆盖范围:**KEN(肯尼亚)**。*本数据集已由[Electric Sheep Africa](https://huggingface.co/electricsheepafrica)整理为适用于机器学习的Parquet格式。*
---
## 数据集特征
| | |
|---|---|
| **领域** | 人口统计学与人口研究 |
| **观测单元** | 次国家级行政单元观测数据 |
| **总样本量** | 7150条 |
| **列数** | 14列(7个数值型列、7个分类型列,0个日期时间列) |
| **训练集划分** | 5720条样本 |
| **测试集划分** | 1430条样本 |
| **地理覆盖范围** | KEN(肯尼亚) |
| **发布方** | 肯尼亚开放数据倡议(已停用) |
| **HDX平台最后更新时间** | 2023-03-03 |
---
## 变量
**地理类变量** — `district`(行政区:锡亚亚、基图伊、南涅里)、`location`(片区:镇区、穆卡罗、伊里亚伊尼)、`sublocation`(次片区:镇区、米利马尼、马詹戈)、`population_density`(人口密度:取值范围0.0–119054.61)、`province`(省:裂谷省、东部省、尼扬扎省)。
**人口统计类变量** — `male`(男性人口:取值范围0.0–71619.0)、`female`(女性人口:取值范围0.0–70656.0)、`households`(家庭户数:取值范围0.0–49198.0)。
**结果/测量变量** — `total`(总人口:取值范围0.0–140321.0)。
**标识符/元数据变量** — `objectid`(对象ID:取值范围0.0–7149.0)、`esa_source`(数据来源:HDX)、`esa_processed`(数据处理时间:2026-04-07)。
**其他变量** — `area_in_sq_km`(面积,单位:平方千米:取值范围0.06–6302.71)、`division`(分区:中央、南迪山、西戈尔)。
---
## 快速上手
python
from datasets import load_dataset
ds = load_dataset("electricsheepafrica/africa-kenya-population-households-and-density-by-sublocations-2009")
train = ds["train"].to_pandas()
test = ds["test"].to_pandas()
print(train.shape)
train.head()
---
## 数据结构
| 列名 | 数据类型 | 空值占比 | 取值范围/示例值 |
|---|---|---|---|
| `district` | 字符型(object) | 0.0% | 锡亚亚、基图伊、南涅里 |
| `location` | 字符型(object) | 0.0% | 镇区、穆卡罗、伊里亚伊尼 |
| `sublocation` | 字符型(object) | 0.0% | 镇区、米利马尼、马詹戈 |
| `male` | 64位整型(int64) | 0.0% | 0.0 – 71619.0(均值2684.2599) |
| `female` | 64位整型(int64) | 0.0% | 0.0 – 70656.0(均值2715.7537) |
| `total` | 64位整型(int64) | 0.0% | 0.0 – 140321.0(均值5400.0136) |
| `households` | 64位整型(int64) | 0.0% | 0.0 – 49198.0(均值1226.2873) |
| `area_in_sq_km` | 64位浮点型(float64) | 0.0% | 0.06 – 6302.71(均值81.3026) |
| `population_density` | 64位浮点型(float64) | 0.0% | 0.0 – 119054.61(均值805.8568) |
| `division` | 字符型(object) | 0.0% | 中央、南迪山、西戈尔 |
| `province` | 字符型(object) | 0.0% | 裂谷省、东部省、尼扬扎省 |
| `objectid` | 64位整型(int64) | 0.0% | 0.0 – 7149.0(均值3574.5) |
| `esa_source` | 字符型(object) | 0.0% | HDX |
| `esa_processed` | 字符型(object) | 0.0% | 2026-04-07 |
---
## 数值统计摘要
| 列名 | 最小值 | 最大值 | 均值 | 中位数 |
|---|---|---|---|---|
| `male` | 0.0 | 71619.0 | 2684.2599 | 1837.0 |
| `female` | 0.0 | 70656.0 | 2715.7537 | 1886.5 |
| `total` | 0.0 | 140321.0 | 5400.0136 | 3724.0 |
| `households` | 0.0 | 49198.0 | 1226.2873 | 781.0 |
| `area_in_sq_km` | 0.06 | 6302.71 | 81.3026 | 15.325 |
| `population_density` | 0.0 | 119054.61 | 805.8568 | 259.92 |
| `objectid` | 0.0 | 7149.0 | 3574.5 | 3574.5 |
---
## 数据整理流程
原始数据通过CKAN API从HDX平台下载,并转换为Parquet格式。对列名进行小写转换,并统一为蛇形命名法(snake_case)。将常见的缺失值标记(`N/A`、`null`、`none`、`-`、`unknown`、`no data`、`#N/A`)统一替换为`NaN`。本数据集采用固定随机种子(42)按80/20的比例划分为训练集与测试集,并以Snappy压缩格式的Parquet文件存储。
---
## 局限性
- 本数据源自已停用的肯尼亚开放数据倡议,未经过Electric Sheep Africa的独立验证。
- 自动化清洗流程无法修正原始数据收集中的错报值、定义不一致或抽样偏差问题。
- 请查阅[原始HDX数据集页面](https://data.humdata.org/dataset/kenya-population-households-and-density-by-sublocations-2009)获取发布方提供的方法论说明与相关注意事项。
---
## 引用
bibtex
@dataset{hdx_africa_kenya_population_households_and_density_by_sublocations_2009,
title = {Kenya - Population, Households and Density by Sub locations in 2009},
author = {Kenya Open Data Initiative (inactive)},
year = {2023},
url = {https://data.humdata.org/dataset/kenya-population-households-and-density-by-sublocations-2009},
note = {Repackaged for machine learning by Electric Sheep Africa (https://huggingface.co/electricsheepafrica)}
}
---
*[Electric Sheep Africa](https://huggingface.co/electricsheepafrica) — 非洲机器学习数据集基础设施。尼日利亚拉各斯。*
提供机构:
electricsheepafrica



