Update NC_Crime.py
Browse files- NC_Crime.py +5 -7
NC_Crime.py
CHANGED
@@ -73,7 +73,6 @@ class NCCrimeDataset(datasets.GeneratorBasedBuilder):
|
|
73 |
"clear_status": datasets.Value("string"),
|
74 |
"incident_address": datasets.Value("string"),
|
75 |
"notes": datasets.Value("string"),
|
76 |
-
"crime_severity": datasets.Value("string"),
|
77 |
}),
|
78 |
citation=_CITATION,
|
79 |
)
|
@@ -88,13 +87,13 @@ class NCCrimeDataset(datasets.GeneratorBasedBuilder):
|
|
88 |
# "https://drive.google.com/uc?export=download&id=1C1vwAe4nVTdu6P8lHsmyLbJHUsHfT72h"
|
89 |
|
90 |
#"https://drive.google.com/uc?export=download&id=1Se-B8Y-SdU0caZzGJyX_0YW44TZwaq3l"
|
91 |
-
|
92 |
# "https://raw.githubusercontent.com/znw2024/NC-Crime/main/DCCR.csv"
|
93 |
-
|
94 |
-
"https://raw.githubusercontent.com/zening-wang2023/NC-Crime-Dataset/main/
|
95 |
-
|
96 |
)
|
97 |
-
unzipped_file_path = os.path.join(downloaded_file_path, "
|
98 |
# Return a list of split generators
|
99 |
return [
|
100 |
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": unzipped_file_path})
|
@@ -121,5 +120,4 @@ class NCCrimeDataset(datasets.GeneratorBasedBuilder):
|
|
121 |
"clear_status": row["clear_status"],
|
122 |
"incident_address": row["incident_address"],
|
123 |
"notes": row["notes"],
|
124 |
-
"crime_severity": row["crime_severity"],
|
125 |
}
|
|
|
73 |
"clear_status": datasets.Value("string"),
|
74 |
"incident_address": datasets.Value("string"),
|
75 |
"notes": datasets.Value("string"),
|
|
|
76 |
}),
|
77 |
citation=_CITATION,
|
78 |
)
|
|
|
87 |
# "https://drive.google.com/uc?export=download&id=1C1vwAe4nVTdu6P8lHsmyLbJHUsHfT72h"
|
88 |
|
89 |
#"https://drive.google.com/uc?export=download&id=1Se-B8Y-SdU0caZzGJyX_0YW44TZwaq3l"
|
90 |
+
|
91 |
# "https://raw.githubusercontent.com/znw2024/NC-Crime/main/DCCR.csv"
|
92 |
+
"https://raw.githubusercontent.com/zening-wang2023/NC-Crime-Dataset/main/DCCR.csv.zip"
|
93 |
+
# "https://raw.githubusercontent.com/zening-wang2023/NC-Crime-Dataset/main/NC_dataset.csv.zip"
|
94 |
+
|
95 |
)
|
96 |
+
unzipped_file_path = os.path.join(downloaded_file_path, "DCCR.csv")
|
97 |
# Return a list of split generators
|
98 |
return [
|
99 |
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": unzipped_file_path})
|
|
|
120 |
"clear_status": row["clear_status"],
|
121 |
"incident_address": row["incident_address"],
|
122 |
"notes": row["notes"],
|
|
|
123 |
}
|