WeatherDatasetThailand
收藏资源简介:
该数据集为泰国空气质量与天气数据集,由每小时从AIR4Thai(泰国污染控制部门)和OpenWeather API采集的数据组成,通过Airflow管道进行清洗、去重并构建成星型模式数据仓库。数据集包含四个CSV文件:air_stations.csv(原始追加日志,182,598行,记录每个站点每小时原始拉取数据)、dim_station.csv(站点维度表,177行,包含站点ID、泰/英区域名称、位置、类型、经纬度)、dim_date.csv(日期维度表,45行,覆盖数据中出现的日期属性)、fact_air_quality.csv(清洗去重后的事实表,141,275行,按(station_id, recorded_at)去重,是推荐用于分析的表)。主要字段包括站点ID、记录时间、官方泰国AQI值及主导污染物、PM2.5/PM10/O3/CO/NO2/SO2浓度及子指数,以及OpenWeather提供的空气质量与天气数据(如温度、湿度、风速等)。数据覆盖的收集时间为2026年6月8日至8月6日,但存在约11天的数据缺失(主要由Windows更新重启和SSL证书问题导致),因此不保证连续每小时覆盖。该数据集适用于空气质量分析、时间序列预测、污染源解析、环境机器学习等任务。数据以Apache-2.0许可证发布,语言为泰语和英语。
This dataset is a Thai air quality and weather dataset, composed of hourly data collected from AIR4Thai (Thailands Pollution Control Department) and the OpenWeather API, processed via an Airflow pipeline for cleaning, deduplication, and building a star-schema data warehouse. The dataset includes four CSV files: air_stations.csv (raw append log, 182,598 rows, recording hourly raw pulls per station), dim_station.csv (station dimension table, 177 rows, containing station ID, Thai/English region names, location, type, latitude/longitude), dim_date.csv (date dimension table, 45 rows, covering date attributes present in the data), and fact_air_quality.csv (cleaned and deduplicated fact table, 141,275 rows, deduplicated by (station_id, recorded_at), recommended for analysis). Key fields include station ID, recorded time, official Thai AQI value and dominant pollutant, PM2.5/PM10/O3/CO/NO2/SO2 concentrations and sub-indices, as well as air quality and weather data from OpenWeather (e.g., temperature, humidity, wind speed). The data collection period is from June 8 to August 6, 2026, but there is approximately 11 days of missing data (mainly due to Windows updates, restarts, and SSL certificate issues), so continuous hourly coverage is not guaranteed. This dataset is suitable for air quality analysis, time series forecasting, pollution source apportionment, environmental machine learning, etc. The data is released under the Apache-2.0 license, and the language is Thai and English.
Thailand Air Quality & Weather Dataset 数据集详情
概述
该数据集为泰国空气质量与天气数据,基于 Apache-2.0 许可发布,涵盖泰语和英语两种语言。数据由 Airflow 流水线每小时采集,整合了 AIR4Thai(泰国污染控制部门)的空气质量读数及 OpenWeather API 的天气/空气污染数据,构建了一个小型星型模式数据集。
数据规模与配置
数据集总记录数在 10万 至 100万 之间,包含 4 个独立的配置(config),各配置表结构不同,不可合并使用:
| 配置文件 | 行数(截至2026-08-06) | 说明 |
|---|---|---|
fact_air_quality |
141,275 | 清洗去重后的事实表,按 station_id + recorded_at 唯一,推荐用于分析 |
air_stations |
182,598 | 原始追加日志,未经清洗去重 |
dim_station |
177 | 站点维度表(站点ID、泰/英区域名、坐标等) |
dim_date |
45 | 日期维度表(日历属性) |
主要字段
- 站点信息:
station_id(如02t)、area_th/area_en(泰/英站名)、location(泰国省份)、lat/lon(坐标) - 时间戳:
recorded_at(曼谷当地时间,无时区标记)、created_at(数据入库时间) - 泰国官方空气质量指标:
aqi、aqi_param(主导污染物)、各污染物浓度及子指数(pm25_value/pm25_aqi、pm10_value/pm10_aqi、o3_*、co_*、no2_*、so2_*) - OpenWeather 匹配数据(
ow_*前缀):空气污染指标(ow_aqi、ow_co、ow_pm25、ow_pm10等)及气象数据(温度、湿度、气压、风速、云量等)
已知数据缺口
采集管道在 Windows 机器上运行,存在停机(主要是 Windows Update 重启及一次 SSL 证书故障),且 AIR4Thai 仅提供当前读数,错过的时段无法补采。在约 59 天(2026-06-08 至 2026-08-06)的收集期内,共有 17 个超过 1.5 小时的缺口,总计约 11 天数据缺失,主要缺口包括:
- 2026-07-02 至 2026-07-06,约 4 天 8 小时(SSL 证书验证失败)
- 2026-07-15 至 2026-07-19,约 3 天 12 小时(Windows Update 重启后未手动恢复)
- 另有多个 2–12 小时不等的缺口(多为 Windows Update 重启导致)
使用时应注意:不能假定数据具有连续的小时级覆盖,在依赖严格小时规律(如时间序列插值或滞后特征)前需检查 recorded_at/created_at 的缺口。
数据来源与许可
数据来源于公开的 AIR4Thai API(泰国污染控制部门)和 OpenWeather API。商业性再分发衍生数据前,需查阅各数据提供方的服务条款。当前快照为手动导出,不保证持续同步更新。
数据加载示例
python from datasets import load_dataset
加载事实表
fact = load_dataset("Datchthana/WeatherDatasetThailand", name="fact_air_quality")
加载站点维度表
stations = load_dataset("Datchthana/WeatherDatasetThailand", name="dim_station")
其他说明
- 数据集中不包含地震数据,仅覆盖空气质量/天气相关部分。
- 源数据库中每个站点单独的原始表(约184个)未包含在此数据集中,因为其内容已合并至
fact_air_quality.csv,避免重复发布。




