zwn22 commited on
Commit
5eac06e
1 Parent(s): d26e663

Update NC_Crime.py

Browse files
Files changed (1) hide show
  1. NC_Crime.py +1 -7
NC_Crime.py CHANGED
@@ -13,7 +13,7 @@
13
  # limitations under the License.
14
  # TODO: Address all TODOs and remove all explanatory comments
15
  """TODO: Add a description here."""
16
-
17
 
18
  import csv
19
  import json
@@ -82,7 +82,6 @@ class NCCrimeDataset(datasets.GeneratorBasedBuilder):
82
  def _split_generators(self, dl_manager: datasets.DownloadManager) -> List[datasets.SplitGenerator]:
83
  # Use the raw GitHub link to download the CSV file
84
  downloaded_file_path = dl_manager.download_and_extract(
85
- # "https://raw.githubusercontent.com/zening-wang2023/NC-Crime-Dataset/main/DCCR.csv.zip"
86
  "https://raw.githubusercontent.com/zening-wang2023/NC-Crime-Dataset/main/NC_v1.csv.zip"
87
 
88
  )
@@ -92,11 +91,6 @@ class NCCrimeDataset(datasets.GeneratorBasedBuilder):
92
  datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": unzipped_file_path})
93
  ]
94
 
95
-
96
-
97
-
98
-
99
-
100
  def _generate_examples(self, filepath):
101
  # Read the CSV file
102
  df = pd.read_csv(filepath) ## just for test
 
13
  # limitations under the License.
14
  # TODO: Address all TODOs and remove all explanatory comments
15
  """TODO: Add a description here."""
16
+ # Given the disparate sizes and column naming conventions of each raw dataset, it was NOT FEASIBLE to streamline the entire cleaning process within a single Python (.py) file. Therefore, a Jupyter notebook has been made available for those interested in delving into the intricacies of how the unified dataset was crafted.
17
 
18
  import csv
19
  import json
 
82
  def _split_generators(self, dl_manager: datasets.DownloadManager) -> List[datasets.SplitGenerator]:
83
  # Use the raw GitHub link to download the CSV file
84
  downloaded_file_path = dl_manager.download_and_extract(
 
85
  "https://raw.githubusercontent.com/zening-wang2023/NC-Crime-Dataset/main/NC_v1.csv.zip"
86
 
87
  )
 
91
  datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": unzipped_file_path})
92
  ]
93
 
 
 
 
 
 
94
  def _generate_examples(self, filepath):
95
  # Read the CSV file
96
  df = pd.read_csv(filepath) ## just for test