class: center, middle ![:scale 30%](/assets/images/coding_club_logo_1.png) # 23 APRIL 2019 ## INBO coding club Herman Teirlinck
01.70 - Ferdinand Peters --- class: center, middle ![:scale 90%](/assets/images/20190423/20190423_dplyr_starters.png) --- class: center, middle ![:scale 90%](/assets/images/20190423/20190423_cheat_sheet_dplyr_preview.png)
[`dplyr` cheatsheet](https://github.com/inbo/coding-club/blob/master/cheat_sheets/20181129_cheat_sheet_data_transformation.pdf) --- 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/f_obNpkVSRedTcb19kP8Og
--- background-image: url(/assets/images/background_challenge_1.png) class: left, middle # Challenge 1 - Click [`20190423/20190423_species.csv`](https://github.com/inbo/coding-club/blob/master/data/20190423/20190423_species.csv) and download* data file to `./data` folder. - Click [`20190423/20190423_challenges.R`](https://github.com/inbo/coding-club/blob/master/src/20190423/20190423_challenges.R) and download* script in `./src` folder.
* __Note__: check the getting started instructions on [how to download a single file](https://inbo.github.io/coding-club/gettingstarted.html#each-session-setup)
- Open the [`20190423/20190423_challenges.R`](https://github.com/inbo/coding-club/blob/master/src/20190423/20190423_challenges.R) file. - Extract the columns: `scientificName, decimalLatitude, decimalLongitude, coordinateUncertaintyInMeters, eventDate, year, identifiedBy, speciesKey and issue` for the observations... - observed in June - from either `Lycopus europaeus`, `Phragmites australis`, `Cymatia bonsdorffi` or `Lemna minor` - where column `issue` is `NA` --- background-image: url(/assets/images/background_challenge_2.png) class: left, middle # Challenge 2 - In the `occs` data.frame, create a new column, called `grid_resolution_km`, by calculating the grid resolution based on the `coordinateUncertaintyInMeters` information. To get the grid resolution from the uncertainty in meter use the following: `gridresolution = sqrt(2) * coordinateUncertaintyInMeters/1000` - Sort the columns from newest to oldest observation --- background-image: url(/assets/images/background_challenge_3.png) class: left, middle # Challenge 3 - In the `occs` data.frame, how many observations (count the number of rows) are available _for each_ year? --- background-image: url(/assets/images/background_challenge_3.png) class: left, middle # Challenge 3 - BONUS - Click [`20180222/20180222_surveys.csv`](https://github.com/inbo/coding-club/blob/master/data/20180222/20180222_surveys.csv) and download data file to `./data` folder. - Calculate the median weight, mean weight and number of records _for each_ identifier in the `species_id` column
* __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: center, middle ![:scale 100%](/assets/images/time_for_review.jpg) --- class: center, middle ![:scale 30%](/assets/images/coding_club_logo_1.png) Room: Herman Teirlinck - 01.70 - Frans Breziers
Date: __23/05/2019__, van 10:00 tot 12:00
(registration announced via DG_useR@inbo.be)