You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -33,7 +21,19 @@ See `01_ASDN_Readme.txt` provided in the `data` folder for full metadata informa
33
21
34
22
## Analyzing the bird dataset using csv files (raw data)
35
23
36
-
Let us import the csv files with the bird species information:
24
+
Loading the necessary packages. DuckDB has its own R package that is mostly a wrapper around dbplyr and DBI.
25
+
26
+
```{r}
27
+
#| message: false
28
+
29
+
library(tidyverse)
30
+
library(dbplyr) # to query databases in a tidyverse style manner
31
+
library(DBI) # to connect to databases
32
+
# install.packages("duckdb") # install this package to get duckDB API
33
+
library(duckdb) # Specific to duckDB
34
+
```
35
+
36
+
Import the csv files with the bird species information:
37
37
38
38
```{r}
39
39
# Import the species
@@ -68,7 +68,7 @@ species_study
68
68
69
69
:::{.callout-tip}
70
70
## Analysis
71
-
We would like to know what is the average egg size for each of those bird species. How would we do that?
71
+
***We would like to know what is the average egg size for each of those bird species. How would we do that?***
72
72
:::
73
73
74
74
We will need more information that what we have in our species table. Actually we will need to also retrieve information from the nests and eggs monitoring table.
@@ -237,7 +237,7 @@ species_db %>%
237
237
show_query()
238
238
```
239
239
:::{.callout-caution}
240
-
Limitation: no way to add or update data in the database, `dbplyr` is view only. If you want to add or update data, you'll need to use the `DBI` package functions.
240
+
****Limitation: no way to add or update data in the database, `dbplyr` is view only. If you want to add or update data, you'll need to use the `DBI` package functions.***
0 commit comments