The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
Error code: DatasetGenerationCastError
Exception: DatasetGenerationCastError
Message: An error occurred while generating the dataset
All the data files must have the same columns, but at some point there are 1 new columns ({'quarter'}) and 2 missing columns ({'year', 'age_group'}).
This happened while the csv dataset builder was generating data using
hf://datasets/who-is-tyler-durden/thailand-road-traffic-injury-aggregates-2018/bkk_quarter_2018.csv (at revision a09de275103bdbbe36b626bdcf1208bfbc00bc5c)
Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)
Traceback: Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1831, in _prepare_split_single
writer.write_table(table)
File "/usr/local/lib/python3.12/site-packages/datasets/arrow_writer.py", line 714, in write_table
pa_table = table_cast(pa_table, self._schema)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2272, in table_cast
return cast_table_to_schema(table, schema)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2218, in cast_table_to_schema
raise CastError(
datasets.table.CastError: Couldn't cast
quarter: string
cases: int64
-- schema metadata --
pandas: '{"index_columns": [{"kind": "range", "name": null, "start": 0, "' + 480
to
{'age_group': Value('string'), 'year': Value('int64'), 'cases': Value('int64')}
because column names don't match
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1455, in compute_config_parquet_and_info_response
parquet_operations = convert_to_parquet(builder)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1054, in convert_to_parquet
builder.download_and_prepare(
File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 894, in download_and_prepare
self._download_and_prepare(
File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 970, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1702, in _prepare_split
for job_id, done, content in self._prepare_split_single(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/builder.py", line 1833, in _prepare_split_single
raise DatasetGenerationCastError.from_cast_error(
datasets.exceptions.DatasetGenerationCastError: An error occurred while generating the dataset
All the data files must have the same columns, but at some point there are 1 new columns ({'quarter'}) and 2 missing columns ({'year', 'age_group'}).
This happened while the csv dataset builder was generating data using
hf://datasets/who-is-tyler-durden/thailand-road-traffic-injury-aggregates-2018/bkk_quarter_2018.csv (at revision a09de275103bdbbe36b626bdcf1208bfbc00bc5c)
Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)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.
age_group string | year int64 | cases int64 |
|---|---|---|
0-14 | 2,018 | 14,224 |
15-24 | 2,018 | 33,612 |
25-44 | 2,018 | 31,788 |
45-64 | 2,018 | 22,711 |
65+ | 2,018 | 7,465 |
null | 2,018 | 155 |
null | null | 467 |
null | null | 417 |
null | null | 381 |
null | null | 872 |
null | null | 471 |
null | null | 387 |
null | null | 279 |
null | null | 177 |
null | null | 143 |
null | null | 83 |
null | null | 76 |
null | null | 63 |
null | null | 56 |
null | null | 33 |
null | null | 27 |
null | null | 27 |
null | null | 23 |
null | null | 22 |
null | null | 17 |
null | null | 16 |
null | null | 15 |
null | null | 15 |
null | null | 14 |
null | null | 14 |
null | 2,018 | 109,955 |
null | null | 5,514 |
null | null | 2,415 |
null | null | 2,275 |
null | null | 1,715 |
null | null | 1,296 |
null | null | 1,499 |
null | null | 2,374 |
null | null | 5,580 |
null | null | 5,546 |
null | null | 4,221 |
null | null | 4,427 |
null | null | 4,229 |
null | null | 4,911 |
null | null | 4,468 |
null | null | 4,515 |
null | null | 5,564 |
null | null | 7,465 |
null | null | 8,808 |
null | null | 8,285 |
null | null | 7,560 |
null | null | 5,937 |
null | null | 4,580 |
null | null | 3,706 |
null | null | 3,065 |
null | 2,018 | 2,137 |
null | null | 29,554 |
null | null | 26,656 |
null | null | 26,441 |
null | null | 27,304 |
null | 2,018 | 1,799 |
null | 2,018 | 2,137 |
null | 2,018 | 186 |
null | 2,018 | 8,459 |
null | 2,018 | 166 |
null | 2,018 | 829 |
null | 2,018 | 3,819 |
null | 2,018 | 584 |
null | 2,018 | 262 |
null | 2,018 | 1,609 |
null | 2,018 | 1,639 |
null | 2,018 | 127 |
null | 2,018 | 1,245 |
null | 2,018 | 2,880 |
null | 2,018 | 1,462 |
null | 2,018 | 2,562 |
null | 2,018 | 2,418 |
null | 2,018 | 399 |
null | 2,018 | 500 |
null | 2,018 | 993 |
null | 2,018 | 761 |
null | 2,018 | 1 |
null | 2,018 | 1,215 |
null | 2,018 | 309 |
null | 2,018 | 90 |
null | 2,018 | 63 |
null | 2,018 | 1,763 |
null | 2,018 | 22 |
null | 2,018 | 62 |
null | 2,018 | 1,858 |
null | 2,018 | 235 |
null | 2,018 | 2,190 |
null | 2,018 | 1,033 |
null | 2,018 | 1,233 |
null | 2,018 | 292 |
null | 2,018 | 2,099 |
null | 2,018 | 3,999 |
null | 2,018 | 343 |
null | 2,018 | 3,662 |
null | 2,018 | 1,891 |
Thailand Road-Traffic Injury Aggregates (2018)
Canonical dataset page (EN/TH): https://bangkokfamilylawyer.com/datasets-injury-th/
DOI (this version): https://doi.org/10.5281/zenodo.17538573
Concept DOI (latest): https://doi.org/10.5281/zenodo.17538574
Author: Jean Maurice Cecilia Menzel
Publisher: AppDevBangkok / UdonLaw
License: CC BY 4.0
This repository provides aggregated indicators derived from Thailand’s official Injury Surveillance data (Department of Disease Control, Ministry of Public Health) for calendar year 2018.
All outputs are privacy-preserving aggregates; individual-level records are not included.
Contents
Key CSV files (2018 slice):
province_2018.csv— Cases by province.bkk_quarter_2018.csv— Bangkok cases by quarter.age_bins_2018.csv— Cases by age group.sex_2018.csv— Cases by sex.mode_mix_bkk_2018.csv— Mode / road-user mix for Bangkok.top10_provinces_2018.csv— Top 10 provinces by case count.bkk_top_amphoe_2018.csv— Leading Bangkok districts.qa_year_counts_2018.csv— Year-level row counts (QA).qa_coverage_province_2018.csv— Coverage / completeness indicators.qa_summary.json— Human-readable QA summary.
File names may be extended as new QA tables or visualizations are added.
Source Data
Source dataset (not redistributed here):
- Injury Surveillance – DDC
Injury Prevention Division, Department of Disease Control, Ministry of Public Health, Thailand.
Catalog: https://data.go.th/en/dataset/injury-surveillance
The original dataset remains under its own terms and conditions. This repository only provides derived aggregates.
Methodology (summary)
- Filtered to events in 2018.
- Robust date parsing with support for Thai formats and Buddhist Era → Gregorian conversion.
- Records with invalid or missing core fields are excluded from aggregates.
- Aggregations computed by:
- Province and (for Bangkok) district
- Quarter (Q1–Q4)
- Age groups
- Sex
- Selected mode / road-user categories
- Small cells may be combined or omitted to reduce re-identification risk.
For full details, see the canonical documentation at:
How to use
Example (Python):
import pandas as pd
from datasets import load_dataset
ds = load_dataset(
"appdevbangkok/thailand-road-traffic-injury-aggregates-2018",
split="train"
)
# or load specific CSVs directly via raw URLs if preferred
- Downloads last month
- 37