Skip to content

Commit 48b622e

Browse files
committed
updated home.py
1 parent 1b50962 commit 48b622e

File tree

2 files changed

+35
-37
lines changed

2 files changed

+35
-37
lines changed

streamlit/home.py

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from scipy.stats import norm
99
from scipy import stats
1010
import random
11-
import functions as func
11+
import functions as func
1212
import main_analysis as main
1313

1414
#######################################
@@ -17,7 +17,7 @@
1717

1818
st.set_page_config(layout='wide')
1919

20-
# Loading data files from the 'streamlit' directory using raw URLs
20+
# Loading data files from the 'streamlit' directory
2121
df = pd.read_csv('https://raw.githubusercontent.com/Recode-Hive/Stackoverflow-Analysis/main/streamlit/df2020.csv')
2222
df2018 = pd.read_csv('https://raw.githubusercontent.com/Recode-Hive/Stackoverflow-Analysis/main/streamlit/df2018.csv')
2323
full_data2018 = pd.read_csv('https://raw.githubusercontent.com/Recode-Hive/Stackoverflow-Analysis/main/streamlit/survey_results_sample_2018.csv')
@@ -28,12 +28,40 @@
2828
# Filter the 2020 dataframe
2929
df2020 = df[df['SalaryUSD'] < 200000]
3030

31-
# Load CSS file
32-
def local_css(file_name):
33-
with open(file_name) as f:
34-
st.markdown(f'<style>{f.read()}</style>', unsafe_allow_html=True)
31+
#######################################
32+
# CSS STYLING
33+
#######################################
34+
35+
css = """
36+
<style>
37+
.analysis-container {
38+
font-family: 'Courier New', Courier, monospace;
39+
background-color: #D8DEDF;
40+
padding: 15px;
41+
border-radius: 10px;
42+
margin-top: 150px;
43+
margin-bottom: 110px;
44+
}
45+
46+
.analysis-container-extra {
47+
font-family: 'Courier New', Courier, monospace;
48+
background-color: #D8DEDF;
49+
padding: 15px;
50+
border-radius: 10px;
51+
margin-top: 50px;
52+
margin-bottom: 20px;
53+
}
54+
55+
.analysis-title {
56+
font-size: 18px;
57+
font-weight: bold;
58+
color: #333333;
59+
margin-bottom: 10px;
60+
}
61+
</style>
62+
"""
3563

36-
local_css("https://raw.githubusercontent.com/Recode-Hive/Stackoverflow-Analysis/main/streamlit/style.css")
64+
st.markdown(css, unsafe_allow_html=True)
3765

3866
#######################################
3967
# DATA PREPARATION FOR VISUALISATION

streamlit/style.css

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy