Code
library(tidyverse)
Error in library(tidyverse): there is no package called 'tidyverse'
Code
::opts_chunk$set(echo = TRUE, warning=FALSE, message=FALSE) knitr
Aditya Salveru
April 12, 2023
Error in library(tidyverse): there is no package called 'tidyverse'
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
.
Error in library(readr): there is no package called 'readr'
Error in read_csv("_data/railroad_2012_clean_county.csv", show_col_types = FALSE): could not find function "read_csv"
Error in eval(expr, envir, enclos): object 'railroad' not found
[1] "Num rows :"
Error in nrow(railroad): object 'railroad' not found
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).
The data consists of 3 cols viz. state, county and employee count. There are a total of 2930. The data most likely is gathered from a survery conducted across the country.
[1] "dimensions of data : "
Error in eval(expr, envir, enclos): object 'railroad' not found
[1] "Column Names : "
Error in is.data.frame(x): object 'railroad' not found
---
title: "Challenge 1"
author: "Aditya Salveru"
desription: "Reading in data and creating a post"
date: "04/12/2023"
format:
html:
toc: true
code-fold: true
code-copy: true
code-tools: true
categories:
- challenge_1
- railroads
---
```{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}
library(readr)
railroad <- read_csv("_data/railroad_2012_clean_county.csv",show_col_types = FALSE)
railroad
```
```{r}
print("Num rows :")
print(nrow(railroad))
```
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).
The data consists of 3 cols viz. state, county and employee count.
There are a total of 2930. The data most likely is gathered from a survery conducted across the country.
```{r}
print("dimensions of data : ")
dim(railroad)
print("Column Names : ")
colnames(railroad)
```
```{r}
filter(railroad, state == "AL", county=="HOUSTON")
```