Submission for Homework 2
For this homework, I read in the poultry_tidy dataset. A glimpse of the dataset, obtained using head() method can be found below:
library("readxl")
poultry_data <- read_excel(path="C:/Users/gbsam/Desktop/poultry_tidy.xlsx")
head(poultry_data)
# A tibble: 6 x 4
Product Year Month Price_Dollar
<chr> <dbl> <chr> <chr>
1 Whole 2013 January 2.385
2 Whole 2013 February 2.385
3 Whole 2013 March 2.385
4 Whole 2013 April 2.385
5 Whole 2013 May 2.385
6 Whole 2013 June 2.385
There are 4 variables in this data set. The columns Product, Month and Price_Dollars are character strings, and column year is double precision floating point number.
I filter out the poultry items that are less that 3 dollars in price sold in month January. And then arrange them by ascending order of year sold.
# A tibble: 21 x 4
Product Year Month Price_Dollar
<chr> <dbl> <chr> <chr>
1 B/S Breast 2004 January 6.455
2 Bone-in Breast 2004 January NA
3 Thighs 2004 January NA
4 B/S Breast 2005 January 6.44
5 Bone-in Breast 2005 January 3.905
6 B/S Breast 2006 January 6.455
7 Bone-in Breast 2006 January 3.905
8 B/S Breast 2007 January 6.455
9 Bone-in Breast 2007 January 3.905
10 B/S Breast 2008 January 6.455
# ... with 11 more rows
Text and figures are licensed under Creative Commons Attribution CC BY-NC 4.0. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".
For attribution, please cite this work as
Barlaya (2021, Dec. 30). Data Analytics and Computational Social Science: Homework 2 : Samhith Barlaya. Retrieved from https://github.com/DACSS/dacss_course_website/posts/httpsrpubscomsbarlaya851735/
BibTeX citation
@misc{barlaya2021homework, author = {Barlaya, Samhith}, title = {Data Analytics and Computational Social Science: Homework 2 : Samhith Barlaya}, url = {https://github.com/DACSS/dacss_course_website/posts/httpsrpubscomsbarlaya851735/}, year = {2021} }