Datasets:
Upload folder using huggingface_hub
Browse files- LICENSE +11 -0
- README.md +59 -3
- data/train.parquet +3 -0
- loader.py +36 -0
- schema.json +53 -0
LICENSE
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
|
| 2 |
+
|
| 3 |
+
The person who associated a work with this deed has dedicated the work to the
|
| 4 |
+
public domain by waiving all of his or her rights to the work worldwide under
|
| 5 |
+
copyright law, including all related and neighboring rights, to the extent
|
| 6 |
+
allowed by law.
|
| 7 |
+
|
| 8 |
+
You can copy, modify, distribute and perform the work, even for commercial
|
| 9 |
+
purposes, all without asking permission.
|
| 10 |
+
|
| 11 |
+
For more information: https://creativecommons.org/publicdomain/zero/1.0/
|
README.md
CHANGED
|
@@ -1,3 +1,59 @@
|
|
| 1 |
-
---
|
| 2 |
-
license:
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc0-1.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- tabular-classification
|
| 5 |
+
size_categories:
|
| 6 |
+
- 1K<n<10K
|
| 7 |
+
---
|
| 8 |
+
|
| 9 |
+
# Civil Engineering Longevity
|
| 10 |
+
|
| 11 |
+
Infrastructure durability data for civil engineering.
|
| 12 |
+
|
| 13 |
+
## Usage
|
| 14 |
+
|
| 15 |
+
```python
|
| 16 |
+
from datasets import load_dataset
|
| 17 |
+
|
| 18 |
+
dataset = load_dataset("infra-durability-proj/civil-engineering-longevity")
|
| 19 |
+
df = dataset["train"].to_pandas()
|
| 20 |
+
```
|
| 21 |
+
|
| 22 |
+
Or use the provided loader:
|
| 23 |
+
|
| 24 |
+
```python
|
| 25 |
+
from loader import load_data
|
| 26 |
+
|
| 27 |
+
df = load_data()
|
| 28 |
+
```
|
| 29 |
+
|
| 30 |
+
## Schema
|
| 31 |
+
|
| 32 |
+
### Metrics
|
| 33 |
+
|
| 34 |
+
| Column | Type | Description |
|
| 35 |
+
|--------|------|-------------|
|
| 36 |
+
| redundancy_factor | float | Normalized metric |
|
| 37 |
+
| load_distribution | float | Normalized metric |
|
| 38 |
+
| maintenance_margin | float | Normalized metric |
|
| 39 |
+
| failure_resistance | float | Normalized metric |
|
| 40 |
+
|
| 41 |
+
### Categorical Variables
|
| 42 |
+
|
| 43 |
+
| Column | Type | Description |
|
| 44 |
+
|--------|------|-------------|
|
| 45 |
+
| infrastructure_type | string | Categorical variable |
|
| 46 |
+
| age_category | string | Categorical variable |
|
| 47 |
+
|
| 48 |
+
## Statistics
|
| 49 |
+
|
| 50 |
+
- **Rows**: 1000
|
| 51 |
+
- **Columns**: 6
|
| 52 |
+
|
| 53 |
+
## License
|
| 54 |
+
|
| 55 |
+
CC0 1.0 Universal (Public Domain)
|
| 56 |
+
|
| 57 |
+
---
|
| 58 |
+
|
| 59 |
+
*Note: Steel remembers the stress it was never given time to release.*
|
data/train.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2e415dfda56cab3124ab451c1a1c137b0b5e540a255824ab18d9ee272ded32ce
|
| 3 |
+
size 41602
|
loader.py
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Data loader for civil-engineering-longevity
|
| 3 |
+
"""
|
| 4 |
+
|
| 5 |
+
import pandas as pd
|
| 6 |
+
from pathlib import Path
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
def load_data(split: str = "train") -> pd.DataFrame:
|
| 10 |
+
"""
|
| 11 |
+
Load the dataset.
|
| 12 |
+
|
| 13 |
+
Args:
|
| 14 |
+
split: Data split ("train" by default)
|
| 15 |
+
|
| 16 |
+
Returns:
|
| 17 |
+
DataFrame with the loaded data
|
| 18 |
+
"""
|
| 19 |
+
data_dir = Path(__file__).parent / "data"
|
| 20 |
+
parquet_path = data_dir / f"{split}.parquet"
|
| 21 |
+
|
| 22 |
+
if not parquet_path.exists():
|
| 23 |
+
raise FileNotFoundError(f"Data file not found: {parquet_path}")
|
| 24 |
+
|
| 25 |
+
return pd.read_parquet(parquet_path)
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
def get_columns() -> list:
|
| 29 |
+
"""Return list of column names."""
|
| 30 |
+
return ['redundancy_factor', 'load_distribution', 'maintenance_margin', 'failure_resistance']
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
if __name__ == "__main__":
|
| 34 |
+
df = load_data()
|
| 35 |
+
print(f"Loaded {len(df)} rows")
|
| 36 |
+
print(df.head())
|
schema.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"schema_version": "1.0",
|
| 3 |
+
"columns": {
|
| 4 |
+
"redundancy_factor": {
|
| 5 |
+
"type": "float",
|
| 6 |
+
"range": [
|
| 7 |
+
0.016359409045936343,
|
| 8 |
+
0.9962302176480341
|
| 9 |
+
]
|
| 10 |
+
},
|
| 11 |
+
"load_distribution": {
|
| 12 |
+
"type": "float",
|
| 13 |
+
"range": [
|
| 14 |
+
0.010296916139509744,
|
| 15 |
+
0.9683807593591569
|
| 16 |
+
]
|
| 17 |
+
},
|
| 18 |
+
"maintenance_margin": {
|
| 19 |
+
"type": "float",
|
| 20 |
+
"range": [
|
| 21 |
+
0.03929015981000444,
|
| 22 |
+
0.976315145247878
|
| 23 |
+
]
|
| 24 |
+
},
|
| 25 |
+
"failure_resistance": {
|
| 26 |
+
"type": "float",
|
| 27 |
+
"range": [
|
| 28 |
+
0.0,
|
| 29 |
+
0.579552762553441
|
| 30 |
+
]
|
| 31 |
+
},
|
| 32 |
+
"infrastructure_type": {
|
| 33 |
+
"type": "string",
|
| 34 |
+
"values": [
|
| 35 |
+
"dam",
|
| 36 |
+
"road",
|
| 37 |
+
"power_grid",
|
| 38 |
+
"water_system",
|
| 39 |
+
"bridge"
|
| 40 |
+
]
|
| 41 |
+
},
|
| 42 |
+
"age_category": {
|
| 43 |
+
"type": "string",
|
| 44 |
+
"values": [
|
| 45 |
+
"legacy",
|
| 46 |
+
"mature",
|
| 47 |
+
"new",
|
| 48 |
+
"aging"
|
| 49 |
+
]
|
| 50 |
+
}
|
| 51 |
+
},
|
| 52 |
+
"note": "Normalized metrics for cross-domain analysis"
|
| 53 |
+
}
|