Update NC_Crime.py
Browse files- NC_Crime.py +5 -5
NC_Crime.py
CHANGED
@@ -83,9 +83,9 @@ class NCCrimeDataset(datasets.GeneratorBasedBuilder):
|
|
83 |
|
84 |
def _split_generators(self, dl_manager: datasets.DownloadManager) -> List[datasets.SplitGenerator]:
|
85 |
# Use the raw GitHub link to download the CSV file
|
86 |
-
|
87 |
-
|
88 |
-
chapel_hill_path = dl_manager.download_and_extract("https://drive.google.com/uc?export=download&id=19cZzyedCLUtQt9Ko4bcOixWIJHBn9CfI")
|
89 |
# raleigh_path = dl_manager.download_and_extract("https://drive.google.com/uc?export=download&id=1SZi4e01TxwuDDb6k9EU_7i-qTP1Xq2sm")
|
90 |
# Cary
|
91 |
# "https://data.townofcary.org/api/explore/v2.1/catalog/datasets/cpd-incidents/exports/csv?lang=en&timezone=US%2FEastern&use_labels=true&delimiter=%2C",
|
@@ -99,11 +99,11 @@ class NCCrimeDataset(datasets.GeneratorBasedBuilder):
|
|
99 |
cary_df = self._preprocess_cary(cary_path)
|
100 |
durham_df = self._preprocess_durham(durham_path)
|
101 |
# raleigh_df = self._preprocess_raleigh(raleigh_path)
|
102 |
-
chapel_hill_df = self._preprocess_chapel_hill(chapel_hill_path)
|
103 |
|
104 |
# combined_df = pd.concat([cary_df, durham_df, raleigh_df, chapel_hill_df], ignore_index=True)
|
105 |
|
106 |
-
combined_df = pd.concat([cary_df, durham_df
|
107 |
|
108 |
|
109 |
combined_file_path = os.path.join(dl_manager.download_dir, "combined_dataset.csv")
|
|
|
83 |
|
84 |
def _split_generators(self, dl_manager: datasets.DownloadManager) -> List[datasets.SplitGenerator]:
|
85 |
# Use the raw GitHub link to download the CSV file
|
86 |
+
cary_path = dl_manager.download_and_extract("https://data.townofcary.org/api/explore/v2.1/catalog/datasets/cpd-incidents/exports/csv?lang=en&timezone=US%2FEastern&use_labels=true&delimiter=%2C")
|
87 |
+
durham_path = dl_manager.download_and_extract("https://www.arcgis.com/sharing/rest/content/items/7132216432df4957830593359b0c4030/data")
|
88 |
+
# chapel_hill_path = dl_manager.download_and_extract("https://drive.google.com/uc?export=download&id=19cZzyedCLUtQt9Ko4bcOixWIJHBn9CfI")
|
89 |
# raleigh_path = dl_manager.download_and_extract("https://drive.google.com/uc?export=download&id=1SZi4e01TxwuDDb6k9EU_7i-qTP1Xq2sm")
|
90 |
# Cary
|
91 |
# "https://data.townofcary.org/api/explore/v2.1/catalog/datasets/cpd-incidents/exports/csv?lang=en&timezone=US%2FEastern&use_labels=true&delimiter=%2C",
|
|
|
99 |
cary_df = self._preprocess_cary(cary_path)
|
100 |
durham_df = self._preprocess_durham(durham_path)
|
101 |
# raleigh_df = self._preprocess_raleigh(raleigh_path)
|
102 |
+
# chapel_hill_df = self._preprocess_chapel_hill(chapel_hill_path)
|
103 |
|
104 |
# combined_df = pd.concat([cary_df, durham_df, raleigh_df, chapel_hill_df], ignore_index=True)
|
105 |
|
106 |
+
combined_df = pd.concat([cary_df, durham_df], ignore_index=True)
|
107 |
|
108 |
|
109 |
combined_file_path = os.path.join(dl_manager.download_dir, "combined_dataset.csv")
|