Skip to content

Commit

Permalink
add exercise
Browse files Browse the repository at this point in the history
  • Loading branch information
ahasverus committed Nov 4, 2024
1 parent f4d4aab commit 414bf4f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ index_files/
sections/*.html
sections/*_files/
/.quarto/
PanTHERIA_*
gadm*
gbif*
23 changes: 21 additions & 2 deletions sections/exercise.qmd
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# {{< fa user-clock size=1x >}} &nbsp;&nbsp;Exercise (20 min)

## Coming soon
## Cleaning data

Work in progress...
**Part 1** - Clean the [PanTHERIA database](https://esajournals.onlinelibrary.wiley.com/doi/10.1890/08-1494.1) from the [previous exercise](https://biodiversitydata.github.io/data-access/#/accessing-data)

- use the function `readr::read_delim()` to import data
- select columns `MSW05_Binomial`, `5-1_AdultBodyMass_g`, `8-1_AdultForearmLen_mm` & `3-1_AgeatFirstBirth_d`
- rename columns in `pan_binomial_name`, `pan_adult_body_mass_g`, `pan_adult_forearm_len_mm` & `pan_age_at_first_birth_d`
- replace `-999` by `NA`

<br/>


**Part 2** - Create a reference table from GBIF occurrences downloaded [previously](https://biodiversitydata.github.io/data-access/#/accessing-data)

- remove all columns except `scientificName`
- remove duplicated rows
- clean binomial names (remove authors)

<br/>


**Part 3** - Merge this table with PanTHERIA (cleaned) to add trait values to these two species

0 comments on commit 414bf4f

Please sign in to comment.