class: center, middle ![:scale 30%](/assets/images/coding_club_logo_1.png) # 18 JUNE 2019 ## INBO coding club Herman Teirlinck
01.71 - Frans Breziers --- class: center, middle ![:scale 90%](/assets/images/20190618/20190618_tidyverse_queries.png) --- class: center, middle Previuos month: ![:scale 100%](/assets/images/rstudio_database_website.png)
[Rstudio database website](https://db.rstudio.com/) --- class: center, middle Previuos month: ![:scale 100%](/assets/images/inbotutorials_database.png)
[INBO database tutorial](https://inbo.github.io/tutorials/tutorials/r_database_access/) --- class: center, middle Today: ![:scale 100%](/assets/images/20190618/20190618_dbplyr_intro.png)
[dbplyr](https://dbplyr.tidyverse.org/) --- class: center, middle ### How to get started? Check the [Each session setup](https://inbo.github.io/coding-club/gettingstarted.html#each-session-setup) to get started. ### First time coding club? Check the [First time setup](https://inbo.github.io/coding-club/gettingstarted.html#first-time-setup) section to setup. --- class: center, middle ![:scale 100%](/assets/images/coding_club_sticky_concept.png) --- class: center, middle ### Share your code during the coding session! Go to https://hackmd.io/AtaurkBeRXKVgvCQwpE5kw
--- background-image: url(/assets/images/background_challenge_1.png) class: left, middle # Challenge 1 (Installing and) load package `inborutils` use the `connect_inbo_dbase` function from the inborutils package to connect to the database `D0021_00_userFlora`. For more information, check [INBO database tutorial](https://inbo.github.io/tutorials/tutorials/r_database_access/). - Click [`20190618/20190618_challenges.R`](https://github.com/inbo/coding-club/blob/master/src/20190618/20190618_challenges.R) and download* script to `src` subfolder. - Make a connection to `D0021_00_userFlora` - Connect to taxon table `tblTaxon` - Get the names of the columns in `taxon` - Get preview of first 10 rows of `taxon` - Get the first 10 Dutch names in `taxon` - How many taxa are in `taxon` data.frame? - Get the first 10 Dutch names in `taxon` as a "normal" data.frame (tip: check https://dbplyr.tidyverse.org/) - Get the scientific name of 'Geel schorpioenmos'
* __Note__: check the getting started instructions on [how to download a single file](https://inbo.github.io/coding-club/gettingstarted.html#each-session-setup)
--- class: left, middle ## Intermezzo
RStudio webinar dbplyr (March 2018)- Edgar Ruiz
Thanks Floris for the hint!
--- background-image: url(/assets/images/background_challenge_2.png) class: left, middle # Challenge 2 We found in Challenge 1 how to get the scientific name of 'Geel schorpioenmos'. We want to reuse the query later on for other species. - Complete the function called `userflora_query_scientificname` in [`20190618/20190618_challenges.R`](https://github.com/inbo/coding-club/blob/master/src/20190618/20190618_challenges.R) to do it. The function has two input arguments: a connection to a table and a dutch plant name. The funcion should return the corresponding scientificname. - Try to extend the function `userflora_dutch_to_scientificname` to work on partial matches, i.e. search for all taxa CONTAINING the input dutch plant name in column `NaamNederlands`. For example, searching all dutch names containing the string `sterkranswier`. Tip: see https://dbplyr.tidyverse.org/articles/sql.html --- background-image: url(/assets/images/background_challenge_3.png) class: left, middle # Challenge 3 - Get taxon groups: table `tblTaxonGroep` - Get relationship between the groups and the taxa in `taxon` - Try to add the group name (Naam) to `taxon` - Try also to count how many taxa are in each group --- class: center, middle ![:scale 100%](/assets/images/time_for_review.jpg) --- class: center, middle INBO Coding club goes to holiday... see you all back in August! ![:scale 70%](/assets/images/20190618/20190618_summerbreak.png) --- class: center, middle ![:scale 30%](/assets/images/coding_club_logo_1.png) Room: Herman Teirlinck - 01.71 - Frans Breziers
Date: __29/08/2019__, van 10:00 tot 12:00
Title: markdown your report
(registration announced via DG_useR@inbo.be)