Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedJoin us at the 2025 Microsoft Fabric Community Conference. March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for $400 discount. Register now
This study aimed to investigate whether salaries increase with experience by conducting a simple regression analysis. The analysis was performed using Power BI's Python visualization tool. Below is a step-by-step explanation of the process.
The dataset used for this analysis was sourced from an Excel file, comprising two primary columns: "Experience" and "Salary." These variables were utilized to explore the relationship between employees' experience and their respective salaries.
To load the data into Power BI, the following steps were taken:
For data visualization, I employed Power BI’s Python script visualization tool. This tool provides flexible and powerful visualizations by enabling direct work with Python within Power BI.
# The following code to create a dataframe and remove duplicated rows is always executed and acts as a preamble for your script:
# dataset = pandas.DataFrame(tecrube, maas)
# dataset = dataset.drop_duplicates()
# Paste or type your script code here:
import matplotlib.pyplot as plt
import seaborn as sns
sns.set(rc={'figure.figsize':(10,7)})
sns.regplot(data=dataset, x="Experience", y="Salary")
plt.show()
The above code generated a visual regression analysis, assessing the relationship between Experience and Salary. Using Python's seaborn library, a regression line was plotted over the dataset to illustrate how salary changes with increasing experience.
The regression analysis revealed a positive correlation between experience and salary. The visualization indicated that more experienced employees tend to earn higher salaries. This type of analysis can be particularly useful for optimizing hiring and salary policies in an organization.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.