electricsheepafrica/africa-wfp-food-prices-for-libya
收藏Hugging Face2026-04-05 更新2026-04-12 收录
下载链接:
https://hf-mirror.com/datasets/electricsheepafrica/africa-wfp-food-prices-for-libya
下载链接
链接失效反馈官方服务:
资源简介:
---
annotations_creators:
- no-annotation
language_creators:
- found
language:
- en
license: cc-by-4.0
multilinguality:
- monolingual
size_categories:
- 10K<n<100K
source_datasets:
- original
task_categories:
- tabular-regression
- other
task_ids: []
tags:
- africa
- humanitarian
- hdx
- electric-sheep-africa
- economics
- food-security
- indicators
- markets
- lby
pretty_name: "Libya - Food Prices"
dataset_info:
splits:
- name: train
num_examples: 35556
- name: test
num_examples: 8889
---
# Libya - Food Prices
**Publisher:** WFP - World Food Programme · **Source:** [HDX](https://data.humdata.org/dataset/wfp-food-prices-for-libya) · **License:** `cc-by-igo` · **Updated:** 2026-04-05
---
## Abstract
This dataset contains Food Prices data for Libya, sourced from the World Food Programme Price Database. The World Food Programme Price Database covers foods such as maize, rice, beans, fish, and sugar for 98 countries and some 3000 markets. It is updated weekly but contains to a large extent monthly data. The data goes back as far as 1992 for a few countries, although many countries started reporting from 2003 or thereafter.
Each row in this dataset represents subnational administrative unit observations. Temporal coverage is indicated by the `date` column(s). Geographic scope: **LBY**.
*Curated into ML-ready Parquet format by [Electric Sheep Africa](https://huggingface.co/electricsheepafrica).*
---
## Dataset Characteristics
| | |
|---|---|
| **Domain** | Food security and nutrition |
| **Unit of observation** | Subnational administrative unit observations |
| **Rows (total)** | 44,445 |
| **Columns** | 18 (6 numeric, 11 categorical, 1 datetime) |
| **Train split** | 35,556 rows |
| **Test split** | 8,889 rows |
| **Geographic scope** | LBY |
| **Publisher** | WFP - World Food Programme |
| **HDX last updated** | 2026-04-05 |
---
## Variables
**Geographic** — `admin1` (West, South, East), `admin2` (Tripoli, Misrata, Al Jabal Al Gharbi), `latitude` (range 24.2–32.92), `longitude` (range 9.49–23.96), `category` (cereals and tubers, non-food, miscellaneous food) and 4 others.
**Temporal** — `date`.
**Outcome / Measurement** — `priceflag` (actual), `price` (range 0.01–333.92), `usdprice` (range 0.0072–240.23).
**Identifier / Metadata** — `market_id` (range 1345.0–2688.0), `esa_source` (HDX), `esa_processed`.
**Other** — `market` (Sebha, Nalut, Ubari), `unit` (KG, L, 400 G).
---
## Quick Start
```python
from datasets import load_dataset
ds = load_dataset("electricsheepafrica/africa-wfp-food-prices-for-libya")
train = ds["train"].to_pandas()
test = ds["test"].to_pandas()
print(train.shape)
train.head()
```
---
## Schema
| Column | Type | Null % | Range / Sample Values |
|---|---|---|---|
| `date` | datetime64[ns] | 0.0% | |
| `admin1` | object | 0.1% | West, South, East |
| `admin2` | object | 0.1% | Tripoli, Misrata, Al Jabal Al Gharbi |
| `market` | object | 0.0% | Sebha, Nalut, Ubari |
| `market_id` | int64 | 0.0% | 1345.0 – 2688.0 (mean 2353.4533) |
| `latitude` | float64 | 0.1% | 24.2 – 32.92 (mean 30.6779) |
| `longitude` | float64 | 0.1% | 9.49 – 23.96 (mean 15.1653) |
| `category` | object | 0.0% | cereals and tubers, non-food, miscellaneous food |
| `commodity` | object | 0.0% | Beans, Onions, Eggs |
| `commodity_id` | int64 | 0.0% | 50.0 – 545.0 (mean 238.3845) |
| `unit` | object | 0.0% | KG, L, 400 G |
| `priceflag` | object | 0.0% | actual |
| `pricetype` | object | 0.0% | Retail |
| `currency` | object | 0.0% | LYD |
| `price` | float64 | 0.0% | 0.01 – 333.92 (mean 6.2402) |
| `usdprice` | float64 | 0.0% | 0.0072 – 240.23 (mean 2.9148) |
| `esa_source` | object | 0.0% | HDX |
| `esa_processed` | object | 0.0% | |
---
## Numeric Summary
| Column | Min | Max | Mean | Median |
|---|---|---|---|---|
| `market_id` | 1345.0 | 2688.0 | 2353.4533 | 2333.0 |
| `latitude` | 24.2 | 32.92 | 30.6779 | 32.13 |
| `longitude` | 9.49 | 23.96 | 15.1653 | 14.04 |
| `commodity_id` | 50.0 | 545.0 | 238.3845 | 173.0 |
| `price` | 0.01 | 333.92 | 6.2402 | 3.5 |
| `usdprice` | 0.0072 | 240.23 | 2.9148 | 1.47 |
---
## 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`. 1 column(s) were cast from string to numeric or datetime based on parse-success rate (>85% threshold). 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 WFP - World Food Programme 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/wfp-food-prices-for-libya) for the publisher's own methodology notes and caveats.
---
## Citation
```bibtex
@dataset{hdx_africa_wfp_food_prices_for_libya,
title = {Libya - Food Prices},
author = {WFP - World Food Programme},
year = {2026},
url = {https://data.humdata.org/dataset/wfp-food-prices-for-libya},
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:
- en
license: cc-by-4.0
multilinguality:
- 单语言
size_categories:
- 10K<n<100K
source_datasets:
- 原创数据集
task_categories:
- 表格回归
- 其他
task_ids: []
tags:
- 非洲
- 人道主义
- HDX
- electric-sheep-africa
- 经济学
- 粮食安全
- 指标
- 市场
- LBY
pretty_name: "利比亚——粮食价格"
dataset_info:
splits:
- name: train
num_examples: 35556
- name: test
num_examples: 8889
# 利比亚——粮食价格
**发布方:** 世界粮食计划署(World Food Programme, WFP) · **来源:** [HDX](https://data.humdata.org/dataset/wfp-food-prices-for-libya) · **许可协议:** `cc-by-igo` · **更新时间:** 2026-04-05
---
## 摘要
本数据集包含源自世界粮食计划署价格数据库的利比亚粮食价格数据。世界粮食计划署价格数据库覆盖98个国家约3000个市场的玉米、大米、豆类、鱼类、食糖等食品价格信息,数据更新频率为周度,主体为月度统计数据。部分国家的最早数据可追溯至1992年,多数国家则从2003年及之后开始上报。
本数据集的每一行代表次国家级行政单元的观测记录,时间覆盖范围由`date`(日期)列标注。地理覆盖范围:**LBY(利比亚)**。
*本数据集已由[Electric Sheep Africa](https://huggingface.co/electricsheepafrica)整理为适用于机器学习的Parquet格式。*
---
## 数据集特征
| | |
|---|---|
| **领域** | 粮食安全与营养 |
| **观测单元** | 次国家级行政单元观测记录 |
| **总数据行数** | 44,445 |
| **列数** | 18列(6个数值型、11个分类型、1个日期时间型) |
| **训练集划分** | 35,556条数据 |
| **测试集划分** | 8,889条数据 |
| **地理覆盖范围** | LBY(利比亚) |
| **发布方** | WFP——世界粮食计划署 |
| **HDX最后更新时间** | 2026-04-05 |
---
## 变量说明
**地理类变量** — `admin1`(一级行政区:西部、南部、东部)、`admin2`(二级行政区:的黎波里、米苏拉塔、盖尔比山地区)、`latitude`(纬度范围:24.2–32.92)、`longitude`(经度范围:9.49–23.96)、`category`(类别:谷物与块根作物、非食品、其他食品)及另外4个变量。
**时间类变量** — `date`(日期)。
**结果/测量类变量** — `priceflag`(价格标识:实际值)、`price`(价格范围:0.01–333.92)、`usdprice`(美元计价价格范围:0.0072–240.23)。
**标识符/元数据类变量** — `market_id`(市场ID范围:1345.0–2688.0)、`esa_source`(数据来源:HDX)、`esa_processed`(处理标记)。
**其他变量** — `market`(市场名称:塞卜哈、纳卢特、乌巴里)、`unit`(计量单位:千克、升、400克)。
---
## 快速上手
python
from datasets import load_dataset
ds = load_dataset("electricsheepafrica/africa-wfp-food-prices-for-libya")
train = ds["train"].to_pandas()
test = ds["test"].to_pandas()
print(train.shape)
train.head()
---
## 数据结构
| 列名 | 数据类型 | 空值占比 | 取值范围/示例值 |
|---|---|---|---|
| `date` | datetime64[ns] | 0.0% | |
| `admin1` | 字符串(object) | 0.1% | 西部、南部、东部 |
| `admin2` | 字符串(object) | 0.1% | 的黎波里、米苏拉塔、盖尔比山地区 |
| `market` | 字符串(object) | 0.0% | 塞卜哈、纳卢特、乌巴里 |
| `market_id` | 64位整数(int64) | 0.0% | 1345.0 – 2688.0(均值:2353.4533) |
| `latitude` | 64位浮点数(float64) | 0.1% | 24.2 – 32.92(均值:30.6779) |
| `longitude` | 64位浮点数(float64) | 0.1% | 9.49 – 23.96(均值:15.1653) |
| `category` | 字符串(object) | 0.0% | 谷物与块根作物、非食品、其他食品 |
| `commodity` | 字符串(object) | 0.0% | 豆类、洋葱、鸡蛋 |
| `commodity_id` | 64位整数(int64) | 0.0% | 50.0 – 545.0(均值:238.3845) |
| `unit` | 字符串(object) | 0.0% | 千克、升、400克 |
| `priceflag` | 字符串(object) | 0.0% | actual(实际值) |
| `pricetype` | 字符串(object) | 0.0% | 零售 |
| `currency` | 字符串(object) | 0.0% | LYD(利比亚第纳尔) |
| `price` | 64位浮点数(float64) | 0.0% | 0.01 – 333.92(均值:6.2402) |
| `usdprice` | 64位浮点数(float64) | 0.0% | 0.0072 – 240.23(均值:2.9148) |
| `esa_source` | 字符串(object) | 0.0% | HDX |
| `esa_processed` | 字符串(object) | 0.0% | |
---
## 数值型变量统计摘要
| 列名 | 最小值 | 最大值 | 均值 | 中位数 |
|---|---|---|---|---|
| `market_id` | 1345.0 | 2688.0 | 2353.4533 | 2333.0 |
| `latitude` | 24.2 | 32.92 | 30.6779 | 32.13 |
| `longitude` | 9.49 | 23.96 | 15.1653 | 14.04 |
| `commodity_id` | 50.0 | 545.0 | 238.3845 | 173.0 |
| `price` | 0.01 | 333.92 | 6.2402 | 3.5 |
| `usdprice` | 0.0072 | 240.23 | 2.9148 | 1.47 |
---
## 数据整理流程
原始数据通过CKAN API从HDX下载,并转换为Parquet格式。列名统一转换为小写并采用蛇形命名法(snake_case)进行标准化。将常见缺失值标记(`N/A`、`null`、`none`、`-`、`unknown`、`no data`、`#N/A`)统一替换为`NaN`。基于解析成功率(阈值>85%),将1列从字符串类型转换为数值型或日期时间型。本数据集以固定随机种子(42)按80/20比例划分为训练集与测试集,并以Snappy压缩格式的Parquet文件保存。
---
## 数据集局限性
- 本数据集源自世界粮食计划署(WFP),Electric Sheep Africa未对其进行独立验证。
- 自动化清洗流程无法修正原始数据收集中的错报值、定义不一致或抽样偏差问题。
- 请参阅[原始HDX数据集页面](https://data.humdata.org/dataset/wfp-food-prices-for-libya)查看发布方提供的方法论说明与注意事项。
---
## 引用格式
bibtex
@dataset{hdx_africa_wfp_food_prices_for_libya,
title = {Libya - Food Prices},
author = {WFP - 世界粮食计划署},
year = {2026},
url = {https://data.humdata.org/dataset/wfp-food-prices-for-libya},
note = {由Electric Sheep Africa重新打包以适配机器学习需求 (https://huggingface.co/electricsheepafrica)}
}
---
*[Electric Sheep Africa](https://huggingface.co/electricsheepafrica)——非洲机器学习数据集基础设施提供商,尼日利亚拉各斯。*
提供机构:
electricsheepafrica



