File size: 4,057 Bytes
66aeb45
c8a3ba6
 
66aeb45
 
 
 
c8a3ba6
 
66aeb45
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c8a3ba6
66aeb45
c8a3ba6
66aeb45
c8a3ba6
 
66aeb45
c8a3ba6
66aeb45
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c8a3ba6
 
 
 
 
 
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
---
task_categories:
- time-series-forecasting
tags:
- tsfile
- timeseries
- time-series
- format:tsfile
pretty_name: knowable
configs:
- config_name: default
  data_files:
  - split: train
    path: congress_trades_2.tsfile
  - split: train
    path: congress_trades_3.tsfile
  - split: train
    path: congress_trades_4.tsfile
  - split: train
    path: congress_trades_5.tsfile
  - split: train
    path: congress_trades_6.tsfile
  - split: train
    path: congress_trades_7.tsfile
  - split: train
    path: congress_trades_8.tsfile
  - split: train
    path: house_filings_1.tsfile
  - split: train
    path: house_filings_2.tsfile
  - split: train
    path: house_filings_4.tsfile
  - split: train
    path: house_filings_5.tsfile
  - split: train
    path: house_filings_6.tsfile
  - split: train
    path: house_filings_8.tsfile
  - split: train
    path: house_filings_9.tsfile
  - split: train
    path: insider_transactions_2.tsfile
  - split: train
    path: insider_transactions_3.tsfile
  - split: train
    path: insider_transactions_5.tsfile
  - split: train
    path: insider_transactions_6.tsfile
  - split: train
    path: insider_transactions_7.tsfile
  - split: train
    path: insider_transactions_8.tsfile
  - split: train
    path: insider_transactions_9.tsfile
  - split: train
    path: senate_filings_1.tsfile
  - split: train
    path: senate_filings_2.tsfile
  - split: train
    path: senate_filings_3.tsfile
  - split: train
    path: senate_filings_4.tsfile
  - split: train
    path: senate_filings_5.tsfile
  - split: train
    path: senate_filings_6.tsfile
  - split: train
    path: senate_filings_7.tsfile
  - split: train
    path: senate_filings_8.tsfile
  - split: train
    path: senate_filings_9.tsfile
---

# knowable (TsFile)

Apache TsFile version of [`jwlutz/knowable`](https://huggingface.co/datasets/jwlutz/knowable).

- **Converted rows:** 2,986,261
- **Data files:** `['congress_trades_2.tsfile', 'congress_trades_3.tsfile', 'congress_trades_4.tsfile', 'congress_trades_5.tsfile', 'congress_trades_6.tsfile', 'congress_trades_7.tsfile', 'congress_trades_8.tsfile', 'house_filings_1.tsfile', 'house_filings_2.tsfile', 'house_filings_4.tsfile', 'house_filings_5.tsfile', 'house_filings_6.tsfile', 'house_filings_8.tsfile', 'house_filings_9.tsfile', 'insider_transactions_2.tsfile', 'insider_transactions_3.tsfile', 'insider_transactions_5.tsfile', 'insider_transactions_6.tsfile', 'insider_transactions_7.tsfile', 'insider_transactions_8.tsfile', 'insider_transactions_9.tsfile', 'senate_filings_1.tsfile', 'senate_filings_2.tsfile', 'senate_filings_3.tsfile', 'senate_filings_4.tsfile', 'senate_filings_5.tsfile', 'senate_filings_6.tsfile', 'senate_filings_7.tsfile', 'senate_filings_8.tsfile', 'senate_filings_9.tsfile']`

The `fund_holdings` table (~890 MB per daily release) is not included; converted tables are congress_trades, insider_transactions, house_filings and senate_filings. Overlapping daily releases are deduplicated.

## 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("congress_trades_2.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/jwlutz/knowable
- License: not declared by the original dataset; please defer to the original.