Pizza Ratings

NA

Published

September 30, 2019

Notable topics: NA

Recorded on: 2019-09-30

Timestamps by: Alex Cookson

View code

Screencast

Timestamps

Transforming time into something more readable (from time value of seconds since Unix epoch [1970-01-01] ), then converting it into a date

fct_relevel

Formatting x-axis text so that it is rotated and readable, then re-ordering using fct_relevel function so that it is in its proper ordinal order

Converting string answers to integer counterparts to get an overall numeric value for how good each place is

Commentary on speed of mutate calculation within or without a group (non-grouped is slightly faster)

fct_reorder

Re-ordering groups by total votes using fct_reorder function, while still maintaining the groups themselves

glue
glue

Using glue package to combine place name and total respondents

Using statistical test to give confidence intervals on average score

t.test

Actually using the t.test function with toy example

Using weighted linear model instead (which doesn't end up working)

rep

Using custom function with rep function to get vector of repeated scores (sneaky way of weighting) so that we can perform a proper t-test

Summarizing t-test function into a list (alternative to nesting)

geom_errorbarh

Adding error bars using geom_errorbarh to make a TIE fighter plot that shows confidence intervals

Bringing in additional data from Barstool ratings (to supplement survey of Open R meetup NY)

Getting survey data to the place level so that we can add an additional dataset

Checking for duplicates in the joined data

Calling off the planned analysis due to low sample sizes (too much noise, not enough overlap between datasets)

Looking at Barstool data on its own

Renaming all variables with a certain string pattern in them

Comparing Dave's reviews with all other critics

geom_abline

Adding geom_abline showing x = y as comparison for geom_smooth linear model line

Changing the location of the aes() to change what the legend icons look like for size aesthetic