Code
library(tidyverse)
library(readr)
knitr::opts_chunk$set(echo = TRUE, warning=FALSE, message=FALSE)Sanjana Jhaveri
October 9, 2022
Today’s challenge is to
read in a dataset, and
describe the dataset using both words and any supporting information (e.g., tables, etc)
Read in one (or more) of the following data sets, using the correct R package and command.
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.
Add any comments or documentation as needed. More challenging data sets may require additional code chunks and documentation.
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).
# A tibble: 1 × 3
   mean   max   min
  <dbl> <dbl> <dbl>
1  87.2  8207     1##I found the mean, max and min for the total employees column. Meaning that in one county and one state the minimum number of employees working is just 1. For maybe a bigger county, the maximum number of employees 8,207. But taking all the counties (big and small) the average number of employees working is 87.
---
title: "Challenge 1"
author: "Sanjana Jhaveri"
desription: "Reading in data and creating a post"
date: "10/09/2022"
format:
  html:
    toc: true
    code-fold: true
    code-copy: true
    code-tools: true
categories:
  - challenge_1
  - railroads
  - faostat
  - wildbirds
---
```{r}
#| label: setup
#| warning: false
#| message: false
library(tidyverse)
library(readr)
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}
railroads <- read_csv("_data/railroad_2012_clean_county.csv")
```
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}
summarize(railroads, mean = mean(total_employees), max = max(total_employees), min = min(total_employees))
```
##I found the mean, max and min for the total employees column. Meaning that in one county and one state the minimum number of employees working is just 1. For maybe a bigger county, the maximum number of employees 8,207. But taking all the counties (big and small) the average number of employees working is 87.
```{r}
sum(railroads$total_employees)
```
## I also found the total number of employees working in every state and every county which is 255,432 people.