junaid008 commited on
Commit
a55ff16
·
verified ·
1 Parent(s): c994f76

pakdata 0.1.1: pak_weather

Browse files
Files changed (2) hide show
  1. README.md +19 -8
  2. csv/pak_weather.csv +0 -0
README.md CHANGED
@@ -38,20 +38,31 @@ Every value comes from the named public source below; nothing is synthetic or AI
38
  ## Load it
39
 
40
  ```python
41
- # Hugging Face datasets
 
 
 
 
42
  from datasets import load_dataset
43
  ds = load_dataset("junaid008/pak_weather", split="train")
44
- df = ds.to_pandas()
 
 
 
 
 
 
45
 
46
- # pandas only
47
- import pandas as pd
48
- df = pd.read_parquet("hf://datasets/junaid008/pak_weather/data/train.parquet")
49
 
50
- # pakdata (scikit-learn style, works offline) pip install pakdata
51
- from pakdata import load_pak_weather
52
- X, y = load_pak_weather(return_X_y=True)
53
  ```
54
 
 
 
 
55
  **Features used by `pakdata`:** `city`, `province`, `latitude`, `longitude`, `elevation_m`, `year`, `month`, `day_of_year`, `precip_mm`, `rain_mm`, `precip_hours_h`, `wind_speed_max_kmh`, `wind_gusts_max_kmh`, `wind_dir_dominant_deg`, `shortwave_radiation_mj_m2`, `sunshine_duration_h`, `cloud_cover_mean_pct`, `rel_humidity_mean_pct`, `surface_pressure_mean_hpa`
56
 
57
  **Kept in the table but not used as features** (ids, raw dates, or columns that would leak the target): `date`, `grid_latitude`, `grid_longitude`, `temp_min_c`, `temp_mean_c`, `apparent_temp_max_c`, `et0_mm`
 
38
  ## Load it
39
 
40
  ```python
41
+ # pakdata (scikit-learn style, works offline) pip install pakdata
42
+ from pakdata import load_pak_weather
43
+ X, y = load_pak_weather(return_X_y=True)
44
+
45
+ # Hugging Face datasets (also gives PyTorch / TensorFlow / JAX formats)
46
  from datasets import load_dataset
47
  ds = load_dataset("junaid008/pak_weather", split="train")
48
+ torch_ds = ds.with_format("torch")
49
+
50
+ # pandas / Polars / DuckDB, straight from the Hub
51
+ import pandas as pd; df = pd.read_parquet("hf://datasets/junaid008/pak_weather/data/train.parquet")
52
+ import polars as pl; df = pl.read_parquet("hf://datasets/junaid008/pak_weather/data/train.parquet")
53
+ import duckdb; duckdb.sql("SELECT * FROM 'hf://datasets/junaid008/pak_weather/data/train.parquet'")
54
+ ```
55
 
56
+ **Plain CSV (Excel, R, Julia, MATLAB, SPSS, anything):**
57
+ `https://huggingface.co/datasets/junaid008/pak_weather/resolve/main/csv/pak_weather.csv`
 
58
 
59
+ ```r
60
+ df <- read.csv("https://huggingface.co/datasets/junaid008/pak_weather/resolve/main/csv/pak_weather.csv")
 
61
  ```
62
 
63
+ **JSON API (JavaScript, mobile apps, any language):**
64
+ `https://datasets-server.huggingface.co/rows?dataset=junaid008/pak_weather&config=default&split=train&offset=0&length=100`
65
+
66
  **Features used by `pakdata`:** `city`, `province`, `latitude`, `longitude`, `elevation_m`, `year`, `month`, `day_of_year`, `precip_mm`, `rain_mm`, `precip_hours_h`, `wind_speed_max_kmh`, `wind_gusts_max_kmh`, `wind_dir_dominant_deg`, `shortwave_radiation_mj_m2`, `sunshine_duration_h`, `cloud_cover_mean_pct`, `rel_humidity_mean_pct`, `surface_pressure_mean_hpa`
67
 
68
  **Kept in the table but not used as features** (ids, raw dates, or columns that would leak the target): `date`, `grid_latitude`, `grid_longitude`, `temp_min_c`, `temp_mean_c`, `apparent_temp_max_c`, `et0_mm`
csv/pak_weather.csv ADDED
The diff for this file is too large to render. See raw diff