Skip to content

Commit c490e53

Browse files
committed
Edit to use updated corella functions
1 parent 65ba6e5 commit c490e53

File tree

1 file changed

+19
-18
lines changed

1 file changed

+19
-18
lines changed

vignettes/quick_start_guide.Rmd

+19-18
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ be seamlessly converted into a **Darwin Core Archive**, the data standard used
1616
by the [Global Biodiversity Information Facility (GBIF)](https://gbif.org) and
1717
it's partner nodes.
1818

19-
```{r, eval=TRUE, echo=FALSE, message=FALSE}
19+
```{r, eval=TRUE, echo=FALSE, message=FALSE, warning=FALSE}
2020
# load packages now to avoid messages later
2121
library(galaxias)
2222
library(lubridate)
@@ -28,7 +28,7 @@ To start a new data project using galaxias, call:
2828

2929
```{r, eval=FALSE}
3030
library(galaxias)
31-
galaxias_project("myprojectname")
31+
galaxias_project("my-project-name")
3232
```
3333

3434
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:
3737
```
3838
├── README.md : Description of the repository
3939
├── metadata.md : Boilerplate metadata statement for this project
40-
├── projectname.Rproj : RStudio project file
40+
├── my-project-name.Rproj : RStudio project file
4141
├── data-raw : Folder to store source data
4242
└── data : Folder to store processed data
4343
```
@@ -66,28 +66,29 @@ df <- tibble(
6666
(Note that normally you'd import your data from an external file (e.g. using
6767
`readr::read_csv()`), but we've constructed one here for example purposes.)
6868

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:
7273

7374
```{r, echo=FALSE, message=FALSE}
7475
library(lubridate)
7576
7677
occurrences <- df |>
7778
# basic requirements of Darwin Core
78-
use_occurrences(occurrenceID = sequential_id(),
79+
set_occurrences(occurrenceID = sequential_id(),
7980
basisOfRecord = "humanObservation") |>
8081
# place and time
81-
use_coordinates(decimalLatitude = latitude,
82+
set_coordinates(decimalLatitude = latitude,
8283
decimalLongitude = longitude) |>
83-
use_locality(country = "Australia",
84+
set_locality(country = "Australia",
8485
locality = "Canberra") |>
85-
use_datetime(eventDate = lubridate::dmy(date),
86+
set_datetime(eventDate = lubridate::dmy(date),
8687
eventTime = lubridate::hm(time)) |>
8788
# taxonomy
88-
use_scientific_name(scientificName = species,
89+
set_scientific_name(scientificName = species,
8990
taxonRank = "species") |>
90-
use_taxonomy(kingdom = "Animalia",
91+
set_taxonomy(kingdom = "Animalia",
9192
phylum = "Aves")
9293
```
9394

@@ -96,19 +97,19 @@ library(lubridate)
9697
9798
occurrences <- df |>
9899
# basic requirements of Darwin Core
99-
use_occurrences(occurrenceID = sequential_id(),
100+
set_occurrences(occurrenceID = sequential_id(),
100101
basisOfRecord = "humanObservation") |>
101102
# place and time
102-
use_coordinates(decimalLatitude = latitude,
103+
set_coordinates(decimalLatitude = latitude,
103104
decimalLongitude = longitude) |>
104-
use_locality(country = "Australia",
105+
set_locality(country = "Australia",
105106
locality = "Canberra") |>
106-
use_datetime(eventDate = lubridate::dmy(date),
107+
set_datetime(eventDate = lubridate::dmy(date),
107108
eventTime = lubridate::hm(time)) |>
108109
# taxonomy
109-
use_scientific_name(scientificName = species,
110+
set_scientific_name(scientificName = species,
110111
taxonRank = "species") |>
111-
use_taxonomy(kingdom = "Animalia",
112+
set_taxonomy(kingdom = "Animalia",
112113
phylum = "Aves")
113114
```
114115

0 commit comments

Comments
 (0)