James McCool
commited on
Commit
·
63fb3b9
1
Parent(s):
1e0095a
Still trying to figure out the opp_map and grid_map implementation on sports that are not designated for those maps.
Browse files
app.py
CHANGED
|
@@ -1681,72 +1681,116 @@ if selected_tab == 'Data Load':
|
|
| 1681 |
if site_var == 'Draftkings':
|
| 1682 |
if type_var == 'Classic':
|
| 1683 |
projections_file = init_nba_baselines(type_var, site_var, slate_var3)[0]
|
|
|
|
|
|
|
| 1684 |
elif type_var == 'Showdown':
|
| 1685 |
projections_file = init_nba_baselines(type_var, site_var, slate_var3)[2]
|
|
|
|
|
|
|
| 1686 |
elif site_var == 'Fanduel':
|
| 1687 |
if type_var == 'Classic':
|
| 1688 |
projections_file = init_nba_baselines(type_var, site_var, slate_var3)[1]
|
|
|
|
|
|
|
| 1689 |
elif type_var == 'Showdown':
|
| 1690 |
projections_file = init_nba_baselines(type_var, site_var, slate_var3)[3]
|
|
|
|
|
|
|
| 1691 |
elif sport_var == 'NFL':
|
| 1692 |
if site_var == 'Draftkings':
|
| 1693 |
if type_var == 'Classic':
|
| 1694 |
projections_file = init_nfl_baselines(type_var, site_var, slate_var3)[0]
|
|
|
|
|
|
|
| 1695 |
elif type_var == 'Showdown':
|
| 1696 |
projections_file = init_nfl_baselines(type_var, site_var, slate_var3)[2]
|
|
|
|
|
|
|
| 1697 |
elif site_var == 'Fanduel':
|
| 1698 |
if type_var == 'Classic':
|
| 1699 |
projections_file = init_nfl_baselines(type_var, site_var, slate_var3)[1]
|
|
|
|
|
|
|
| 1700 |
elif type_var == 'Showdown':
|
| 1701 |
projections_file = init_nfl_baselines(type_var, site_var, slate_var3)[3]
|
|
|
|
|
|
|
| 1702 |
elif sport_var == 'NHL':
|
| 1703 |
if site_var == 'Draftkings':
|
| 1704 |
if type_var == 'Classic':
|
| 1705 |
projections_file = init_nhl_baselines(type_var, site_var, slate_var3)[0]
|
|
|
|
|
|
|
| 1706 |
elif type_var == 'Showdown':
|
| 1707 |
projections_file = init_nhl_baselines(type_var, site_var, slate_var3)[2]
|
|
|
|
|
|
|
| 1708 |
elif site_var == 'Fanduel':
|
| 1709 |
if type_var == 'Classic':
|
| 1710 |
projections_file = init_nhl_baselines(type_var, site_var, slate_var3)[1]
|
|
|
|
|
|
|
| 1711 |
elif type_var == 'Showdown':
|
| 1712 |
projections_file = init_nhl_baselines(type_var, site_var, slate_var3)[3]
|
|
|
|
|
|
|
| 1713 |
elif sport_var == 'MMA':
|
| 1714 |
if site_var == 'Draftkings':
|
| 1715 |
if type_var == 'Classic':
|
| 1716 |
projections_file = init_mma_baselines(type_var, site_var, slate_var3)[0]
|
| 1717 |
opp_map = init_mma_baselines(type_var, site_var, slate_var3)[8]
|
|
|
|
| 1718 |
elif type_var == 'Showdown':
|
| 1719 |
projections_file = init_mma_baselines(type_var, site_var, slate_var3)[2]
|
|
|
|
|
|
|
| 1720 |
elif site_var == 'Fanduel':
|
| 1721 |
if type_var == 'Classic':
|
| 1722 |
projections_file = init_mma_baselines(type_var, site_var, slate_var3)[1]
|
| 1723 |
opp_map = init_mma_baselines(type_var, site_var, slate_var3)[8]
|
|
|
|
| 1724 |
elif type_var == 'Showdown':
|
| 1725 |
projections_file = init_mma_baselines(type_var, site_var, slate_var3)[3]
|
|
|
|
|
|
|
| 1726 |
elif sport_var == 'GOLF':
|
| 1727 |
if site_var == 'Draftkings':
|
| 1728 |
if type_var == 'Classic':
|
| 1729 |
projections_file = init_pga_baselines(type_var, site_var, slate_var3)[0]
|
|
|
|
|
|
|
| 1730 |
elif type_var == 'Showdown':
|
| 1731 |
projections_file = init_pga_baselines(type_var, site_var, slate_var3)[2]
|
|
|
|
|
|
|
| 1732 |
elif site_var == 'Fanduel':
|
| 1733 |
if type_var == 'Classic':
|
| 1734 |
projections_file = init_pga_baselines(type_var, site_var, slate_var3)[1]
|
|
|
|
|
|
|
| 1735 |
elif type_var == 'Showdown':
|
| 1736 |
projections_file = init_pga_baselines(type_var, site_var, slate_var3)[3]
|
|
|
|
|
|
|
| 1737 |
elif sport_var == 'NASCAR':
|
| 1738 |
if site_var == 'Draftkings':
|
| 1739 |
if type_var == 'Classic':
|
| 1740 |
projections_file = init_nascar_baselines(type_var, site_var, slate_var3)[0]
|
| 1741 |
grid_map = init_nascar_baselines(type_var, site_var, slate_var3)[8]
|
|
|
|
| 1742 |
elif type_var == 'Showdown':
|
| 1743 |
projections_file = init_nascar_baselines(type_var, site_var, slate_var3)[2]
|
|
|
|
|
|
|
| 1744 |
elif site_var == 'Fanduel':
|
| 1745 |
if type_var == 'Classic':
|
| 1746 |
projections_file = init_nascar_baselines(type_var, site_var, slate_var3)[1]
|
| 1747 |
grid_map = init_nascar_baselines(type_var, site_var, slate_var3)[8]
|
|
|
|
| 1748 |
elif type_var == 'Showdown':
|
| 1749 |
projections_file = init_nascar_baselines(type_var, site_var, slate_var3)[3]
|
|
|
|
|
|
|
| 1750 |
st.session_state['db_projections_file'] = projections_file
|
| 1751 |
st.session_state['projections_loaded'] = True
|
| 1752 |
if 'projections_df' in st.session_state:
|
|
@@ -1867,12 +1911,8 @@ if selected_tab == 'Data Load':
|
|
| 1867 |
sport_var
|
| 1868 |
)
|
| 1869 |
|
| 1870 |
-
|
| 1871 |
-
|
| 1872 |
-
elif sport_var == 'NASCAR':
|
| 1873 |
-
st.session_state['map_dict']['grid_map'] = grid_map
|
| 1874 |
-
else:
|
| 1875 |
-
st.session_state['map_dict']['opp_map'] = None
|
| 1876 |
|
| 1877 |
st.session_state['portfolio'] = st.session_state['portfolio'].astype(str)
|
| 1878 |
st.session_state['portfolio'] = st.session_state['portfolio'][~st.session_state['portfolio'].isin(['', 'nan', 'None', 'NaN']).any(axis=1)].reset_index(drop=True)
|
|
|
|
| 1681 |
if site_var == 'Draftkings':
|
| 1682 |
if type_var == 'Classic':
|
| 1683 |
projections_file = init_nba_baselines(type_var, site_var, slate_var3)[0]
|
| 1684 |
+
opp_map = None
|
| 1685 |
+
grid_map = None
|
| 1686 |
elif type_var == 'Showdown':
|
| 1687 |
projections_file = init_nba_baselines(type_var, site_var, slate_var3)[2]
|
| 1688 |
+
opp_map = None
|
| 1689 |
+
grid_map = None
|
| 1690 |
elif site_var == 'Fanduel':
|
| 1691 |
if type_var == 'Classic':
|
| 1692 |
projections_file = init_nba_baselines(type_var, site_var, slate_var3)[1]
|
| 1693 |
+
opp_map = None
|
| 1694 |
+
grid_map = None
|
| 1695 |
elif type_var == 'Showdown':
|
| 1696 |
projections_file = init_nba_baselines(type_var, site_var, slate_var3)[3]
|
| 1697 |
+
opp_map = None
|
| 1698 |
+
grid_map = None
|
| 1699 |
elif sport_var == 'NFL':
|
| 1700 |
if site_var == 'Draftkings':
|
| 1701 |
if type_var == 'Classic':
|
| 1702 |
projections_file = init_nfl_baselines(type_var, site_var, slate_var3)[0]
|
| 1703 |
+
opp_map = None
|
| 1704 |
+
grid_map = None
|
| 1705 |
elif type_var == 'Showdown':
|
| 1706 |
projections_file = init_nfl_baselines(type_var, site_var, slate_var3)[2]
|
| 1707 |
+
opp_map = None
|
| 1708 |
+
grid_map = None
|
| 1709 |
elif site_var == 'Fanduel':
|
| 1710 |
if type_var == 'Classic':
|
| 1711 |
projections_file = init_nfl_baselines(type_var, site_var, slate_var3)[1]
|
| 1712 |
+
opp_map = None
|
| 1713 |
+
grid_map = None
|
| 1714 |
elif type_var == 'Showdown':
|
| 1715 |
projections_file = init_nfl_baselines(type_var, site_var, slate_var3)[3]
|
| 1716 |
+
opp_map = None
|
| 1717 |
+
grid_map = None
|
| 1718 |
elif sport_var == 'NHL':
|
| 1719 |
if site_var == 'Draftkings':
|
| 1720 |
if type_var == 'Classic':
|
| 1721 |
projections_file = init_nhl_baselines(type_var, site_var, slate_var3)[0]
|
| 1722 |
+
opp_map = None
|
| 1723 |
+
grid_map = None
|
| 1724 |
elif type_var == 'Showdown':
|
| 1725 |
projections_file = init_nhl_baselines(type_var, site_var, slate_var3)[2]
|
| 1726 |
+
opp_map = None
|
| 1727 |
+
grid_map = None
|
| 1728 |
elif site_var == 'Fanduel':
|
| 1729 |
if type_var == 'Classic':
|
| 1730 |
projections_file = init_nhl_baselines(type_var, site_var, slate_var3)[1]
|
| 1731 |
+
opp_map = None
|
| 1732 |
+
grid_map = None
|
| 1733 |
elif type_var == 'Showdown':
|
| 1734 |
projections_file = init_nhl_baselines(type_var, site_var, slate_var3)[3]
|
| 1735 |
+
opp_map = None
|
| 1736 |
+
grid_map = None
|
| 1737 |
elif sport_var == 'MMA':
|
| 1738 |
if site_var == 'Draftkings':
|
| 1739 |
if type_var == 'Classic':
|
| 1740 |
projections_file = init_mma_baselines(type_var, site_var, slate_var3)[0]
|
| 1741 |
opp_map = init_mma_baselines(type_var, site_var, slate_var3)[8]
|
| 1742 |
+
grid_map = None
|
| 1743 |
elif type_var == 'Showdown':
|
| 1744 |
projections_file = init_mma_baselines(type_var, site_var, slate_var3)[2]
|
| 1745 |
+
opp_map = init_mma_baselines(type_var, site_var, slate_var3)[8]
|
| 1746 |
+
grid_map = None
|
| 1747 |
elif site_var == 'Fanduel':
|
| 1748 |
if type_var == 'Classic':
|
| 1749 |
projections_file = init_mma_baselines(type_var, site_var, slate_var3)[1]
|
| 1750 |
opp_map = init_mma_baselines(type_var, site_var, slate_var3)[8]
|
| 1751 |
+
grid_map = None
|
| 1752 |
elif type_var == 'Showdown':
|
| 1753 |
projections_file = init_mma_baselines(type_var, site_var, slate_var3)[3]
|
| 1754 |
+
opp_map = init_mma_baselines(type_var, site_var, slate_var3)[8]
|
| 1755 |
+
grid_map = None
|
| 1756 |
elif sport_var == 'GOLF':
|
| 1757 |
if site_var == 'Draftkings':
|
| 1758 |
if type_var == 'Classic':
|
| 1759 |
projections_file = init_pga_baselines(type_var, site_var, slate_var3)[0]
|
| 1760 |
+
opp_map = None
|
| 1761 |
+
grid_map = None
|
| 1762 |
elif type_var == 'Showdown':
|
| 1763 |
projections_file = init_pga_baselines(type_var, site_var, slate_var3)[2]
|
| 1764 |
+
opp_map = None
|
| 1765 |
+
grid_map = None
|
| 1766 |
elif site_var == 'Fanduel':
|
| 1767 |
if type_var == 'Classic':
|
| 1768 |
projections_file = init_pga_baselines(type_var, site_var, slate_var3)[1]
|
| 1769 |
+
opp_map = None
|
| 1770 |
+
grid_map = None
|
| 1771 |
elif type_var == 'Showdown':
|
| 1772 |
projections_file = init_pga_baselines(type_var, site_var, slate_var3)[3]
|
| 1773 |
+
opp_map = None
|
| 1774 |
+
grid_map = None
|
| 1775 |
elif sport_var == 'NASCAR':
|
| 1776 |
if site_var == 'Draftkings':
|
| 1777 |
if type_var == 'Classic':
|
| 1778 |
projections_file = init_nascar_baselines(type_var, site_var, slate_var3)[0]
|
| 1779 |
grid_map = init_nascar_baselines(type_var, site_var, slate_var3)[8]
|
| 1780 |
+
opp_map = None
|
| 1781 |
elif type_var == 'Showdown':
|
| 1782 |
projections_file = init_nascar_baselines(type_var, site_var, slate_var3)[2]
|
| 1783 |
+
grid_map = init_nascar_baselines(type_var, site_var, slate_var3)[8]
|
| 1784 |
+
opp_map = None
|
| 1785 |
elif site_var == 'Fanduel':
|
| 1786 |
if type_var == 'Classic':
|
| 1787 |
projections_file = init_nascar_baselines(type_var, site_var, slate_var3)[1]
|
| 1788 |
grid_map = init_nascar_baselines(type_var, site_var, slate_var3)[8]
|
| 1789 |
+
opp_map = None
|
| 1790 |
elif type_var == 'Showdown':
|
| 1791 |
projections_file = init_nascar_baselines(type_var, site_var, slate_var3)[3]
|
| 1792 |
+
grid_map = init_nascar_baselines(type_var, site_var, slate_var3)[8]
|
| 1793 |
+
opp_map = None
|
| 1794 |
st.session_state['db_projections_file'] = projections_file
|
| 1795 |
st.session_state['projections_loaded'] = True
|
| 1796 |
if 'projections_df' in st.session_state:
|
|
|
|
| 1911 |
sport_var
|
| 1912 |
)
|
| 1913 |
|
| 1914 |
+
st.session_state['map_dict']['opp_map'] = opp_map
|
| 1915 |
+
st.session_state['map_dict']['grid_map'] = grid_map
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1916 |
|
| 1917 |
st.session_state['portfolio'] = st.session_state['portfolio'].astype(str)
|
| 1918 |
st.session_state['portfolio'] = st.session_state['portfolio'][~st.session_state['portfolio'].isin(['', 'nan', 'None', 'NaN']).any(axis=1)].reset_index(drop=True)
|