Datasets:
Simplify dataset structure for auto-viewer
Browse files- Renamed to train.parquet for auto-detection
- Removed custom loading script
- Removed CSV to avoid confusion
- Now HF should auto-detect the 95,674 records
- abscorrespondance.py +0 -70
- data/train.parquet +0 -3
- dataset_info.json +0 -64
- master_correspondence_table.csv +0 -3
- master_correspondence_table.parquet → train.parquet +0 -0
abscorrespondance.py
DELETED
|
@@ -1,70 +0,0 @@
|
|
| 1 |
-
"""Australian Geographic Correspondence Table dataset."""
|
| 2 |
-
|
| 3 |
-
import datasets
|
| 4 |
-
import pandas as pd
|
| 5 |
-
|
| 6 |
-
_DESCRIPTION = """
|
| 7 |
-
A comprehensive correspondence table linking Australian geographic hierarchies (POA ↔ LGA ↔ SA2 ↔ Branch Catchments)
|
| 8 |
-
built using real Australian Bureau of Statistics (ABS) data. Contains 95,674 records with spatial intersection weights.
|
| 9 |
-
"""
|
| 10 |
-
|
| 11 |
-
_HOMEPAGE = "https://github.com/Mrassimo/HCFcorrtable"
|
| 12 |
-
|
| 13 |
-
_LICENSE = "MIT"
|
| 14 |
-
|
| 15 |
-
_URLS = {
|
| 16 |
-
"train": "master_correspondence_table.parquet",
|
| 17 |
-
}
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
class ABSCorrespondance(datasets.GeneratorBasedBuilder):
|
| 21 |
-
"""Australian Geographic Correspondence Table dataset."""
|
| 22 |
-
|
| 23 |
-
VERSION = datasets.Version("1.0.0")
|
| 24 |
-
|
| 25 |
-
def _info(self):
|
| 26 |
-
features = datasets.Features({
|
| 27 |
-
"poa_code": datasets.Value("string"),
|
| 28 |
-
"poa_name": datasets.Value("int64"),
|
| 29 |
-
"lga_code": datasets.Value("string"),
|
| 30 |
-
"lga_name": datasets.Value("string"),
|
| 31 |
-
"sa2_code": datasets.Value("string"),
|
| 32 |
-
"sa2_name": datasets.Value("string"),
|
| 33 |
-
"branch_id": datasets.Value("string"),
|
| 34 |
-
"branch_name": datasets.Value("string"),
|
| 35 |
-
"branch_type": datasets.Value("string"),
|
| 36 |
-
"branch_lat": datasets.Value("float64"),
|
| 37 |
-
"branch_long": datasets.Value("float64"),
|
| 38 |
-
"poa_to_lga_weight": datasets.Value("float64"),
|
| 39 |
-
"lga_to_sa2_weight": datasets.Value("float64"),
|
| 40 |
-
"catchment_overlap_pct": datasets.Value("float64"),
|
| 41 |
-
"distance_to_branch_km": datasets.Value("float64"),
|
| 42 |
-
"record_type": datasets.Value("string"),
|
| 43 |
-
})
|
| 44 |
-
|
| 45 |
-
return datasets.DatasetInfo(
|
| 46 |
-
description=_DESCRIPTION,
|
| 47 |
-
features=features,
|
| 48 |
-
homepage=_HOMEPAGE,
|
| 49 |
-
license=_LICENSE,
|
| 50 |
-
)
|
| 51 |
-
|
| 52 |
-
def _split_generators(self, dl_manager):
|
| 53 |
-
urls = _URLS
|
| 54 |
-
data_path = dl_manager.download(urls["train"])
|
| 55 |
-
|
| 56 |
-
return [
|
| 57 |
-
datasets.SplitGenerator(
|
| 58 |
-
name=datasets.Split.TRAIN,
|
| 59 |
-
gen_kwargs={
|
| 60 |
-
"filepath": data_path,
|
| 61 |
-
},
|
| 62 |
-
),
|
| 63 |
-
]
|
| 64 |
-
|
| 65 |
-
def _generate_examples(self, filepath):
|
| 66 |
-
"""Yields examples from the dataset."""
|
| 67 |
-
df = pd.read_parquet(filepath)
|
| 68 |
-
|
| 69 |
-
for idx, row in df.iterrows():
|
| 70 |
-
yield idx, row.to_dict()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data/train.parquet
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:f6f2eb58ceba119bc399dbb758728f59bc17d9ccde1b636a83156923aa48e0db
|
| 3 |
-
size 277194
|
|
|
|
|
|
|
|
|
|
|
|
dataset_info.json
DELETED
|
@@ -1,64 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"dataset_name": "abscorrespondance",
|
| 3 |
-
"dataset_size": 95674,
|
| 4 |
-
"features": {
|
| 5 |
-
"poa_code": {
|
| 6 |
-
"dtype": "int64"
|
| 7 |
-
},
|
| 8 |
-
"poa_name": {
|
| 9 |
-
"dtype": "int64"
|
| 10 |
-
},
|
| 11 |
-
"lga_code": {
|
| 12 |
-
"dtype": "int64"
|
| 13 |
-
},
|
| 14 |
-
"lga_name": {
|
| 15 |
-
"dtype": "object"
|
| 16 |
-
},
|
| 17 |
-
"sa2_code": {
|
| 18 |
-
"dtype": "int64"
|
| 19 |
-
},
|
| 20 |
-
"sa2_name": {
|
| 21 |
-
"dtype": "object"
|
| 22 |
-
},
|
| 23 |
-
"branch_id": {
|
| 24 |
-
"dtype": "object"
|
| 25 |
-
},
|
| 26 |
-
"branch_name": {
|
| 27 |
-
"dtype": "object"
|
| 28 |
-
},
|
| 29 |
-
"branch_type": {
|
| 30 |
-
"dtype": "object"
|
| 31 |
-
},
|
| 32 |
-
"branch_lat": {
|
| 33 |
-
"dtype": "float64"
|
| 34 |
-
},
|
| 35 |
-
"branch_long": {
|
| 36 |
-
"dtype": "float64"
|
| 37 |
-
},
|
| 38 |
-
"poa_to_lga_weight": {
|
| 39 |
-
"dtype": "float64"
|
| 40 |
-
},
|
| 41 |
-
"lga_to_sa2_weight": {
|
| 42 |
-
"dtype": "float64"
|
| 43 |
-
},
|
| 44 |
-
"catchment_overlap_pct": {
|
| 45 |
-
"dtype": "float64"
|
| 46 |
-
},
|
| 47 |
-
"distance_to_branch_km": {
|
| 48 |
-
"dtype": "float64"
|
| 49 |
-
},
|
| 50 |
-
"record_type": {
|
| 51 |
-
"dtype": "object"
|
| 52 |
-
}
|
| 53 |
-
},
|
| 54 |
-
"splits": {
|
| 55 |
-
"train": {
|
| 56 |
-
"name": "train",
|
| 57 |
-
"num_examples": 95674,
|
| 58 |
-
"dataset_name": "abscorrespondance",
|
| 59 |
-
"data_files": [
|
| 60 |
-
"data/train.parquet"
|
| 61 |
-
]
|
| 62 |
-
}
|
| 63 |
-
}
|
| 64 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
master_correspondence_table.csv
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:6c22152beaf65355242e7c4cb970d0568f06eba33e92c1f317f36a72a7642bf3
|
| 3 |
-
size 11559991
|
|
|
|
|
|
|
|
|
|
|
|
master_correspondence_table.parquet → train.parquet
RENAMED
|
File without changes
|