Importing clean dataset into R.
[1] "Product" "Year" "Month" "Price_Dollar"
dim(Poultry)
[1] 600 4
head(Poultry)
Product Year Month Price_Dollar
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
Product Year Month Price_Dollar
1 B/S Breast 2013 January 7.0375
2 B/S Breast 2013 February 7.0375
3 B/S Breast 2013 March 7.0375
4 B/S Breast 2013 April 7.0375
5 B/S Breast 2013 May 7.0375
6 B/S Breast 2013 June 7.0375
Product Year Month Price_Dollar
229 Bone-in Breast 2004 July 3.905
230 Bone-in Breast 2004 August 3.905
231 Bone-in Breast 2004 September 3.905
232 Bone-in Breast 2004 October 3.905
233 Bone-in Breast 2004 November 3.905
234 Bone-in Breast 2004 December 3.905
Product Year Month Price_Dollar
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
Product Year Month Price_Dollar
354 Thighs 2004 July 1.995
355 Thighs 2004 August 1.995
356 Thighs 2004 September 1.995
357 Thighs 2004 October 1.995
358 Thighs 2004 November 1.995
359 Thighs 2004 December 1.995
Poultry %>%
filter(Price_Dollar < 3) %>%
arrange(desc(Year, Price_Dollar)) -> Cheap_poultry
ggplot(data = Cheap_poultry) +
geom_smooth(mapping = aes(x = Year, y = Price_Dollar), se = FALSE)
Poultry %>%
filter(Price_Dollar > 3) %>%
arrange(desc(Year, Price_Dollar)) -> expensive_poultry
ggplot(data = expensive_poultry) +
geom_smooth(mapping = aes(x = Year, y = Price_Dollar), se = FALSE)
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
campbell (2022, Feb. 9). Data Analytics and Computational Social Science: Ethan Campbell HW2. Retrieved from https://github.com/DACSS/dacss_course_website/posts/httpsrpubscomethancampbell864073/
BibTeX citation
@misc{campbell2022ethan, author = {campbell, Ethan}, title = {Data Analytics and Computational Social Science: Ethan Campbell HW2}, url = {https://github.com/DACSS/dacss_course_website/posts/httpsrpubscomethancampbell864073/}, year = {2022} }