Upload folder using huggingface_hub
Browse files
logistics-disruption-archive/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/
|
logistics-disruption-archive/README.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc0-1.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- tabular-classification
|
| 5 |
+
size_categories:
|
| 6 |
+
- 1K<n<10K
|
| 7 |
+
---
|
| 8 |
+
|
| 9 |
+
# Logistics Disruption Archive
|
| 10 |
+
|
| 11 |
+
Supply chain disruption records for logistics research.
|
| 12 |
+
|
| 13 |
+
## Usage
|
| 14 |
+
|
| 15 |
+
```python
|
| 16 |
+
from datasets import load_dataset
|
| 17 |
+
|
| 18 |
+
dataset = load_dataset("scm-resilience-data/logistics-disruption-archive")
|
| 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 |
+
| supplier_diversity | float | Normalized metric |
|
| 37 |
+
| delivery_consistency | float | Normalized metric |
|
| 38 |
+
| inventory_buffer | float | Normalized metric |
|
| 39 |
+
| chain_performance | float | Normalized metric |
|
| 40 |
+
|
| 41 |
+
### Categorical Variables
|
| 42 |
+
|
| 43 |
+
| Column | Type | Description |
|
| 44 |
+
|--------|------|-------------|
|
| 45 |
+
| sector | string | Categorical variable |
|
| 46 |
+
| disruption_type | 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: One thread breaks, the whole tapestry unravels.*
|
logistics-disruption-archive/data/train.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e31389ce577e30a4b649f81824141e998d9c2ba080f10eef0beedf56b7caf8b4
|
| 3 |
+
size 41825
|
logistics-disruption-archive/loader.py
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Data loader for logistics-disruption-archive
|
| 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 ['supplier_diversity', 'delivery_consistency', 'inventory_buffer', 'chain_performance']
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
if __name__ == "__main__":
|
| 34 |
+
df = load_data()
|
| 35 |
+
print(f"Loaded {len(df)} rows")
|
| 36 |
+
print(df.head())
|
logistics-disruption-archive/schema.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"schema_version": "1.0",
|
| 3 |
+
"columns": {
|
| 4 |
+
"supplier_diversity": {
|
| 5 |
+
"type": "float",
|
| 6 |
+
"range": [
|
| 7 |
+
0.01183415048069798,
|
| 8 |
+
0.9803929813534208
|
| 9 |
+
]
|
| 10 |
+
},
|
| 11 |
+
"delivery_consistency": {
|
| 12 |
+
"type": "float",
|
| 13 |
+
"range": [
|
| 14 |
+
0.0047510509637126875,
|
| 15 |
+
0.9570963417027043
|
| 16 |
+
]
|
| 17 |
+
},
|
| 18 |
+
"inventory_buffer": {
|
| 19 |
+
"type": "float",
|
| 20 |
+
"range": [
|
| 21 |
+
0.08795114827260643,
|
| 22 |
+
0.9806550494296679
|
| 23 |
+
]
|
| 24 |
+
},
|
| 25 |
+
"chain_performance": {
|
| 26 |
+
"type": "float",
|
| 27 |
+
"range": [
|
| 28 |
+
0.0,
|
| 29 |
+
0.6020969184712575
|
| 30 |
+
]
|
| 31 |
+
},
|
| 32 |
+
"sector": {
|
| 33 |
+
"type": "string",
|
| 34 |
+
"values": [
|
| 35 |
+
"pharma",
|
| 36 |
+
"automotive",
|
| 37 |
+
"food",
|
| 38 |
+
"textiles",
|
| 39 |
+
"electronics"
|
| 40 |
+
]
|
| 41 |
+
},
|
| 42 |
+
"disruption_type": {
|
| 43 |
+
"type": "string",
|
| 44 |
+
"values": [
|
| 45 |
+
"cyber",
|
| 46 |
+
"none",
|
| 47 |
+
"natural",
|
| 48 |
+
"pandemic",
|
| 49 |
+
"geopolitical"
|
| 50 |
+
]
|
| 51 |
+
}
|
| 52 |
+
},
|
| 53 |
+
"note": "Normalized metrics for cross-domain analysis"
|
| 54 |
+
}
|