Make default scenario neutral
Browse files- app.py +10 -5
- src/assumptions.py +1 -0
app.py
CHANGED
|
@@ -102,8 +102,8 @@ with st.sidebar:
|
|
| 102 |
"Age range",
|
| 103 |
18,
|
| 104 |
70,
|
| 105 |
-
(
|
| 106 |
-
help="Narrows the pool by the selected age-band overlap.",
|
| 107 |
)
|
| 108 |
region_scope = st.selectbox(
|
| 109 |
"Region scope",
|
|
@@ -121,13 +121,13 @@ with st.sidebar:
|
|
| 121 |
"Minimum height, cm",
|
| 122 |
150,
|
| 123 |
205,
|
| 124 |
-
|
| 125 |
-
help="Interpolates a demo height-distribution coefficient.",
|
| 126 |
)
|
| 127 |
income_min_uah = st.select_slider(
|
| 128 |
"Minimum monthly income, UAH",
|
| 129 |
options=INCOME_THRESHOLD_OPTIONS_UAH,
|
| 130 |
-
value=
|
| 131 |
format_func=income_threshold_label,
|
| 132 |
help=(
|
| 133 |
"Scenario salary threshold. 0 means no income filter. Salary anchors: Work.ua current benchmark is about "
|
|
@@ -238,6 +238,11 @@ col_b.metric("Central estimate", format_count(estimate.central))
|
|
| 238 |
col_c.metric("Optimistic estimate", format_count(estimate.optimistic))
|
| 239 |
col_d.metric("Central share", format_percent(central_percent))
|
| 240 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 241 |
st.subheader("What narrows the pool")
|
| 242 |
step_df = pd.DataFrame(steps)
|
| 243 |
display_df = step_df.assign(
|
|
|
|
| 102 |
"Age range",
|
| 103 |
18,
|
| 104 |
70,
|
| 105 |
+
(18, 70),
|
| 106 |
+
help="Narrows the pool by the selected age-band overlap. The full 18-70 range is treated as no age filter.",
|
| 107 |
)
|
| 108 |
region_scope = st.selectbox(
|
| 109 |
"Region scope",
|
|
|
|
| 121 |
"Minimum height, cm",
|
| 122 |
150,
|
| 123 |
205,
|
| 124 |
+
150,
|
| 125 |
+
help="Interpolates a demo height-distribution coefficient. 150 cm is treated as no height filter.",
|
| 126 |
)
|
| 127 |
income_min_uah = st.select_slider(
|
| 128 |
"Minimum monthly income, UAH",
|
| 129 |
options=INCOME_THRESHOLD_OPTIONS_UAH,
|
| 130 |
+
value=0,
|
| 131 |
format_func=income_threshold_label,
|
| 132 |
help=(
|
| 133 |
"Scenario salary threshold. 0 means no income filter. Salary anchors: Work.ua current benchmark is about "
|
|
|
|
| 238 |
col_c.metric("Optimistic estimate", format_count(estimate.optimistic))
|
| 239 |
col_d.metric("Central share", format_percent(central_percent))
|
| 240 |
|
| 241 |
+
if central_percent == 100:
|
| 242 |
+
st.caption("Neutral defaults are active: the central estimate equals 100% of the selected baseline.")
|
| 243 |
+
else:
|
| 244 |
+
st.caption("Central share is the central estimate divided by the selected baseline after all active filters.")
|
| 245 |
+
|
| 246 |
st.subheader("What narrows the pool")
|
| 247 |
step_df = pd.DataFrame(steps)
|
| 248 |
display_df = step_df.assign(
|
src/assumptions.py
CHANGED
|
@@ -140,6 +140,7 @@ RELATIONSHIP_STATUS_FACTORS = {
|
|
| 140 |
}
|
| 141 |
|
| 142 |
HEIGHT_FACTORS = {
|
|
|
|
| 143 |
160: 0.92,
|
| 144 |
165: 0.82,
|
| 145 |
170: 0.67,
|
|
|
|
| 140 |
}
|
| 141 |
|
| 142 |
HEIGHT_FACTORS = {
|
| 143 |
+
150: 1.0,
|
| 144 |
160: 0.92,
|
| 145 |
165: 0.82,
|
| 146 |
170: 0.67,
|