Use R studio install the aida package via: install packages("remotes") remotes::install_github("michael-franke/aida-package") library(aida) glimpse(data_avocado) Rows: 18,249...

70.2K

Verified Solution

Question

Finance

image
image
image
image
Use R studio install the aida package via: install packages("remotes") remotes::install_github("michael-franke/aida-package") library(aida) glimpse(data_avocado) Rows: 18,249 Columnst 7 $ Date 2015-12-27, 2015-12-20, 2015-12-13, 2015-12-06, 2012 S average price 1.33, 1.35, 0.93, 1.08, 1.28, 1.26, 0.99, 0.98, 1.02 $ total_volume_sold 64236.62, 54876.98, 118220.22, 78992.15, 51039.60, 5... $ small 1036.74, 674.28, 794.70, 1132.00, 941.48, 1184.27, 1.. $ medium 54454.85, 44638.81, 109149.67, 71976.41, 43838.39, 4 $ large 48.16, 58.33, 130.50, 72.58, 75.78, 43.61, 93.26, 80- $ type conventional", "conventional", conventional", "con. data_avocado > arrange (Date) > head() > kable( . ) > kable_styling() Date average price total_volume sold small medium large type 2015-01-04 1.22 40873.28 2819.50 28287.42 49.90 conventional 2015-01-04 1.00 435021.49 364302.39 23821.16 82.15 conventional 2015-01-04 1.08 788025.06 53987.31 552906.04 39995.03 conventional 2015-01-04 1.01 80034.32 44562.12 24964.23 2752.35 conventional 2015-01-04 1.02 491738.00 7193.87 396752.18 128.82 conventional 2015-01-04 1.40 116253.44 3267.97 55693.04 109.55 conventional Each row in the dataset contains information on the price and volume (in pounds) of avocados sold from one outlet on a particular date for a particular type of avocado (organic or conventional). The variables in the data set for each outlet one each date are as follows: Variable name Variable description schr> Date Date of price measurement average_price Average price per avocado of all avocados sold total_volume_sold Total volume of avocados sold small Total volume of small avocados sold mediurn Total volume of medium avocados sold large Total of large avocados sold type Type of avocado (organic or conventional) 7 rows Panel (a) 1-07- total_volume_sold 1e.08 - 1e05- 2015 2016 2017 2018 Date Panel (b) TOT- total_volume_sold 1.08 - Te-05- 2015 2016 2018 2017 Date Plots of total volume sold over time The Figure above shows two different panels comparing how the total volume sold of conventional avocados change over time (note that both plots are plotted on a log scale). a)Which of the two panels, (a) or (b), best shows the pattern of total volume sold? Explain your answer. b)Would a 2D histogram make sense to use for summarizing this particular relationship? Briefly explain why or why not c)Below is the line of code that generated the plot in panel (b). Change the line of code below so that it produces a pair plots that contains total_volume_sold for both conventional and organic separately over time (i.e. in different plotting areas of the same plot). S 99plot(data_avocado >1 filter (type='conventional"), aen (x-Date.yutotal_volume_wold, group-Date)) + geom_boxplot() + ggtitle("Panel (b)")+ scale_y_log100) d)Why can't you use the data avocado object to plot the total volume sold by the size of the avocados using the same figure in c)? Explain why and then write a line of code which would allow you to generate the necessary object which could then be used to make such a plot (you don't need to include the code for the plot). Use R studio install the aida package via: install packages("remotes") remotes::install_github("michael-franke/aida-package") library(aida) glimpse(data_avocado) Rows: 18,249 Columnst 7 $ Date 2015-12-27, 2015-12-20, 2015-12-13, 2015-12-06, 2012 S average price 1.33, 1.35, 0.93, 1.08, 1.28, 1.26, 0.99, 0.98, 1.02 $ total_volume_sold 64236.62, 54876.98, 118220.22, 78992.15, 51039.60, 5... $ small 1036.74, 674.28, 794.70, 1132.00, 941.48, 1184.27, 1.. $ medium 54454.85, 44638.81, 109149.67, 71976.41, 43838.39, 4 $ large 48.16, 58.33, 130.50, 72.58, 75.78, 43.61, 93.26, 80- $ type conventional", "conventional", conventional", "con. data_avocado > arrange (Date) > head() > kable( . ) > kable_styling() Date average price total_volume sold small medium large type 2015-01-04 1.22 40873.28 2819.50 28287.42 49.90 conventional 2015-01-04 1.00 435021.49 364302.39 23821.16 82.15 conventional 2015-01-04 1.08 788025.06 53987.31 552906.04 39995.03 conventional 2015-01-04 1.01 80034.32 44562.12 24964.23 2752.35 conventional 2015-01-04 1.02 491738.00 7193.87 396752.18 128.82 conventional 2015-01-04 1.40 116253.44 3267.97 55693.04 109.55 conventional Each row in the dataset contains information on the price and volume (in pounds) of avocados sold from one outlet on a particular date for a particular type of avocado (organic or conventional). The variables in the data set for each outlet one each date are as follows: Variable name Variable description schr> Date Date of price measurement average_price Average price per avocado of all avocados sold total_volume_sold Total volume of avocados sold small Total volume of small avocados sold mediurn Total volume of medium avocados sold large Total of large avocados sold type Type of avocado (organic or conventional) 7 rows Panel (a) 1-07- total_volume_sold 1e.08 - 1e05- 2015 2016 2017 2018 Date Panel (b) TOT- total_volume_sold 1.08 - Te-05- 2015 2016 2018 2017 Date Plots of total volume sold over time The Figure above shows two different panels comparing how the total volume sold of conventional avocados change over time (note that both plots are plotted on a log scale). a)Which of the two panels, (a) or (b), best shows the pattern of total volume sold? Explain your answer. b)Would a 2D histogram make sense to use for summarizing this particular relationship? Briefly explain why or why not c)Below is the line of code that generated the plot in panel (b). Change the line of code below so that it produces a pair plots that contains total_volume_sold for both conventional and organic separately over time (i.e. in different plotting areas of the same plot). S 99plot(data_avocado >1 filter (type='conventional"), aen (x-Date.yutotal_volume_wold, group-Date)) + geom_boxplot() + ggtitle("Panel (b)")+ scale_y_log100) d)Why can't you use the data avocado object to plot the total volume sold by the size of the avocados using the same figure in c)? Explain why and then write a line of code which would allow you to generate the necessary object which could then be used to make such a plot (you don't need to include the code for the plot)

Answer & Explanation Solved by verified expert
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students