Skip to content

Commit 9de76dc

Browse files
authored
add data import docs
1 parent 786c825 commit 9de76dc

File tree

1 file changed

+80
-0
lines changed

1 file changed

+80
-0
lines changed

docs/data.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Data Imports
2+
3+
To add data into the system, the first step needed is to create a superuser account. Check the [index.md](/docs/index.md#initialize-the-project) for instructions on how to do it.
4+
5+
With the superuser account, you can login on the Administration Interface. The URL will be: `{backend-url}/admin`.
6+
7+
Once logged in, you will see a screen like this:
8+
9+
<img width="2764" height="1492" alt="image" src="https://github.com/user-attachments/assets/109f4712-9577-4bef-8b4c-153620f3a2b1" />
10+
11+
## Adding data
12+
13+
We can add data by uploading raster files (TIFF or VRT format), vector files in the GeoJSON format or Tabular data in CSV format.
14+
However, before uploading data, you should create the Clusters, and the Dataset entries.
15+
16+
### Creating clusters
17+
18+
On the Administrative Interface, click on Clusters, then on `Add Cluster` button.
19+
20+
You will see a form like this. Add a name and click on Save.
21+
22+
<img width="1114" height="460" alt="image" src="https://github.com/user-attachments/assets/c7f62081-3d2f-4fa7-8b24-0a8c032a018c" />
23+
24+
If you need to modify or delete a Cluster, you can do it by accessing the Cluster list page in the administrative interface.
25+
26+
Clicking on the id of the cluster, you will have access to the form to modify it. If you need to delete clusters, select it and then click on the action dropdown and select `Delete selected clusters`. Finally, click on the `Go` button.
27+
28+
<img width="1124" height="1284" alt="image" src="https://github.com/user-attachments/assets/01f27226-566e-44c4-b279-6c818b53ff2e" />
29+
30+
31+
### Creating datasets
32+
33+
The exact same pattern applies when creating Raster, Vector or Tabular datasets. Here you can see the Raster Dataset creation form:
34+
35+
<img width="2768" height="1426" alt="image" src="https://github.com/user-attachments/assets/01a838fb-8ab1-4cef-bab7-e1ebf624fa8e" />
36+
37+
The forms to create Vector and Tabular datasets are very similar to the Raster one.
38+
39+
### Uploading data
40+
41+
The last and most important step of the data import is to upload the files containing each datasets data.
42+
43+
### Tabular data
44+
45+
Click on the `Tabular Items` link in the Administrative Interface homepage. Then, click on `Import File` in the right-top corner of the page.
46+
47+
<img width="2210" height="1006" alt="image" src="https://github.com/user-attachments/assets/65dc540a-9bdf-4690-ab65-6d005aa22d96" />
48+
49+
Once clicked, you will see a form like this, where you can upload a CSV file and select the dataset to which the data belongs to:
50+
51+
<img width="1666" height="428" alt="image" src="https://github.com/user-attachments/assets/2702ae31-a4ec-4cfa-b782-7045876314c4" />
52+
53+
The CSV file needs to be separated by commas and should have the following columns:
54+
55+
- Year
56+
- Month `(optional)`
57+
- Province `(optional)`
58+
- Area Council `(optional)`
59+
- Attribute
60+
- Value
61+
62+
The name of the columns can be in lower, UPPER, or Camel Case. You can upload a file with additional columns, and the additional information will be stored in the database.
63+
64+
### Vector data
65+
66+
Click on the `Vector Items` link in the Administrative Interface homepage. Then, click on `Import File` in the right-top corner of the page.
67+
68+
<img width="2204" height="928" alt="image" src="https://github.com/user-attachments/assets/b6cd7cab-c9bd-4956-87f2-08268d848602" />
69+
70+
Once clicked, you will see a form like this, where you can upload a GeoJSON file and select the dataset to which the data belongs to:
71+
72+
<img width="660" height="442" alt="image" src="https://github.com/user-attachments/assets/e65938e5-43b0-405d-9fdd-446b182a4e88" />
73+
74+
If you have never worked with GeoJSON files, you can convert any geospatial data format to GeoJSON using QGIS or ArcGis. The items in the GeoJSON file should have the following columsn:
75+
76+
- Name `(optional)`
77+
- Ref `(optional)`
78+
- Province `(optional)`
79+
- Area Council `(optional)`
80+
- Attribute `(optional)`

0 commit comments

Comments
 (0)