Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,31 +1,92 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
-
|
| 5 |
-
|
| 6 |
-
-
|
| 7 |
-
|
| 8 |
-
-
|
| 9 |
-
|
| 10 |
-
-
|
| 11 |
-
|
| 12 |
-
-
|
| 13 |
-
|
| 14 |
-
-
|
| 15 |
-
|
| 16 |
-
-
|
| 17 |
-
dtype: string
|
| 18 |
-
- name: source
|
| 19 |
-
dtype: string
|
| 20 |
-
splits:
|
| 21 |
-
- name: train
|
| 22 |
-
num_bytes: 13522
|
| 23 |
-
num_examples: 98
|
| 24 |
-
download_size: 5304
|
| 25 |
-
dataset_size: 13522
|
| 26 |
-
configs:
|
| 27 |
-
- config_name: default
|
| 28 |
-
data_files:
|
| 29 |
-
- split: train
|
| 30 |
-
path: data/train-*
|
| 31 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
license: cc-by-4.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
- pt
|
| 6 |
+
- es
|
| 7 |
+
size_categories:
|
| 8 |
+
- n<1K
|
| 9 |
+
tags:
|
| 10 |
+
- public-service
|
| 11 |
+
- government
|
| 12 |
+
- south-america
|
| 13 |
+
- brazil
|
| 14 |
+
- argentina
|
| 15 |
+
- quality-improvement
|
| 16 |
+
- merged
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
---
|
| 18 |
+
|
| 19 |
+
# Merged BR–AR Hourly Public Service Quality
|
| 20 |
+
|
| 21 |
+
Cleaned, merged public-service response dataset for **Brazil (São Paulo state)** and
|
| 22 |
+
**Argentina (Buenos Aires province)**, produced by a South America regional
|
| 23 |
+
government public-service improvement program.
|
| 24 |
+
|
| 25 |
+
- **Rows:** 98 (after cleaning; < 100 as required)
|
| 26 |
+
- **Granularity:** hourly service-call records
|
| 27 |
+
- **Coverage:** 2026-08-11T03:00:00Z → 2026-08-14T01:15:00Z
|
| 28 |
+
|
| 29 |
+
## Sources
|
| 30 |
+
|
| 31 |
+
| Source system | Dataset | Country | Rows (raw) |
|
| 32 |
+
|---|---|---|---|
|
| 33 |
+
| Brazil / São Paulo | [`toolathon123/sao-paulo-service-calls-hourly`](https://huggingface.co/datasets/toolathon123/sao-paulo-service-calls-hourly) | `BR` | 54 |
|
| 34 |
+
| Argentina / Buenos Aires | [`toolathon123/buenos-aires-service-calls-hourly`](https://huggingface.co/datasets/toolathon123/buenos-aires-service-calls-hourly) | `AR` | 48 |
|
| 35 |
+
|
| 36 |
+
Raw merged rows: **102** → final rows: **98**.
|
| 37 |
+
|
| 38 |
+
## Schema
|
| 39 |
+
|
| 40 |
+
| Column | Type | Description |
|
| 41 |
+
|---|---|---|
|
| 42 |
+
| `timestamp` | string | Request time, normalized to UTC ISO 8601 (`YYYY-MM-DDTHH:MM:SSZ`) |
|
| 43 |
+
| `country` | string | `BR` or `AR` |
|
| 44 |
+
| `city` | string | Lowercase, accent-free, spaces → underscores (e.g. `sao_paulo`, `bahia_blanca`) |
|
| 45 |
+
| `service_type` | string | Unified category: `health`, `transport`, `water`, `electricity`, `public_safety`, `other` |
|
| 46 |
+
| `wait_minutes` | int | Wait time in minutes (missing filled with country+service median) |
|
| 47 |
+
| `status` | string | Response status (`UNKNOWN` where missing) |
|
| 48 |
+
| `notes` | string | Free-text note (kept from source, PT/ES) |
|
| 49 |
+
| `source` | string | Provenance dataset id |
|
| 50 |
+
|
| 51 |
+
## Cleaning & standardization steps
|
| 52 |
+
|
| 53 |
+
1. **Load** both sources with `datasets.load_dataset`.
|
| 54 |
+
2. **Merge** preserving record-level integrity (BR rows first, then AR).
|
| 55 |
+
3. **Timestamp unification** — all `timestamp` / `created_at` values converted to UTC
|
| 56 |
+
ISO 8601 (BR timezone `America/Sao_Paulo`, AR timezone `America/Argentina/Buenos_Aires`).
|
| 57 |
+
4. **Country & city standardization** — `country` → `BR`/`AR`; city lowercased,
|
| 58 |
+
accent-stripped (NFKD), spaces → underscores.
|
| 59 |
+
5. **Service-type mapping** — PT/ES taxonomies → `health`/`transport`/`water`/
|
| 60 |
+
`electricity`/`public_safety`/`other`.
|
| 61 |
+
6. **Missing values** — `wait_minutes` filled with the median per (country, service_type);
|
| 62 |
+
`status` filled with `UNKNOWN`.
|
| 63 |
+
7. **Deduplication** — exact duplicates removed, first occurrence kept.
|
| 64 |
+
|
| 65 |
+
## Quality checks
|
| 66 |
+
|
| 67 |
+
| Metric | Value |
|
| 68 |
+
|---|---|
|
| 69 |
+
| Duplicate records removed | 4 |
|
| 70 |
+
| Missing `wait_minutes` filled | 21 |
|
| 71 |
+
| Missing `status` filled | 17 |
|
| 72 |
+
| Missing values filled (total) | 38 |
|
| 73 |
+
| Time-format anomalies (non-dominant raw formats) | 16 |
|
| 74 |
+
| Unparseable timestamps | 0 |
|
| 75 |
+
| Final rows | 98 (< 100) |
|
| 76 |
+
|
| 77 |
+
### Hourly continuity (UTC hour buckets)
|
| 78 |
+
|
| 79 |
+
| Country | Min hour (UTC) | Max hour (UTC) | Hours spanned | Hours with calls | Empty hourly slots |
|
| 80 |
+
|---|---|---|---|---|---|
|
| 81 |
+
| BR | 2026-08-11T04:00Z | 2026-08-14T01:00Z | 70 | 32 | 38 |
|
| 82 |
+
| AR | 2026-08-11T03:00Z | 2026-08-14T00:00Z | 70 | 32 | 38 |
|
| 83 |
+
|
| 84 |
+
Service calls are event-based, so not every hour has a call; gaps are expected and
|
| 85 |
+
reported above for transparency.
|
| 86 |
+
|
| 87 |
+
## Load
|
| 88 |
+
|
| 89 |
+
```python
|
| 90 |
+
from datasets import load_dataset
|
| 91 |
+
ds = load_dataset("toolathon123/merged-br-ar-hourly-public-service-quality", split="train")
|
| 92 |
+
```
|