From bb81607bf3afd987b5d28ad716ff31f55f7c91cc Mon Sep 17 00:00:00 2001 From: Nils Lehmann Date: Thu, 29 Jun 2023 13:55:01 +0200 Subject: [PATCH 1/2] update hf links --- torchgeo/datasets/usavars.py | 33 +++++++++++---------------------- 1 file changed, 11 insertions(+), 22 deletions(-) diff --git a/torchgeo/datasets/usavars.py b/torchgeo/datasets/usavars.py index 43369dfdcab..638e3cbb4ae 100644 --- a/torchgeo/datasets/usavars.py +++ b/torchgeo/datasets/usavars.py @@ -48,45 +48,34 @@ class USAVars(NonGeoDataset): .. versionadded:: 0.3 """ - url_prefix = ( - "https://files.codeocean.com/files/verified/" - + "fa908bbc-11f9-4421-8bd3-72a4bf00427f_v2.0/data/int/applications" - ) - pop_csv_suffix = "CONTUS_16_640_POP_100000_0.csv?download" - uar_csv_suffix = "CONTUS_16_640_UAR_100000_0.csv?download" - - data_url = "https://mosaiks.blob.core.windows.net/datasets/uar.zip" + data_url = "https://huggingface.co/datasets/torchgeo/USAVars/resolve/main/{}" dirname = "uar" md5 = "677e89fd20e5dd0fe4d29b61827c2456" label_urls = { - "housing": f"{url_prefix}/housing/outcomes_sampled_housing_{pop_csv_suffix}", - "income": f"{url_prefix}/income/outcomes_sampled_income_{pop_csv_suffix}", - "roads": f"{url_prefix}/roads/outcomes_sampled_roads_{pop_csv_suffix}", - "nightlights": f"{url_prefix}/nightlights/" - + f"outcomes_sampled_nightlights_{pop_csv_suffix}", - "population": f"{url_prefix}/population/" - + f"outcomes_sampled_population_{uar_csv_suffix}", - "elevation": f"{url_prefix}/elevation/" - + f"outcomes_sampled_elevation_{uar_csv_suffix}", - "treecover": f"{url_prefix}/treecover/" - + f"outcomes_sampled_treecover_{uar_csv_suffix}", + "housing": data_url.format("housing.csv"), + "income": data_url.format("income.csv"), + "roads": data_url.format("roads.csv"), + "nightlights": data_url.format("nightlights.csv"), + "population": data_url.format("population.csv"), + "elevation": data_url.format("elevation.csv"), + "treecover": data_url.format("treecover.csv"), } split_metadata = { "train": { - "url": "https://mosaiks.blob.core.windows.net/datasets/train_split.txt", + "url": data_url.format("train_split.txt"), "filename": "train_split.txt", "md5": "3f58fffbf5fe177611112550297200e7", }, "val": { - "url": "https://mosaiks.blob.core.windows.net/datasets/val_split.txt", + "url": data_url.format("val_split.txt"), "filename": "val_split.txt", "md5": "bca7183b132b919dec0fc24fb11662a0", }, "test": { - "url": "https://mosaiks.blob.core.windows.net/datasets/test_split.txt", + "url": data_url.format("test_split.txt"), "filename": "test_split.txt", "md5": "97bb36bc003ae0bf556a8d6e8f77141a", }, From 40388b132d46d463216a394e772efdaf18c363b0 Mon Sep 17 00:00:00 2001 From: Nils Lehmann Date: Tue, 11 Jul 2023 15:49:45 +0200 Subject: [PATCH 2/2] update hf link --- torchgeo/datasets/usavars.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torchgeo/datasets/usavars.py b/torchgeo/datasets/usavars.py index 638e3cbb4ae..0361fd85b36 100644 --- a/torchgeo/datasets/usavars.py +++ b/torchgeo/datasets/usavars.py @@ -48,7 +48,7 @@ class USAVars(NonGeoDataset): .. versionadded:: 0.3 """ - data_url = "https://huggingface.co/datasets/torchgeo/USAVars/resolve/main/{}" + data_url = "https://huggingface.co/datasets/torchgeo/usavars/resolve/main/{}" dirname = "uar" md5 = "677e89fd20e5dd0fe4d29b61827c2456"