An introduction to analysing data and text with R
Show and tell
Read anything related to data or journalism recently? Please add links here! Stories, analysis, announcements-- anything you think others might be interested in.
It might take a few minutes to complete. You will also need to download the data from here. Then you need to tell R Studio where to look for the data. In the folders list on the bottom right of the R Studio window find the winemag-data.csv file you just downloaded, then click the More button just above, and then Set As Working Directory.
An introduction to analysing data and text with R
Show and tell
Tutorial
install.packages(c('tidyverse', 'tidytext', 'maps'))
dataset <- read.csv("winemag-data.csv",
header = TRUE,
stringsAsFactors = FALSE,
encoding = "UTF-8")
counts <- francewines %>%
group_by(province) %>%
summarise(lat = lat, lon = lon, count = n(),
mean_price = mean(price, na.rm = TRUE),
mean_points = mean(points))
counts %>% glimpse()
counts <- francewines %>%
group_by(province) %>%
summarise(lat = mean(lat), lon = mean(lon), count = n(),
mean_price = mean(price, na.rm = TRUE),
mean_points = mean(points))
Next time