@@ -16,7 +16,7 @@ be seamlessly converted into a **Darwin Core Archive**, the data standard used
16
16
by the [ Global Biodiversity Information Facility (GBIF)] ( https://gbif.org ) and
17
17
it's partner nodes.
18
18
19
- ``` {r, eval=TRUE, echo=FALSE, message=FALSE}
19
+ ``` {r, eval=TRUE, echo=FALSE, message=FALSE, warning=FALSE }
20
20
# load packages now to avoid messages later
21
21
library(galaxias)
22
22
library(lubridate)
@@ -28,7 +28,7 @@ To start a new data project using galaxias, call:
28
28
29
29
``` {r, eval=FALSE}
30
30
library(galaxias)
31
- galaxias_project("myprojectname ")
31
+ galaxias_project("my-project-name ")
32
32
```
33
33
34
34
If you are using RStudio, this should launch a new RStudio instance for
@@ -37,7 +37,7 @@ that project, which will have the following structure:
37
37
```
38
38
├── README.md : Description of the repository
39
39
├── metadata.md : Boilerplate metadata statement for this project
40
- ├── projectname .Rproj : RStudio project file
40
+ ├── my-project-name .Rproj : RStudio project file
41
41
├── data-raw : Folder to store source data
42
42
└── data : Folder to store processed data
43
43
```
@@ -66,28 +66,29 @@ df <- tibble(
66
66
(Note that normally you'd import your data from an external file (e.g. using
67
67
` readr::read_csv() ` ), but we've constructed one here for example purposes.)
68
68
69
- We recommend using functions from the ` corella ` package for converting tibbles
70
- to Darwin Core. ` corella ` is automatically loaded when you load ` galaxias ` . A
71
- minimally complete set of formatted observations might look like this:
69
+ You can convert tibbles to use Darwin Core standard using ` set_ ` functions
70
+ imported from the [ corella package] ( https://corella.ala.org.au/ )
71
+ (automatically loaded with galaxias). A minimally complete set of formatted
72
+ observations might look like this:
72
73
73
74
``` {r, echo=FALSE, message=FALSE}
74
75
library(lubridate)
75
76
76
77
occurrences <- df |>
77
78
# basic requirements of Darwin Core
78
- use_occurrences (occurrenceID = sequential_id(),
79
+ set_occurrences (occurrenceID = sequential_id(),
79
80
basisOfRecord = "humanObservation") |>
80
81
# place and time
81
- use_coordinates (decimalLatitude = latitude,
82
+ set_coordinates (decimalLatitude = latitude,
82
83
decimalLongitude = longitude) |>
83
- use_locality (country = "Australia",
84
+ set_locality (country = "Australia",
84
85
locality = "Canberra") |>
85
- use_datetime (eventDate = lubridate::dmy(date),
86
+ set_datetime (eventDate = lubridate::dmy(date),
86
87
eventTime = lubridate::hm(time)) |>
87
88
# taxonomy
88
- use_scientific_name (scientificName = species,
89
+ set_scientific_name (scientificName = species,
89
90
taxonRank = "species") |>
90
- use_taxonomy (kingdom = "Animalia",
91
+ set_taxonomy (kingdom = "Animalia",
91
92
phylum = "Aves")
92
93
```
93
94
@@ -96,19 +97,19 @@ library(lubridate)
96
97
97
98
occurrences <- df |>
98
99
# basic requirements of Darwin Core
99
- use_occurrences (occurrenceID = sequential_id(),
100
+ set_occurrences (occurrenceID = sequential_id(),
100
101
basisOfRecord = "humanObservation") |>
101
102
# place and time
102
- use_coordinates (decimalLatitude = latitude,
103
+ set_coordinates (decimalLatitude = latitude,
103
104
decimalLongitude = longitude) |>
104
- use_locality (country = "Australia",
105
+ set_locality (country = "Australia",
105
106
locality = "Canberra") |>
106
- use_datetime (eventDate = lubridate::dmy(date),
107
+ set_datetime (eventDate = lubridate::dmy(date),
107
108
eventTime = lubridate::hm(time)) |>
108
109
# taxonomy
109
- use_scientific_name (scientificName = species,
110
+ set_scientific_name (scientificName = species,
110
111
taxonRank = "species") |>
111
- use_taxonomy (kingdom = "Animalia",
112
+ set_taxonomy (kingdom = "Animalia",
112
113
phylum = "Aves")
113
114
```
114
115
0 commit comments