--- license: cc-by-nc-nd-4.0 task_categories: - time-series-forecasting language: - en tags: - tsfile - timeseries - time-series - macroeconomics - forecasting - economics - finance - format:tsfile pretty_name: MacroEconHorizon (TsFile) size_categories: - 1M` rather than a single sparse union table. - **Time** (INT64, milliseconds) — the daily date (source `Unnamed: 0` column). - **`Q_...` / `D_...` / `M_...` / `A_...`** (FLOAT) — the economic indicators. Column names encode frequency, code, country, series row, and transformation (e.g. `Q_FXSP_AE_row_0_value_delta_log`); dots/special characters are replaced with underscores. Each country is a single device; its indicators are numeric FIELD columns. Missing values (forward-fill does not reach the start of every series) are stored as null. ## Usage Install the Apache TsFile Python SDK (`pip install tsfile`) and read a converted file: ```python from pathlib import Path from tsfile import TsFileReader path = Path("macroecon_ae.tsfile") with TsFileReader(str(path)) as reader: schemas = reader.get_all_table_schemas() print("tables:", list(schemas)) table_name = next(iter(schemas)) table = schemas[table_name] columns = [column.get_column_name() for column in table.get_columns()] print("columns:", columns) field_names = [ column.get_column_name() for column in table.get_columns() if column.get_column_name() not in {"Time", "time"} ] if field_names: with reader.query_table(table_name, field_names[:3], batch_size=1024) as result: batch = result.read_arrow_batch() if batch is not None: print(batch.to_pandas().head()) ``` ## Source & license - Original dataset: https://huggingface.co/datasets/bkoyuncu/MacroEcon - Author / publisher: bkoyuncu - Curated by: Bank for International Settlements (BIS) - License: CC BY-NC-ND 4.0