@@ -35,13 +35,44 @@ and `get` commands.
35
35
# Upload walkthrough
36
36
37
37
As explained in the vignette on the basics, querying information is best done
38
- from the top (` dataset ` objects) to the bottom. The upload process follows the
39
- * inverse* progression: first create taxa, then interactions, then networks,
40
- then wrap them up in a dataset. It is important that you familiarize yourself
41
- with the complete data specification * before* uploading your data.
38
+ from the top (` dataset ` objects) to the bottom ( ` taxa ` ) . The upload process
39
+ follows the * inverse* progression: first create taxa, then interactions, then
40
+ networks, then wrap them up in a dataset. It is important that you familiarize
41
+ yourself with the complete data specification * before* uploading your data.
42
42
43
43
## Creating taxa and related objects
44
44
45
+ ** All** ` mangal ` objects are essentially ` R ` ` lists ` , with names corresponding
46
+ to the fields. For example, we can define a ` taxa ` as
47
+
48
+ ``` {r dummy_taxa}
49
+ dipl_vu <- list(
50
+ name = 'Diplodus vulgaris',
51
+ vernacular = 'Common two-banded seabream',
52
+ status = 'confirmed',
53
+ gbif = 5210979
54
+ )
55
+ ```
56
+
57
+ Keep in mind that the database * will* check that there are no duplicates of
58
+ the object you try to register. You can either check before uploading data
59
+ (it's possible to ` patch ` objects if you have additional informations),
60
+ which is a * Good Thing* , or hope that nothing breaks and address duplicates
61
+ if they arise (which, obviously, is a * Bad Thing* ).
62
+
63
+ Now this object can be uploaded in the database in the following way:
64
+
65
+ ``` {r upload_dummy_taxa, eval = FALSE}
66
+ dipl_vu <- addTaxa(api, dipl_vu)
67
+ ```
68
+
69
+ By default, the functions to ` add ` * any* object will return a ` list ` with the
70
+ object queried from the database. This is essentially your object with the
71
+ field values you supplied ** and** the ` id ` . For this reason, it is acceptable
72
+ (we actually recommend it) that you * overwrite* the original object with the
73
+ version actually in the database. Without going into details, it will speed
74
+ things up internally, and make the whole upload process more error-proof.
75
+
45
76
## Creating datasets and related objects
46
77
47
78
## Releasing the dataset
0 commit comments