File size: 2,372 Bytes
17df3d8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
---

license: other
task_categories:
- time-series-forecasting
tags:
- time-series
- tsfile
pretty_name: world_co2_emissions (TsFile format)
---


# world_co2_emissions — TsFile 格式

本目录是 [`autogluon/fev_datasets`](https://huggingface.co/datasets/autogluon/fev_datasets) 中 **world_co2_emissions** 子集转换为 [Apache TsFile](https://tsfile.apache.org/) 格式的版本。

## 来源与引用

- **原始来源**:https://www.kaggle.com/datasets/ulrikthygepedersen/co2-emissions-by-country
- **统一格式合集**:[autogluon/fev_datasets](https://huggingface.co/datasets/autogluon/fev_datasets)

> 本数据由外部来源转换为统一格式后再转为 TsFile。许可与引用以**原始来源**为准,我们不对原始数据主张任何权利。除非另有说明,数据仅供研究用途。

## 数据统计

| 序列数 | 中位长度 | 观测点数 | 动态列 | 静态列 | 文件 |
|---|---|---|---|---|---|
| 191 | 60 | 11,460 | 1 | 0 | `world_co2_emissions.tsfile` |

## TsFile 存储模型

- 每条原始序列(`id`)→ 一个 **device**(TAG 维度)。
- 随时间变化的 target / 动态协变量 → **measurement**(FIELD)。
- `timestamp``Time`(INT64 毫秒)。
- 表名:world_co2_emissions。

### 列含义

| 列 | 角色 | TsFile 类型 |
|---|---|---|
| `Time` | Time(时间列) | INT64 |
| `id` | TAG(device 维度) | STRING |
| `target` | FIELD(measurement) | FLOAT |

> 注:有 85 个原始 id 含非法标识符字符,已规范化为合法 device 名(如 Africa Eastern and Southern→Africa_Eastern_and_Southern, Africa Western and Central→Africa_Western_and_Central, Antigua and Barbuda→Antigua_and_Barbuda)。

## 转换说明

- 每行原始数据是一整条序列 `(id, timestamp[], 各 target[])`,纵向打平为长表后写入 TsFile。
- 数值类型按源列自适应:float32→FLOAT、float64→DOUBLE、整数→INT64、bool→BOOLEAN。
- 时间精度:毫秒(INT64)。
- 大表会被工具自动分片为 `<名>_1.tsfile``<名>_2.tsfile` …,同属一个逻辑表。

## 读取示例

```python

from tsfile import TsFileReader



reader = TsFileReader("world_co2_emissions.tsfile")

schemas = reader.get_all_table_schemas()

# 表名:world_co2_emissions;列见下方"列含义"。

```