Datchthana commited on
Commit
82152b8
·
verified ·
1 Parent(s): 53a3434

Add Thailand earthquake dataset (earthquake_events, earthquake_reports_raw)

Browse files
.gitattributes CHANGED
@@ -58,3 +58,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
58
  # Video files - compressed
59
  *.mp4 filter=lfs diff=lfs merge=lfs -text
60
  *.webm filter=lfs diff=lfs merge=lfs -text
 
 
58
  # Video files - compressed
59
  *.mp4 filter=lfs diff=lfs merge=lfs -text
60
  *.webm filter=lfs diff=lfs merge=lfs -text
61
+ earthquake_reports_raw.csv filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-4.0
3
+ language:
4
+ - th
5
+ - en
6
+ tags:
7
+ - earthquake
8
+ - seismology
9
+ - thailand
10
+ - geospatial
11
+ pretty_name: Thailand Earthquake Dataset
12
+ size_categories:
13
+ - 1K<n<10K
14
+ configs:
15
+ - config_name: earthquake_events
16
+ data_files:
17
+ - split: train
18
+ path: earthquake_events.csv
19
+ - config_name: earthquake_reports_raw
20
+ data_files:
21
+ - split: train
22
+ path: earthquake_reports_raw.csv
23
+ ---
24
+
25
+ # Thailand Earthquake Dataset
26
+
27
+ Seismic event data from the [Thai Meteorological Department (TMD)](https://data.tmd.go.th/)
28
+ `DailySeismicEvent` API, collected by an Airflow pipeline (the earthquake side
29
+ of the same `Air_Pipeline_2` project as
30
+ [Datchthana/WeatherDatasetThailand](https://huggingface.co/datasets/Datchthana/WeatherDatasetThailand))
31
+ that polls roughly hourly.
32
+
33
+ This is a separate repo from the weather dataset on purpose — it only covers
34
+ earthquakes, no air-quality/weather data.
35
+
36
+ ## Files
37
+
38
+ | File | Rows (as of 2026-08-08) | Description |
39
+ |---|---|---|
40
+ | `earthquake_events.csv` | 923 | Cleaned, deduplicated event list — one row per unique quake, deduped on `(datetime_utc, lat, lon)`. **Recommended table for most uses.** |
41
+ | `earthquake_reports_raw.csv` | 525 | Full raw archive: one row per API poll, each containing the complete JSON `payload` TMD returned at that moment (`DailyEarthquakes` list + response header). Kept for audit/reproducibility. |
42
+
43
+ `earthquake_reports_raw.csv` is much bigger (~180 MB vs ~0.2 MB) than its row
44
+ count suggests: TMD's API returns a rolling window of recent events on every
45
+ call, so consecutive polls re-embed mostly the same events verbatim inside
46
+ the JSON payload. `earthquake_events.csv` is the deduplicated result of
47
+ parsing all of those payloads over time — use that unless you specifically
48
+ need the raw API responses.
49
+
50
+ ## Schema — `earthquake_events.csv`
51
+
52
+ - `datetime_utc` / `datetime_thai` — event time in UTC and Thailand local time
53
+ - `magnitude` — Richter magnitude
54
+ - `depth_km` — focal depth in km
55
+ - `lat` / `lon` — epicenter coordinates
56
+ - `title_th` — original Thai-language title string from TMD
57
+ - `tambon_th` / `amphoe_th` / `province_th` — Thai administrative location
58
+ parsed out of `title_th` (null when the quake is outside Thailand)
59
+ - `location_en` — English location name
60
+ - `is_domestic` — `true` if the event was located within a Thai province
61
+ - `created_at` — when the row was first written to the database
62
+
63
+ ## Schema — `earthquake_reports_raw.csv`
64
+
65
+ - `fetched_at` — when this API poll happened
66
+ - `payload` — the full TMD API JSON response as a string (header + list of
67
+ events as returned, before parsing/cleaning)
68
+
69
+ ## ⚠️ Known data gaps
70
+
71
+ Same pipeline host as the weather dataset, same downtime pattern — mostly
72
+ Windows Update restarts. Checked against `fetched_at` in
73
+ `earthquake_reports_raw.csv` (2026-07-11 to 2026-08-08, ~28 days): 14 gaps
74
+ longer than 1.5h, totaling roughly **6 days** of missed polls. The largest
75
+ gaps line up almost exactly with the ones documented in
76
+ [WeatherDatasetThailand](https://huggingface.co/datasets/Datchthana/WeatherDatasetThailand)
77
+ (same host, same outage):
78
+
79
+ | Gap start | Gap end | Duration | Likely cause |
80
+ |---|---|---|---|
81
+ | 2026-07-15 23:00 | 2026-07-19 11:13 | ~3d 12h | Windows Update restart — pipeline wasn't manually restarted afterward |
82
+ | 2026-07-27 10:00 | 2026-07-29 14:00 | ~2d 4h | Windows Update restart |
83
+ | 2026-08-06 00:00 | 2026-08-06 04:24 | ~4.5h | Windows Update restart |
84
+ | 2026-08-06 14:01 | 2026-08-06 18:00 | ~4h | Windows Update restart |
85
+
86
+ Plus several smaller ~2h gaps (single missed hourly poll) scattered through
87
+ late July/early August, also mostly Windows Update restarts.
88
+
89
+ Unlike the weather pipeline, a short gap here usually **doesn't** lose data —
90
+ TMD's rolling-window report tends to still contain an event on the next
91
+ successful poll. But the 3.5-day gap is long enough that any event whose
92
+ window had already rolled off the API response by the time the pipeline
93
+ came back up is permanently missing from this dataset.
94
+
95
+ ## Source & license
96
+
97
+ Data is sourced from the public TMD `DailySeismicEvent` API. TMD's own data
98
+ catalog ([catalog.tmd.go.th](https://catalog.tmd.go.th/)) lists an "Open Data
99
+ Common" license on its datasets, which is why this repo defaults to
100
+ **CC BY 4.0** (attribution) rather than a software license like Apache 2.0 —
101
+ but I could not pull TMD's exact terms text to confirm the precise clauses,
102
+ so verify against their published terms before relying on this for anything
103
+ commercial.
104
+
105
+ One more caveat worth knowing: the ingestion code calls the API with the
106
+ literal demo credentials (`uid=demo`, `ukey=demokey`) that ship in TMD's own
107
+ docs, not a registered production key. It has worked so far, but there's no
108
+ confirmation these credentials are meant for sustained/redistributed use —
109
+ treat the ongoing availability of this data source as unverified.
110
+
111
+ ## Update cadence
112
+
113
+ The upstream pipeline polls roughly hourly; this snapshot reflects a manual
114
+ export and is not kept in continuous sync.
earthquake_events.csv ADDED
The diff for this file is too large to render. See raw diff
 
earthquake_reports_raw.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ac3fcedc2328c7efe1399882e1e9443398dc1d2707b0045d2e0a79e0f810514b
3
+ size 188066363