💾 Archived View for gemlog.blue › users › cariboudatascience › 1615521381.gmi captured on 2023-04-19 at 23:51:40. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2021-12-04)

-=-=-=-=-=-=-

Cereals Consumption By Type (Kilocalories/person/year) [Part 3]

Data Source

Begin Code

library(ggplot2)
library(scales)
library(dplyr)
library(tidyr)
library(readr)
library(flextable)
library(dlookr)

Table of Summary Statistics

cereals <- read.csv("./DATA/per-capita-consumption-of-cereals-by-commodity-type-daily-kilocalories.csv")

colnames(cereals) <- c("Country","Code","Year","Wheat","Rice","Barley","Maize","Rye","Oats","Sorghum")

dlookr::diagnose_numeric(cereals) %>% flextable()

=> https://github.com/davidjayjackson/OWID-cereals-by-commodity/blob/master/cereals_05.png Summary Stats

world_longer <- cereals %>% filter(Country =="World") %>% select(-Code) %>%

pivot_longer(cols = Wheat:Sorghum)

### Histograms by Cereals Type

ggplot(world_longer) + geom_histogram(aes(x=value),bins=10) +

facet_wrap(~name) + labs(title="Count of Calories by Cereals")

=> https://github.com/davidjayjackson/OWID-cereals-by-commodity/blob/master/cereals_06.png Histogram by Cereals Type

### Resources:
=> https://github.com/davidjayjackson/OWID-cereals-by-commodity R Code and Data
=> https://cloud.r-project.org/ R Language and Rtools40 (click and "base" and "Rtools")
=> https://rstudio.com/products/rstudio/download/ Download and install RStudio
=> https://github.com/davidjayjackson/OWID-diet-vegetable-fruit/issues Comments, Question and Request