kls-2
#4
by
keeganskeate
- opened
- cannabis_licenses.py +8 -3
- subsets.json +19 -19
cannabis_licenses.py
CHANGED
@@ -73,9 +73,14 @@ FIELDS = datasets.Features({
|
|
73 |
'data_refreshed_date': datasets.Value(dtype='string'),
|
74 |
})
|
75 |
|
76 |
-
# Read
|
77 |
-
with open('subsets.json', 'r') as f:
|
78 |
-
|
|
|
|
|
|
|
|
|
|
|
79 |
|
80 |
|
81 |
class CannabisLicensesConfig(datasets.BuilderConfig):
|
|
|
73 |
'data_refreshed_date': datasets.Value(dtype='string'),
|
74 |
})
|
75 |
|
76 |
+
# DEV: Read subsets from local source.
|
77 |
+
# with open('subsets.json', 'r') as f:
|
78 |
+
# SUBSETS = json.loads(f.read())
|
79 |
+
|
80 |
+
# PRODUCTION: Read subsets from the official source.
|
81 |
+
import urllib.request
|
82 |
+
with urllib.request.urlopen('https://huggingface.co/datasets/cannlytics/cannabis_licenses/raw/main/subsets.json') as url:
|
83 |
+
SUBSETS = json.load(url)
|
84 |
|
85 |
|
86 |
class CannabisLicensesConfig(datasets.BuilderConfig):
|
subsets.json
CHANGED
@@ -3,108 +3,108 @@
|
|
3 |
"name": "all",
|
4 |
"url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/blob/main/algorithms/main.py",
|
5 |
"data_source": "",
|
6 |
-
"data_url": "data/all/licenses-2022-10-08T14-03-08.csv"
|
7 |
},
|
8 |
"ak": {
|
9 |
"name": "ak",
|
10 |
"url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/blob/main/algorithms/get_licenses_ak.py",
|
11 |
"data_source": "https://www.commerce.alaska.gov/abc/marijuana/Home/licensesearch",
|
12 |
-
"data_url": "data/ak/retailers-ak-2022-10-06T17-46-29.csv"
|
13 |
},
|
14 |
"az": {
|
15 |
"name": "az",
|
16 |
"url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/blob/main/algorithms/get_licenses_az.py",
|
17 |
"data_source": "https://azcarecheck.azdhs.gov/s/?licenseType=null",
|
18 |
-
"data_url": "data/az/retailers-az-2022-10-07T10-12-07.csv"
|
19 |
},
|
20 |
"ca": {
|
21 |
"name": "ca",
|
22 |
"url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/blob/main/algorithms/get_licenses_ca.py",
|
23 |
"data_source": "https://search.cannabis.ca.gov/",
|
24 |
-
"data_url": "data/ca/licenses-ca-2022-10-06T18-10-15.csv"
|
25 |
},
|
26 |
"co": {
|
27 |
"name": "co",
|
28 |
"url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/blob/main/algorithms/get_licenses_co.py",
|
29 |
"data_source": "https://sbg.colorado.gov/med/licensed-facilities",
|
30 |
-
"data_url": "data/co/retailers-co-2022-10-06T18-28-29.csv"
|
31 |
},
|
32 |
"ct": {
|
33 |
"name": "ct",
|
34 |
"url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/blob/main/algorithms/get_licenses_ct.py",
|
35 |
"data_source": "https://portal.ct.gov/DCP/Medical-Marijuana-Program/Connecticut-Medical-Marijuana-Dispensary-Facilities",
|
36 |
-
"data_url": "data/ct/retailers-ct-2022-10-06T18-28-33.csv"
|
37 |
},
|
38 |
"il": {
|
39 |
"name": "il",
|
40 |
"url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/blob/main/algorithms/get_licenses_il.py",
|
41 |
"data_source": "https://www.idfpr.com/LicenseLookup/AdultUseDispensaries.pdf",
|
42 |
-
"data_url": "data/il/retailers-il-2022-10-06T18-28-55.csv"
|
43 |
},
|
44 |
"ma": {
|
45 |
"name": "ma",
|
46 |
"url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/blob/main/algorithms/get_licenses_ma.py",
|
47 |
"data_source": "https://masscannabiscontrol.com/open-data/data-catalog/",
|
48 |
-
"data_url": "data/ma/retailers-ma-2022-10-07T14-45-39.csv"
|
49 |
},
|
50 |
"me": {
|
51 |
"name": "me",
|
52 |
"url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/blob/main/algorithms/get_licenses_me.py",
|
53 |
-
"data_source": "https://www.maine.gov/dafs/ocp/open-data/adult-use",
|
54 |
-
"data_url": "data/me/licenses-me-2022-10-07T15-26-01.csv"
|
55 |
},
|
56 |
"mi": {
|
57 |
"name": "mi",
|
58 |
"url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/blob/main/algorithms/get_licenses_mi.py",
|
59 |
"data_source": "https://michigan.maps.arcgis.com/apps/webappviewer/index.html?id=cd5a1a76daaf470b823a382691c0ff60",
|
60 |
-
"data_url": "data/mi/licenses-mi-2022-10-08T13-49-04.csv"
|
61 |
},
|
62 |
"mt": {
|
63 |
"name": "mt",
|
64 |
"url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/blob/main/algorithms/get_licenses_mt.py",
|
65 |
"data_source": "https://mtrevenue.gov/cannabis/#CannabisLicenses",
|
66 |
-
"data_url": "data/mt/retailers-mt-2022-10-07T16-28-10.csv"
|
67 |
},
|
68 |
"nj": {
|
69 |
"name": "nj",
|
70 |
"url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/blob/main/algorithms/get_licenses_nj.py",
|
71 |
"data_source": "https://data.nj.gov/stories/s/ggm4-mprw",
|
72 |
-
"data_url": "data/nj/licenses-nj-2022-10-06T18-39-17.csv"
|
73 |
},
|
74 |
"nm": {
|
75 |
"name": "nm",
|
76 |
"url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/blob/main/algorithms/get_licenses_nm.py",
|
77 |
"data_source": "https://nmrldlpi.force.com/bcd/s/public-search-license?division=CCD&language=en_US",
|
78 |
-
"data_url": "data/nm/retailers-nm-2022-10-05T15-09-21.csv"
|
79 |
},
|
80 |
"nv": {
|
81 |
"name": "nv",
|
82 |
"url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/blob/main/algorithms/get_licenses_nv.py",
|
83 |
"data_source": "https://ccb.nv.gov/list-of-licensees/",
|
84 |
-
"data_url": "data/nv/retailers-nv-2022-10-06T18-43-01.csv"
|
85 |
},
|
86 |
"or": {
|
87 |
"name": "or",
|
88 |
"url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/blob/main/algorithms/get_licenses_ca.py",
|
89 |
"data_source": "https://www.oregon.gov/olcc/marijuana/pages/recreational-marijuana-licensing.aspx",
|
90 |
-
"data_url": "data/or/licenses-or-2022-10-07T14-47-55.csv"
|
91 |
},
|
92 |
"ri": {
|
93 |
"name": "ri",
|
94 |
"url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/blob/main/algorithms/get_licenses_ri.py",
|
95 |
"data_source": "https://dbr.ri.gov/office-cannabis-regulation/compassion-centers/licensed-compassion-centers",
|
96 |
-
"data_url": "data/ri/licenses-ri-2022-10-06T18-45-41.csv"
|
97 |
},
|
98 |
"vt": {
|
99 |
"name": "vt",
|
100 |
"url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/blob/main/algorithms/get_licenses_vt.py",
|
101 |
"data_source": "https://ccb.vermont.gov/licenses",
|
102 |
-
"data_url": "data/vt/retailers-vt-2022-10-06T18-46-08.csv"
|
103 |
},
|
104 |
"wa": {
|
105 |
"name": "wa",
|
106 |
"url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/blob/main/algorithms/get_licenses_wa.py",
|
107 |
"data_source": "https://lcb.wa.gov/records/frequently-requested-lists",
|
108 |
-
"data_url": "data/wa/retailers-wa-2022-10-07T09-06-02.csv"
|
109 |
}
|
110 |
}
|
|
|
3 |
"name": "all",
|
4 |
"url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/blob/main/algorithms/main.py",
|
5 |
"data_source": "",
|
6 |
+
"data_url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/resolve/main/data/all/licenses-2022-10-08T14-03-08.csv"
|
7 |
},
|
8 |
"ak": {
|
9 |
"name": "ak",
|
10 |
"url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/blob/main/algorithms/get_licenses_ak.py",
|
11 |
"data_source": "https://www.commerce.alaska.gov/abc/marijuana/Home/licensesearch",
|
12 |
+
"data_url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/resolve/main/data/ak/retailers-ak-2022-10-06T17-46-29.csv"
|
13 |
},
|
14 |
"az": {
|
15 |
"name": "az",
|
16 |
"url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/blob/main/algorithms/get_licenses_az.py",
|
17 |
"data_source": "https://azcarecheck.azdhs.gov/s/?licenseType=null",
|
18 |
+
"data_url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/resolve/main/data/az/retailers-az-2022-10-07T10-12-07.csv"
|
19 |
},
|
20 |
"ca": {
|
21 |
"name": "ca",
|
22 |
"url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/blob/main/algorithms/get_licenses_ca.py",
|
23 |
"data_source": "https://search.cannabis.ca.gov/",
|
24 |
+
"data_url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/resolve/main/data/ca/licenses-ca-2022-10-06T18-10-15.csv"
|
25 |
},
|
26 |
"co": {
|
27 |
"name": "co",
|
28 |
"url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/blob/main/algorithms/get_licenses_co.py",
|
29 |
"data_source": "https://sbg.colorado.gov/med/licensed-facilities",
|
30 |
+
"data_url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/resolve/main/data/co/retailers-co-2022-10-06T18-28-29.csv"
|
31 |
},
|
32 |
"ct": {
|
33 |
"name": "ct",
|
34 |
"url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/blob/main/algorithms/get_licenses_ct.py",
|
35 |
"data_source": "https://portal.ct.gov/DCP/Medical-Marijuana-Program/Connecticut-Medical-Marijuana-Dispensary-Facilities",
|
36 |
+
"data_url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/resolve/main/data/ct/retailers-ct-2022-10-06T18-28-33.csv"
|
37 |
},
|
38 |
"il": {
|
39 |
"name": "il",
|
40 |
"url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/blob/main/algorithms/get_licenses_il.py",
|
41 |
"data_source": "https://www.idfpr.com/LicenseLookup/AdultUseDispensaries.pdf",
|
42 |
+
"data_url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/resolve/main/data/il/retailers-il-2022-10-06T18-28-55.csv"
|
43 |
},
|
44 |
"ma": {
|
45 |
"name": "ma",
|
46 |
"url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/blob/main/algorithms/get_licenses_ma.py",
|
47 |
"data_source": "https://masscannabiscontrol.com/open-data/data-catalog/",
|
48 |
+
"data_url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/resolve/main/data/ma/retailers-ma-2022-10-07T14-45-39.csv"
|
49 |
},
|
50 |
"me": {
|
51 |
"name": "me",
|
52 |
"url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/blob/main/algorithms/get_licenses_me.py",
|
53 |
+
"data_source": "https://www.maine.gov/dafs/ocp/open-https://huggingface.co/datasets/cannlytics/cannabis_licenses/resolve/main/data/adult-use",
|
54 |
+
"data_url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/resolve/main/data/me/licenses-me-2022-10-07T15-26-01.csv"
|
55 |
},
|
56 |
"mi": {
|
57 |
"name": "mi",
|
58 |
"url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/blob/main/algorithms/get_licenses_mi.py",
|
59 |
"data_source": "https://michigan.maps.arcgis.com/apps/webappviewer/index.html?id=cd5a1a76daaf470b823a382691c0ff60",
|
60 |
+
"data_url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/resolve/main/data/mi/licenses-mi-2022-10-08T13-49-04.csv"
|
61 |
},
|
62 |
"mt": {
|
63 |
"name": "mt",
|
64 |
"url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/blob/main/algorithms/get_licenses_mt.py",
|
65 |
"data_source": "https://mtrevenue.gov/cannabis/#CannabisLicenses",
|
66 |
+
"data_url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/resolve/main/data/mt/retailers-mt-2022-10-07T16-28-10.csv"
|
67 |
},
|
68 |
"nj": {
|
69 |
"name": "nj",
|
70 |
"url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/blob/main/algorithms/get_licenses_nj.py",
|
71 |
"data_source": "https://data.nj.gov/stories/s/ggm4-mprw",
|
72 |
+
"data_url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/resolve/main/data/nj/licenses-nj-2022-10-06T18-39-17.csv"
|
73 |
},
|
74 |
"nm": {
|
75 |
"name": "nm",
|
76 |
"url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/blob/main/algorithms/get_licenses_nm.py",
|
77 |
"data_source": "https://nmrldlpi.force.com/bcd/s/public-search-license?division=CCD&language=en_US",
|
78 |
+
"data_url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/resolve/main/data/nm/retailers-nm-2022-10-05T15-09-21.csv"
|
79 |
},
|
80 |
"nv": {
|
81 |
"name": "nv",
|
82 |
"url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/blob/main/algorithms/get_licenses_nv.py",
|
83 |
"data_source": "https://ccb.nv.gov/list-of-licensees/",
|
84 |
+
"data_url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/resolve/main/data/nv/retailers-nv-2022-10-06T18-43-01.csv"
|
85 |
},
|
86 |
"or": {
|
87 |
"name": "or",
|
88 |
"url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/blob/main/algorithms/get_licenses_ca.py",
|
89 |
"data_source": "https://www.oregon.gov/olcc/marijuana/pages/recreational-marijuana-licensing.aspx",
|
90 |
+
"data_url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/resolve/main/data/or/licenses-or-2022-10-07T14-47-55.csv"
|
91 |
},
|
92 |
"ri": {
|
93 |
"name": "ri",
|
94 |
"url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/blob/main/algorithms/get_licenses_ri.py",
|
95 |
"data_source": "https://dbr.ri.gov/office-cannabis-regulation/compassion-centers/licensed-compassion-centers",
|
96 |
+
"data_url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/resolve/main/data/ri/licenses-ri-2022-10-06T18-45-41.csv"
|
97 |
},
|
98 |
"vt": {
|
99 |
"name": "vt",
|
100 |
"url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/blob/main/algorithms/get_licenses_vt.py",
|
101 |
"data_source": "https://ccb.vermont.gov/licenses",
|
102 |
+
"data_url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/resolve/main/data/vt/retailers-vt-2022-10-06T18-46-08.csv"
|
103 |
},
|
104 |
"wa": {
|
105 |
"name": "wa",
|
106 |
"url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/blob/main/algorithms/get_licenses_wa.py",
|
107 |
"data_source": "https://lcb.wa.gov/records/frequently-requested-lists",
|
108 |
+
"data_url": "https://huggingface.co/datasets/cannlytics/cannabis_licenses/resolve/main/data/wa/retailers-wa-2022-10-07T09-06-02.csv"
|
109 |
}
|
110 |
}
|