forked from DACSS/601_Fall_2022
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchallenge1.qmd
More file actions
69 lines (50 loc) · 2.12 KB
/
challenge1.qmd
File metadata and controls
69 lines (50 loc) · 2.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
---
title: "Challenge 1"
author: "Emily Duryea"
desription: "Reading in data and creating a post"
date: "11/25/2022"
format:
html:
toc: true
code-fold: true
code-copy: true
code-tools: true
categories:
- challenge_1
- birds
---
```{r}
#| label: setup
#| warning: false
#| message: false
library(tidyverse)
knitr::opts_chunk$set(echo = TRUE, warning=FALSE, message=FALSE)
```
## Challenge Overview
Today's challenge is to
1) read in a dataset, and
2) describe the dataset using both words and any supporting information (e.g., tables, etc)
## Read in the Data
Read in one (or more) of the following data sets, using the correct R package and command.
- railroad_2012_clean_county.csv ⭐
- birds.csv ⭐⭐
- FAOstat\*.csv ⭐⭐
- wild_bird_data.xlsx ⭐⭐⭐
- StateCounty2012.xls ⭐⭐⭐⭐
Find the `_data` folder, located inside the `posts` folder. Then you can read in the data, using either one of the `readr` standard tidy read commands, or a specialized package such as `readxl`.
```{r}
# Importing the data file
library(readr)
birds <- read_csv("_data/birds.csv")
View(birds)
```
Add any comments or documentation as needed. More challenging data sets may require additional code chunks and documentation.
## Describe the data
Using a combination of words and results of R commands, can you provide a high level description of the data? Describe as efficiently as possible where/how the data was (likely) gathered, indicate the cases and variables (both the interpretation and any details you deem useful to the reader to fully understand your chosen data).
```{r}
#| label: summary
summary(birds)
count(birds, Item)
count(birds, Area)
```
This dataset includes 30,977 rows, with 14 columns. It contains data on 5 categories of birds from 248 countries. Across those 248 countries, 13,074 are chickens, 6,909 are ducks, 5,693 are turkeys, 4,136 are geese and guinea fowls, and 1,165 are pigeons and other birds. Some countries contain a large portion of those entries (e.g., France, Egypt, and Greece, with 290), while others have very few (e.g., Luxembourg with 19, Montenegro with 13, and Sudan with 7).