File size: 1,615 Bytes
d1ae506
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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
68
# `cannabis_results` Developer Documentation

- [Cloning the Dataset](#cloning)
- [Testing the Dataset](#testing)
- [Updating the Dataset](#publishing)

## Cloning the Dataset <a name="cloning"></a>

Install [Git Large File Storage (LFS)](https://git-lfs.github.com/):

```bash
git lfs install
```

Clone the repository:

```bash
git clone https://huggingface.co/datasets/cannlytics/cannabis_results
```

## Testing a Dataset <a name="testing"></a>

You can load the dataset locally for testing with the loading script:

```py
from datasets import load_dataset

# Load the dataset.
dataset = load_dataset('cannabis_results.py', 'ca')
data = dataset['data']
assert len(data) > 0
print('Read %i data points.' % len(data))
```

## Updating the Dataset <a name="publishing"></a>

When you want to make a pull request to a specific dataset, first, create a pull request branch on [Hugging Face](https://huggingface.co), then checkout the branch, e.g.:

```bash
git fetch origin refs/pr/2:pr/2
git checkout pr/2
```

Next, do your modifications and track all of your changes, including any large data files, e.g. `.csv` files:

```bash
git lfs track *.csv
git add *.csv
git commit -m "Added all `.csv` files"
git lfs track *.xlsx
git add *.xlsx
git commit -m "Added all `.xlsx` files"
git lfs track *.zip
git add *.zip
git commit -m "Added all `.zip` files"
git add --all
git status
git commit -m "Updated `cannabis_results` dataset."
```

Finally, make the pull request:

```bash
git push origin pr/x:refs/pr/x
```

🎉 Congratulations, your pull request is now ready to be reviewed and merged by the repository admin!