pr/2
#2
by
keeganskeate
- opened
- cannabis_tests.py +29 -28
cannabis_tests.py
CHANGED
|
@@ -32,7 +32,7 @@ CANNABIS_TESTS_URL = 'https://huggingface.co/datasets/cannlytics/cannabis_tests'
|
|
| 32 |
|
| 33 |
# Raw Garden constants.
|
| 34 |
# RAWGARDEN_DATA_URL = 'https://cannlytics.page.link/rawgarden'
|
| 35 |
-
RAWGARDEN_DETAILS_URL = 'https://cannlytics.
|
| 36 |
RAWGARDEN_RESULTS_URL = 'https://cannlytics.page.link/rawgarden-results'
|
| 37 |
RAWGARDEN_VALUES_URL = 'https://cannlytics.page.link/rawgarden-values'
|
| 38 |
RAWGARDEN_URL = 'https://github.com/cannlytics/cannlytics/tree/main/ai/curation/get_rawgarden_data'
|
|
@@ -41,30 +41,29 @@ Raw Garden lab test results (https://cannlytics.com/data/tests) is a
|
|
| 41 |
dataset of curated cannabis lab test results from Raw Garden, a large
|
| 42 |
cannabis processor in California.
|
| 43 |
"""
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
RAWGARDEN_DETAILS = {
|
| 68 |
'sample_hash': datasets.Value(dtype='string', id=None),
|
| 69 |
'results_hash': datasets.Value(dtype='string', id=None),
|
| 70 |
'sample_id': datasets.Value(dtype='string', id=None),
|
|
@@ -163,7 +162,7 @@ RAWGARDEN_DETAILS = {
|
|
| 163 |
'url': datasets.Value(dtype='string', id=None),
|
| 164 |
'water_activity_method': datasets.Value(dtype='string', id=None),
|
| 165 |
'water_activity_status': datasets.Value(dtype='string', id=None)
|
| 166 |
-
}
|
| 167 |
# RAWGARDEN_VALUES = {
|
| 168 |
# 'delta_9_thc': datasets.Value(dtype='float64', id=None),
|
| 169 |
# }
|
|
@@ -308,6 +307,8 @@ class CannabisTests(datasets.GeneratorBasedBuilder):
|
|
| 308 |
features=RAWGARDEN_DETAILS,
|
| 309 |
homepage=CANNABIS_TESTS_URL,
|
| 310 |
supervised_keys=None,
|
|
|
|
|
|
|
| 311 |
)
|
| 312 |
|
| 313 |
# def _generate_examples(self, filepath):
|
|
@@ -327,5 +328,5 @@ class CannabisTests(datasets.GeneratorBasedBuilder):
|
|
| 327 |
|
| 328 |
# if __name__ == '__main__':
|
| 329 |
|
| 330 |
-
#
|
| 331 |
-
#
|
|
|
|
| 32 |
|
| 33 |
# Raw Garden constants.
|
| 34 |
# RAWGARDEN_DATA_URL = 'https://cannlytics.page.link/rawgarden'
|
| 35 |
+
RAWGARDEN_DETAILS_URL = 'https://firebasestorage.googleapis.com/v0/b/cannlytics.appspot.com/o/data%2Flab_results%2Frawgarden%2Fdetails.csv?alt=media&token=e5b5273a-049a-4092-98d7-90a62ef399a3'
|
| 36 |
RAWGARDEN_RESULTS_URL = 'https://cannlytics.page.link/rawgarden-results'
|
| 37 |
RAWGARDEN_VALUES_URL = 'https://cannlytics.page.link/rawgarden-values'
|
| 38 |
RAWGARDEN_URL = 'https://github.com/cannlytics/cannlytics/tree/main/ai/curation/get_rawgarden_data'
|
|
|
|
| 41 |
dataset of curated cannabis lab test results from Raw Garden, a large
|
| 42 |
cannabis processor in California.
|
| 43 |
"""
|
| 44 |
+
# RAWGARDEN_RESULTS = {
|
| 45 |
+
# 'sample_hash': datasets.Value(dtype='string', id=None),
|
| 46 |
+
# 'results_hash': datasets.Value(dtype='string', id=None),
|
| 47 |
+
# 'sample_id': datasets.Value(dtype='string', id=None),
|
| 48 |
+
# 'product_name': datasets.Value(dtype='string', id=None),
|
| 49 |
+
# 'producer': datasets.Value(dtype='string', id=None),
|
| 50 |
+
# 'product_type': datasets.Value(dtype='string', id=None),
|
| 51 |
+
# 'product_subtype': datasets.Value(dtype='string', id=None),
|
| 52 |
+
# 'date_tested': datasets.Value(dtype='string', id=None),
|
| 53 |
+
# 'analysis': datasets.Value(dtype='string', id=None),
|
| 54 |
+
# 'key': datasets.Value(dtype='string', id=None),
|
| 55 |
+
# 'limit': datasets.Value(dtype='double', id=None),
|
| 56 |
+
# 'lod': datasets.Value(dtype='double', id=None),
|
| 57 |
+
# 'lodloq': datasets.Value(dtype='double', id=None),
|
| 58 |
+
# 'loq': datasets.Value(dtype='double', id=None),
|
| 59 |
+
# 'margin_of_error': datasets.Value(dtype='double', id=None),
|
| 60 |
+
# 'mg_g': datasets.Value(dtype='double', id=None),
|
| 61 |
+
# 'name': datasets.Value(dtype='string', id=None),
|
| 62 |
+
# 'status': datasets.Value(dtype='string', id=None),
|
| 63 |
+
# 'units': datasets.Value(dtype='string', id=None),
|
| 64 |
+
# 'value': datasets.Value(dtype='double', id=None),
|
| 65 |
+
# }
|
| 66 |
+
RAWGARDEN_DETAILS = datasets.Features({
|
|
|
|
| 67 |
'sample_hash': datasets.Value(dtype='string', id=None),
|
| 68 |
'results_hash': datasets.Value(dtype='string', id=None),
|
| 69 |
'sample_id': datasets.Value(dtype='string', id=None),
|
|
|
|
| 162 |
'url': datasets.Value(dtype='string', id=None),
|
| 163 |
'water_activity_method': datasets.Value(dtype='string', id=None),
|
| 164 |
'water_activity_status': datasets.Value(dtype='string', id=None)
|
| 165 |
+
})
|
| 166 |
# RAWGARDEN_VALUES = {
|
| 167 |
# 'delta_9_thc': datasets.Value(dtype='float64', id=None),
|
| 168 |
# }
|
|
|
|
| 307 |
features=RAWGARDEN_DETAILS,
|
| 308 |
homepage=CANNABIS_TESTS_URL,
|
| 309 |
supervised_keys=None,
|
| 310 |
+
license='CC-BY-4.0',
|
| 311 |
+
version='1.0.0',
|
| 312 |
)
|
| 313 |
|
| 314 |
# def _generate_examples(self, filepath):
|
|
|
|
| 328 |
|
| 329 |
# if __name__ == '__main__':
|
| 330 |
|
| 331 |
+
# from datasets import load_dataset
|
| 332 |
+
# dataset = load_dataset('cannabis_tests.py')
|