Dataset Viewer
Auto-converted to Parquet Duplicate
The dataset viewer is not available for this split.
Cannot load the dataset split (in streaming mode) to extract the first rows.
Error code:   StreamingRowsError
Exception:    CastError
Message:      Couldn't cast
source: large_string
external_id: large_string
snapshot_date: date32[day]
indicator: large_string
measure1: large_string
measure2: large_string
value: double
units: large_string
underlying_source: large_string
raw_record: large_string
ingested_at: timestamp[us, tz=UTC]
-- schema metadata --
pandas: '{"index_columns": [], "column_indexes": [], "columns": [{"name":' + 1391
to
{'source': Value('large_string'), 'snapshot_date': Value('date32'), 'region': Value('large_string'), 'week_number': Value('int64'), 'year': Value('int64'), 'category': Value('large_string'), 'this_week_cars': Value('int64'), 'this_week_yoy_pct': Value('float64'), 'ytd_cars': Value('int64'), 'ytd_avg_week_cars': Value('int64'), 'ytd_yoy_pct': Value('float64'), 'raw_record': Value('large_string'), 'ingested_at': Value('timestamp[us, tz=UTC]')}
because column names don't match
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/src/worker/utils.py", line 147, in get_rows_or_raise
                  return get_rows(
                      dataset=dataset,
                  ...<4 lines>...
                      column_names=column_names,
                  )
                File "/src/libs/libcommon/src/libcommon/utils.py", line 272, in decorator
                  return func(*args, **kwargs)
                File "/src/services/worker/src/worker/utils.py", line 127, in get_rows
                  rows_plus_one = list(itertools.islice(safe_iter(ds, dataset=dataset), rows_max_number + 1))
                File "/src/services/worker/src/worker/utils.py", line 483, in safe_iter
                  yield from ds.decode(False) if ds.features else ds
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2840, in __iter__
                  for key, example in ex_iterable:
                                      ^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2373, in __iter__
                  for key, pa_table in self._iter_arrow():
                                       ~~~~~~~~~~~~~~~~^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2398, in _iter_arrow
                  for key, pa_table in self.ex_iterable._iter_arrow():
                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 536, in _iter_arrow
                  for key, pa_table in iterator:
                                       ^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 419, in _iter_arrow
                  for key, pa_table in self.generate_tables_fn(**gen_kwags):
                                       ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/parquet/parquet.py", line 220, in _generate_tables
                  yield Key(file_idx, batch_idx), self._cast_table(pa_table)
                                                  ~~~~~~~~~~~~~~~~^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/parquet/parquet.py", line 156, in _cast_table
                  pa_table = table_cast(pa_table, self.info.features.arrow_schema)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2378, in table_cast
                  return cast_table_to_schema(table, schema)
                File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2306, in cast_table_to_schema
                  raise CastError(
                  ...<3 lines>...
                  )
              datasets.table.CastError: Couldn't cast
              source: large_string
              external_id: large_string
              snapshot_date: date32[day]
              indicator: large_string
              measure1: large_string
              measure2: large_string
              value: double
              units: large_string
              underlying_source: large_string
              raw_record: large_string
              ingested_at: timestamp[us, tz=UTC]
              -- schema metadata --
              pandas: '{"index_columns": [], "column_indexes": [], "columns": [{"name":' + 1391
              to
              {'source': Value('large_string'), 'snapshot_date': Value('date32'), 'region': Value('large_string'), 'week_number': Value('int64'), 'year': Value('int64'), 'category': Value('large_string'), 'this_week_cars': Value('int64'), 'this_week_yoy_pct': Value('float64'), 'ytd_cars': Value('int64'), 'ytd_avg_week_cars': Value('int64'), 'ytd_yoy_pct': Value('float64'), 'raw_record': Value('large_string'), 'ingested_at': Value('timestamp[us, tz=UTC]')}
              because column names don't match

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

Freight Rail Data Pipeline — Snapshot

Rail carloadings, rail service metrics, and ocean container freight rate data.

Data Sources

Table Rows Description
aar_weekly_traffic 52
freight_indicators 25,632
motor_carrier_census 2,085,534
rail_carloadings 199,286
rail_eurostat_freight 1,329
rail_safety_incidents 476,074
rail_service_metrics 1,553,679
rail_tariff_rates 6,802
transborder_freight 27,015,354
transborder_legacy_1993_2006 13,719,859
waybill_shipments 20,105,108

Usage

from datasets import load_dataset

ds = load_dataset("ZanderL1337/freight-rail-data-pipeline", trust_remote_code=True)
df = ds["aar_weekly_traffic"].to_pandas()

Or load individual parquet files directly:

import pandas as pd

df = pd.read_parquet("path/to/parquet/file.parquet")

Engineering & data quality

  • 140 tests at 76% line coverage, run on every push/PR via GitHub Actions (CI badge on the repo). Source adapters are tested against recorded fixtures — including the AAR weekly press-release PDF parser — so a source-format regression shows up in CI instead of silently landing as a malformed table.
  • Ingest-time dedup: reruns against the same partition overwrite the file, but a history fetch that runs on multiple ingestion dates would otherwise duplicate every record. Rows are deduplicated on record identity (all columns except ingested_at), keeping the newest ingest.

Build Info

License

CC BY 4.0 — data sourced from public APIs (USDA AgTransport, Freightos FBX).

Downloads last month
146