R

Jami H.

asked • 11/06/20

How do I create a new dataset when I need to add new variables?

5b. Time Series Average by Month and Year



You'll need to do a little data prep for this one:


- First figure out the top 5 reviewed coffee shops (by number of reviews ~ hint frequency of coffee_shop_name)

- Create a new dataset for containing those 5 shops, review month and year(numeric?), and the mean num_rating and mean vibe_sent

- The result should look something like this


Month_Year Coffee Shop Mean Rating Mean Vibe Sent

----------- ------------ ------------ ----------------

Jan 2017 Mike's Coffee 4.5 4.3


This is what I tried so far and I'm getting errors:


```{r}

yelp_prep %>%

count(coffee_shop_name)


top_five_coffee <-yelp_prep %>%

filter(coffe_shop_name=="The factory - Cafe with a Soul","Halcyon","Epoch Coffee", "Caffee Medici", "Houndstooth Coffee")

Bobosharif S.

Hi, where is your data? You have to arrange data be review, say asc, then just select the top 5,
Report

11/12/20

1 Expert Answer

By:

Muhammad R. answered • 02/08/21

Tutor
5 (40)

ISU Grad For Statistics, R and ArcGIS Tutoring

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.