A data scientist is building a forecasting model for a retail company by using the most recent 5 years of sales records that are stored in a data warehouse. The dataset contains sales records for each of the company's stores across five commercial regions The data scientist creates a working dataset with StorelD. Region. Date, and Sales Amount as columns. The data scientist wants to analyze yearly average sales for each region. The scientist also wants to compare how each region performed compared to average sales across all commercial regions.
Which visualization will help the data scientist better understand the data trend?
The best visualization for this task is to create a bar plot, faceted by year, of average sales for each region and add a horizontal line in each facet to represent average sales. This way, the data scientist can easily compare the yearly average sales for each region with the overall average sales and see the trends over time. The bar plot also allows the data scientist to see the relative performance of each region within each year and across years. The other options are less effective because they either do not show the yearly trends, do not show the overall average sales, or do not group the data by region.
References:
pandas.DataFrame.groupby --- pandas 2.1.4 documentation
pandas.DataFrame.plot.bar --- pandas 2.1.4 documentation
Matplotlib - Bar Plot - Online Tutorials Library
Zona
5 months agoOretha
5 months agoHoa
5 months agoJuliann
5 months agoTomoko
6 months agoCiara
6 months agoDorothy
6 months agoCiara
6 months agoAudra
7 months agoMarjory
7 months agoAntonette
7 months agoFrance
7 months agoRima
7 months agoMaddie
7 months agoXochitl
7 months agoEdda
6 months agoDusti
7 months agoJoanna
7 months agoLaura
7 months agoBelen
7 months agoRessie
7 months agoMinna
7 months agoLucia
7 months agoEleni
7 months agoTony
5 months agoMichel
6 months agoLore
6 months agoPura
6 months agoFarrah
7 months ago