A data scientist has sales data by StoreID, Region, Date, and Sales Amount and wants to analyze yearly average sales for each region and compare each region’s performance to the overall regional average. Which visualization will best show the trend and regional comparisons?
Choose an answer
Tap an option to check your answer.
Correct answer: Aggregate average yearly sales per region with Pandas GroupBy. Make a bar plot faceted by year showing average sales for each region, and add a horizontal line in each facet to show the overall average across regions..
Why this is the answer
The correct option directly addresses the user's goal of analyzing yearly average sales for each region and comparing each region's performance to the overall regional average. Aggregating by region first (using Pandas GroupBy) is essential. A bar plot faceted by year allows for easy comparison of regional performance across different years. Adding a horizontal line for the overall average within each yearly facet provides a clear visual benchmark for comparing individual region performance against the total. The other options are less suitable: Aggregating by store instead of region does not directly answer the question about regional performance. Adding an "extra bar" for the overall average can be visually cluttered and less intuitive than a horizontal reference line for comparison. Coloring bars by region without faceting by year would make yearly trend analysis difficult.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed