Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
920 changes: 920 additions & 0 deletions examples/timeseries/timeseries_traffic_forecasting.ipynb

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions examples/timeseries/timeseries_traffic_forecasting.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,13 @@
"""

url = "https://github.com/VeritasYin/STGCN_IJCAI-18/raw/master/dataset/PeMSD7_Full.zip"
data_dir = keras.utils.get_file(origin=url, extract=True, archive_format="zip")
data_dir = data_dir.rstrip("PeMSD7_Full.zip")
# 1. Download and extract normally
zip_path = keras.utils.get_file(origin=url, extract=True, archive_format="zip")

# 2. FIX: Use os.path.dirname to safely get the folder where it was extracted
data_dir = os.path.dirname(zip_path)

# 3. Construct the paths to the inner files safely
route_distances = pd.read_csv(
os.path.join(data_dir, "PeMSD7_W_228.csv"), header=None
).to_numpy()
Expand Down
Loading