James McCool commited on
Commit
4e04e05
·
1 Parent(s): 284c743

Refactor VORP calculation in Streamlit app to use adjusted values for halfPPR and custom rankings, improving accuracy in player evaluations and maintaining consistency across league types.

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +2 -2
src/streamlit_app.py CHANGED
@@ -382,8 +382,8 @@ def assign_vorp(frame: pd.DataFrame, halfPpr_rv: dict, custom_rv: dict, league_s
382
 
383
  pos_frame['halfPpr_rv'] = halfPpr_rv[positions]
384
  pos_frame['custom_rv'] = custom_rv[positions]
385
- pos_frame['halfPpr_VORP'] = pos_frame['adj_halfPpr'] - halfPpr_rv[positions]
386
- pos_frame['custom_VORP'] = pos_frame['adj_custom'] - custom_rv[positions]
387
 
388
  pos_frame = pos_frame.drop(columns=['custom_rank_raw', 'custom_calc', 'custom_proj_rank', 'max_halfPpr', 'halfPpr_range', 'max_custom', 'custom_range'])
389
 
 
382
 
383
  pos_frame['halfPpr_rv'] = halfPpr_rv[positions]
384
  pos_frame['custom_rv'] = custom_rv[positions]
385
+ pos_frame['halfPpr_VORP'] = pos_frame['halfPpr'] - halfPpr_rv[positions]
386
+ pos_frame['custom_VORP'] = pos_frame[rv_type] - custom_rv[positions]
387
 
388
  pos_frame = pos_frame.drop(columns=['custom_rank_raw', 'custom_calc', 'custom_proj_rank', 'max_halfPpr', 'halfPpr_range', 'max_custom', 'custom_range'])
389