# 230|PYTHON – Data Visualization Seaborn

**URL:** <https://www.techhub.training/t/230-python-data-visualization-seaborn/2718>\
**Category:** Challenges\
**Tags:** intermediate, python, seaborn\
**Created:** [May 22, 2024, 8:08pm UTC](https://www.techhub.training/t/230-python-data-visualization-seaborn/2718 "2024-05-22T20:08:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Carter\_Lee](https://sea2.discourse-cdn.com/flex016/user_avatar/www.techhub.training/carter_lee/32/5482_2.png) [@Carter\_Lee](https://www.techhub.training/u/Carter_Lee)\
**Post date:** [May 22, 2024, 8:08pm UTC](https://www.techhub.training/t/230-python-data-visualization-seaborn/2718/1 "2024-05-22T20:08:31Z")

</div>

_BYU Student Author_: @Carter_Lee  
_Reviewers_: @Kyle_Nilsen, @Jacob_Dutton  
_Estimated Time to Solve:_ 30 Time Minutes

We provide the solution to this challenge using:

- Python

Need a program? Click [here](https://www.techhub.training/t/information-about-software-used-on-techhub-training/138).

**Overview**  
A new fast food chain called MTasty has gathered data about each branch’s sales for the past year and has asked you to analyze the data and present the important statistics by month. MTasty has specifically asked you to present the data with a visualization.

**Instructions**

- Create a new python file and import the following libaries; pandas, matplotlib and seaborn.
- Read the CSV file into a DataFrame
- Extract the profit data for each month from the DataFrame. You can use indexing to select the columns containing the profit data.
- Use Matplotlib to create a line plot of the profit for each month. You can plot each month’s profit as a separate line on the graph.
- Use Seaborn’s scatterplot() function to create a scatterplot of the profit for each month. Specify the DataFrame, x-axis (month), y-axis (profit), and hue (location) parameters.
- Export each graph

**Data Files**

- [Challenge230\_ Finding\_Salary\_Increase\_dataset.xlsx](https://byu.box.com/shared/static/4bb1ikmbvt2ppc94v7ytmlhmqwqcdt4j)

> **Suggestions and Hints**
>
> - Slicing the dataframe by separating cities by row using the function .set\_index(‘Location’, inplace=True)

**Solution**

- [Challenge230\_Solution.rtf](https://byu.box.com/shared/static/63w3tjindjst4norupe2oqh8d4mlmc04)
- _Solution Video:_ [Challenge 230|Excel – Finding Employee Salary Increase](https://youtu.be/KzGiaN1Dttg)

> **Scatter Plot**
>
> ![Challenge176_Scatter_Plot](https://us1.discourse-cdn.com/flex016/uploads/weeklytechchallenge/original/2X/4/440f1b91b7ef070daf6c03cf1737d8e73a907783.png)

> **Line Plot**
>
> ![Challenge176_Line](https://us1.discourse-cdn.com/flex016/uploads/weeklytechchallenge/original/2X/c/cb951a7bdc715964a3bd5a7d9efb729e208d5d1d.png)
