Skip to content

Update main_analysis.py by enhancing the styling for streamlit #417

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 22 additions & 22 deletions streamlit/main_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def main_analysis(df):
annual_salary_top_text = """
<div class='analysis-container-extra'>
<div class='analysis-title'>Analysis: Distribution of Annual Salary for Top Countries</div>
<div class='analysis-text' style="color: red; font-weight: bold;">
<div class='analysis-text' style="color: #1E3A8A; font-weight: bold;">
Overall, the country which has the highest mean annual salary is the United States of America(240,000) Dollars. The second highest country which provides the highest mean salary is Australia(164,926) Dollars. Though India has a higher number of respondents, it has the lowest mean salary of $25,213.We can understand that the mean salary of a developed country is much higher than that of a developing country.
</div>
</div>
Expand All @@ -76,7 +76,7 @@ def main_analysis(df):
geographical_text = """
<div class='analysis-container'>
<div class='analysis-title'>Analysis: Geographical plot to show number of respondents in each country</div>
<div class='analysis-text' style="color: red; font-weight: bold;">
<div class='analysis-text' style="color: #1E3A8A; font-weight: bold;">
The geographical plot shows the number of respondents by country, with the United States having the highest participation. Other countries with significant participation include India, Brazil, and several European nations. The intensity of color represents the number of respondents, with darker shades indicating higher numbers.
</div>
</div>
Expand All @@ -92,7 +92,7 @@ def main_analysis(df):
income_gender_text = """
<div class='analysis-container'>
<div class='analysis-title'>Analysis: Income vs Gender</div>
<div class='analysis-text' style="color: red; font-weight: bold;">
<div class='analysis-text' style="color: #1E3A8A; font-weight: bold;">
There is a little bit of difference between Gender and income they received respectively.
Men tend to receive more salary than women from the above analysis.
</div>
Expand All @@ -109,7 +109,7 @@ def main_analysis(df):
Ethnicity_text = """
<div class='analysis-container'>
<div class='analysis-title'>Analysis: Ethnicity vs Participation</div>
<div class='analysis-text' style="color: red; font-weight: bold;">
<div class='analysis-text' style="color: #1E3A8A; font-weight: bold;">
From the Survey Analysis, more participation has been happened from White or of European Ethnicity.
The least has been recorded as only 0.16% from Indigenous. The second top survey contributors are from South Asians which is 11.93% of the respondents..
</div>
Expand All @@ -126,7 +126,7 @@ def main_analysis(df):
age_text = """
<div class='analysis-container-extra'>
<div class='analysis-title'>Analysis: Distribution of respondents based on age</div>
<div class='analysis-text' style="color: red; font-weight: bold;">
<div class='analysis-text' style="color: #1E3A8A; font-weight: bold;">
Late twenties respondents are clearly dominating the survey responses. It could be the age-range of a typical user on StackOverflow website.
The graph is plotted in a descending order for better visuality, and understanding.
</div>
Expand All @@ -141,7 +141,7 @@ def main_analysis(df):
gender_top_country_text = """
<div style='margin-top: 400px !important' class='analysis-container'>
<div class='analysis-title'>Analysis: Men vs Women Participation</div>
<div class='analysis-text' style="color: red; font-weight: bold;">
<div class='analysis-text' style="color: #1E3A8A; font-weight: bold;">
Women participation is extremely low in the STEM field, compared to men. They are even less than 20% of total male population that is dominating the tech industry in almost all the countries.
</div>
</div>
Expand All @@ -163,7 +163,7 @@ def main_analysis(df):
education_salary_text = """
<div class='analysis-container-extra'>
<div class='analysis-title'>Analysis: Education Levels with Salary Levels</div>
<div class='analysis-text' style="color: red; font-weight: bold;">
<div class='analysis-text' style="color: #1E3A8A; font-weight: bold;">
As we can see, the respondents who have done Doctorate have the highest mean salary among all other education levels. Secondly, the respondents who have done Bachelors degree have more salary than that of Masters degree holders. This may be due to years of professional coding experience and due to the higher number of respondents in that category than that of Masters degree
<br>The most interesting is that the respondents who do not have any degree have a mean salary of $90k. This shows the improvement in online learning and advancement of technology that is shifting the company from relying on University degrees.
</div>
Expand All @@ -182,7 +182,7 @@ def main_analysis(df):
data_scientist_participation_text = """
<div style='margin-top: 400px !important' class='analysis-container'>
<div class='analysis-title'>Analysis: Data Scientist Market</div>
<div class='analysis-text' style="color: red; font-weight: bold;">
<div class='analysis-text' style="color: #1E3A8A; font-weight: bold;">
There are many data scientists who responded to the Stackoverflow survey. Most data scientists are from the US around 1,500-1700 people and it is 3 times higher than data scientists from India. Followed by Germany and the UK with 427 and 339 people respectively. The rest are Canada, France, Netherlands, Brazil, Russia, and Australia which have less than 200 data scientists.
</div>
</div>"""
Expand All @@ -207,7 +207,7 @@ def main_analysis_2(df, year):
jobsatis_text = """
<div style='margin-top: 400px !important' class='analysis-container'>
<div class='analysis-title'>Analysis: Data Scientist Market</div>
<div class='analysis-text' style="color: red; font-weight: bold;">
<div class='analysis-text' style="color: #1E3A8A; font-weight: bold;">
In 2019, the top three countries which have a highest mean annual salary of a data scientist are Ireland (275,851), Luxembourg (272,769), and the USA (265,211). Apart from that, the mean salary of the rest of the countries is less than (200,000) per year. Japan provides the highest mean annual salary among Asian countries (118,969)
Figures in Dollars $
</div>
Expand All @@ -223,7 +223,7 @@ def main_analysis_2(df, year):
LanguageDesireNextYear_text = """
<div class='analysis-container'>
<div class='analysis-title'>Analysis: Programming language desired to work</div>
<div class='analysis-text' style="color: red; font-weight: bold;">
<div class='analysis-text' style="color: #1E3A8A; font-weight: bold;">
In 2019, respondents said that they wanted to work in javascript is around more than 10 % and the fewer respond have a desire to work on VBA next year. People started to work in Haskell, Julia, and pearl in 2019 though the amount was less around 5% of people have the desire to work in those languages in 2021. Here, python is the 2nd one in which people have the desire to work in both 2019 and 2020.
<br>However, if we look at the big picture, Python has been constantly gaining significant popularity within the developers community for three consequent years, whereas JavaScript is either constant or decling in popularity.
</div>
Expand All @@ -238,7 +238,7 @@ def main_analysis_2(df, year):
devtype_text = """
<div style='margin-top: 400px !important' class='analysis-container'>
<div class='analysis-title'>Analysis: Distribution of surveyors based on their developer role</div>
<div class='analysis-text' style="color: red; font-weight: bold;">
<div class='analysis-text' style="color: #1E3A8A; font-weight: bold;">
Based on respondents responses the survey concluded that they wanted to work in JavaScript is around more than 10%, and fewer respondents have a desire to work on VBA next year. People started to work in Haskell, Julia, and Pearl in 2019, though the amount was less; around 5% of people have the desire to work in those languages in 2021. Here, Python is the 2nd one in which people have the desire to work in both 2019 and 2020.
<br>However, if we look at the big picture, Python has been constantly gaining significant popularity within the developer community for three consequent years, whereas JavaScript is either constant or declining in popularity.
</div>
Expand Down Expand Up @@ -269,7 +269,7 @@ def main_analysis_2(df, year):
data_scientist_participation_text = """
<div style='margin-top: 400px !important' class='analysis-container'>
<div class='analysis-title'>Analysis: Data Scientist Market</div>
<div class='analysis-text' style="color: red; font-weight: bold;">
<div class='analysis-text' style="color: #1E3A8A; font-weight: bold;">
There are many data scientists who responded to the Stackoverflow survey. Most data scientists are from the US around 1,500-1700 people and it is 3 times higher than data scientists from India. Followed by Germany and the UK with 427 and 339 people respectively. The rest are Canada, France, Netherlands, Brazil, Russia, and Australia which have less than 200 data scientists.
</div>
</div>"""
Expand All @@ -296,7 +296,7 @@ def main_analysis_2(df, year):
highest_paying_ds_text = """
<div style='margin-top: 400px !important' class='analysis-container'>
<div class='analysis-title'>Analysis: Data Scientist Market</div>
<div class='analysis-text' style="color: red; font-weight: bold;">
<div class='analysis-text' style="color: #1E3A8A; font-weight: bold;">
The top countries which have a highest mean annual salary of a data scientist are South Korea (253,315) in 2018,Ireland (275,851) in 2019, and the USA(118,863) in 2020. Apart from that, the mean salary of the rest of the countries is less than (200,000) per year. Japan provides the highest mean annual salary among Asian countries (118,969)
Figures in Dollars $
</div>
Expand All @@ -312,7 +312,7 @@ def main_analysis_2(df, year):
feature_jobsatis_text = """
<div style='margin-top: 400px !important' class='analysis-container'>
<div class='analysis-title'>Analysis: Features for Job Satisfaction</div>
<div class='analysis-text' style="color: red; font-weight: bold;">
<div class='analysis-text' style="color: #1E3A8A; font-weight: bold;">
The top 2 features negatively affecting Job Satisfaction are age, country. So, in the elderly ages, job satisfaction may decrease because of the personal expectation increases. In the same way, as the professional coding years are increasing, satisfaction may decrease.
Among the countries; most dissatisfied countries are Angolia, Rwanda, Krygyzstan, Sudan.
UndergradMajor and other Science, are mostly satisfied.
Expand All @@ -333,7 +333,7 @@ def common_analysis_2021_2022(df):
employment_text = """
<div class='analysis-container'>
<div class='analysis-title'>Analysis: DevType VS Salary</div>
<div class='analysis-text' style="color: red; font-weight: bold;">
<div class='analysis-text' style="color: #1E3A8A; font-weight: bold;">
Full-time developers are unsurprisingly the highest earners based on our bar graph.
Analysing the graph, fulltime students grap the second spot.
</div>
Expand All @@ -347,7 +347,7 @@ def common_analysis_2021_2022(df):
highest_paying = """
<div class='analysis-container'>
<div class='analysis-title'>Analysis: Highest Paying Data Scientist Countries</div>
<div class='analysis-text' style="color: red; font-weight: bold;">
<div class='analysis-text' style="color: #1E3A8A; font-weight: bold;">
The top three countries which have a highest mean annual salary of a data scientist are provided using the bar graph. Apart from that, the mean salary of the rest of the countries is less than (200,000) per year. Japan provides the highest mean annual salary among Asian countries (118,969)
Figures in Dollars $
</div>
Expand All @@ -361,7 +361,7 @@ def common_analysis_2021_2022(df):
employment_text = """
<div class='analysis-container'>
<div class='analysis-title'>Analysis: Employment VS Salary</div>
<div class='analysis-text' style="color: red; font-weight: bold;">
<div class='analysis-text' style="color: #1E3A8A; font-weight: bold;">
Full-time developers are unsurprisingly the highest earners based on our bar graph.
# Analysing the graph, fulltime students grap the second spot.
</div>
Expand All @@ -375,7 +375,7 @@ def common_analysis_2021_2022(df):
devtype_text = """
<div class='analysis-container'>
<div class='analysis-title'>Analysis: DevType VS Respondents</div>
<div class='analysis-text' style="color: red; font-weight: bold;">
<div class='analysis-text' style="color: #1E3A8A; font-weight: bold;">
Full-stack developers have always dominated the respondents, and this year was no different either.
Backend developers are following the full-stack. From the graph we can easily see that most of the developers are from full-stack developer, with many niche industry still waiting to be tapped into.
</div>
Expand All @@ -390,7 +390,7 @@ def common_analysis_2021_2022(df):
language_text = """
<div class='analysis-container'>
<div class='analysis-title'>Analysis: Languages Trend</div>
<div class='analysis-text' style="color: red; font-weight: bold;">
<div class='analysis-text' style="color: #1E3A8A; font-weight: bold;">
A lot of languages have been presented before us. Many of which seem to be still popular amongst developers.
StackOverflow asked what language they work with, and want to work with. Many users want to work with the same language they have worked with.
<br>However, if we look at the big picture, some of the languages are more popular than others. JavaScript, HTML/CSS, Python are leading the market.
Expand All @@ -407,7 +407,7 @@ def common_analysis_2021_2022(df):
database_base = """
<div class='analysis-container'>
<div class='analysis-title'>Analysis: Database Trend</div>
<div class='analysis-text' style="color: red; font-weight: bold;">
<div class='analysis-text' style="colo:#1E3A8A; font-weight: bold;">
A lot of databases have been presented before us. Many of which seem to be still popular amongst developers.
StackOverflow asked what databases they work with, and want to work with. Many users want to work with the same Database they have worked with.
<br>However, if we look at the big picture, almost all of the databases are similarly popular, with MySQL and postgresSQL leading.
Expand All @@ -422,8 +422,8 @@ def common_analysis_2021_2022(df):
with analysis3:
webframe_text = """
<div class='analysis-container'>
<div class='analysis-title'>Analysis: Webframes Trends</div>
<div class='analysis-text' style="color: red; font-weight: bold;">
<div class='analysis-title' >Analysis: Webframes Trends</div>
<div class='analysis-text' style="color: #1E3A8A; font-weight: bold;">
A lot of frameworks have been presented before us. Many of which seem to be still popular amongst developers.
StackOverflow asked what framework they work with, and want to work with. Many users want to work with the same framework they have worked with.
<br>However, if we look at the big picture, some of the frameworks are more popular than others. ReactJS, Express are clearly leading the market.
Expand Down