Challenge 1 pits us unfortunate students up against two tasks:
read in a dataset, and
describe the dataset using both words and any supporting information (e.g., tables, etc)
Code
wbirds <-read_xlsx("../posts/_data/wild_bird_data.xlsx",skip=1) # read in datashowing <-42
I chose to read in wild_bird_data.xlsx, because wild birds are exciting. The wild bird file includes two rows of headings. I skipped the first row to tidy up my tibble, but it tells us that the data source is “Figure 1 of Nee et al.” That led me to this May 1991 Nature article: The relationship between abundance and body size in British birds
The wild bird data set includes 146 observations under 2 variables. Here are the top 42 observations of British birds – not just any wild birds:
The Wet body weight [g] variable has 0 null values.
The Population size variable has 0 null values.
Here’s the summary:
Code
summary(wbirds)
Wet body weight [g] Population size
Min. : 5.459 Min. : 5
1st Qu.: 18.620 1st Qu.: 1821
Median : 69.232 Median : 24353
Mean : 363.694 Mean : 382874
3rd Qu.: 309.826 3rd Qu.: 198515
Max. :9639.845 Max. :5093378
Source Code
---title: "Challenge 1"author: "Tim Shores"desription: "Reading in data and creating a post"date: "02/25/2023"format: html: toc: true code-fold: true code-copy: true code-tools: truecategories: - challenge_1 - wildbirds---```{r}#| label: setup#| warning: false#| message: falsemy_packages <-c("dplyr", "magrittr", "readxl", "summarytools") # create vector of packagesinvisible(lapply(my_packages, require, character.only =TRUE)) # load multiple packagesknitr::opts_chunk$set(echo =TRUE, warning=FALSE, message=FALSE)```## My contentChallenge 1 pits us unfortunate students up against two tasks:1) read in a dataset, and2) describe the dataset using both words and any supporting information (e.g., tables, etc)```{r}wbirds <-read_xlsx("../posts/_data/wild_bird_data.xlsx",skip=1) # read in datashowing <-42```I chose to read in wild_bird_data.xlsx, because wild birds are *exciting*. The wild bird file includes two rows of headings. I skipped the first row to tidy up my tibble, but it tells us that the data source is "Figure 1 of Nee et al." That led me to this May 1991 Nature article: [The relationship between abundance and body size in British birds](https://www.nature.com/articles/351312a0)The wild bird data set includes **`r nrow(wbirds)`** observations under **`r ncol(wbirds)`** variables. Here are the top **`r showing`** observations of British birds -- not just *any* wild birds:```{r}print(wbirds, n=showing)wb_col1_null <- wbirds %>%select(names(wbirds)[1]) %>%n_distinct(.)wb_col2_null <- wbirds %>%select(names(wbirds)[2]) %>%n_distinct(.)```The *`r names(wbirds)[1]`* variable has `r nrow(wbirds) - wb_col1_null` null values.The *`r names(wbirds)[2]`* variable has `r nrow(wbirds) - wb_col2_null` null values.Here's the summary:```{r}summary(wbirds)```