1 STAT3622 DATA VISUALIZATION Assignment 3, due on April 12 Use R for Question 1 and Python for Question 2. Attach all the codes. 1. For each question, first show the plots and then interpret them. (a) Use the R package “rvest” to scrape tables of the global 100 brands from 2011 to 2021 (https://brandirectory.com/rankings/global/table). (b) Show the interactive pie chart of number of brands by country in 2021. (c) Show the animated pie chart of number of brands by country from 2011 to 2021. (d) Show the interactive bubble chart of the brand ranking in 2020 versus 2021, where the size of the bubble represents the brand value. Fill bubbles with colors according to “Sector”. (e) Use the R package “dygraphs” to show the interactive time series plots of values of Apple, Google, Amazon, and Microsoft from 2011 to 2021. 2. Use Dash to develop an APP with similar layouts and functions as shown in Figures 1–5. (a) Complete the “layout” part of the python file (hw3 starter code.py). Show your name and ID in the APP. (b) Complete the “callback” part of the file (hw3 starter code.py). The APP should include two key functions. First, users can choose different years and attributes for geographical visualization. Sec- ond, users can specify the data for the Bar chart by selecting different regions in the choropleth map. Please attach the python file (.py) and also embed the code into a pdf file along with five screenshots of the APP to illustrate the layouts or functions. Note that you need to distinguish your solution from the picture given below. For example, you can change the color of the bars to different color. 2 Figure 1: Illustration of the APP layout 3 Figure 2: Illustration of the APP layout Figure 3: Illustration of the APP layout 4 Figure 4: Illustration of the APP function 1 Figure 5: Illustration of the APP function 2
欢迎咨询51作业君