diff --git "a/Notebook Too.ipynb" "b/Notebook Too.ipynb" new file mode 100644--- /dev/null +++ "b/Notebook Too.ipynb" @@ -0,0 +1,2797 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 32, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[\n", + " Skip to main content\n", + " ,\n", + " \n", + " \"\n", + " ,\n", + " \n", + " \n", + " News\n", + " \n", + " ,\n", + " \n", + " \n", + " Scores\n", + " \n", + " ,\n", + " \n", + " \n", + " Schedule\n", + " \n", + " ,\n", + " \n", + " \n", + " Videos\n", + " \n", + " ,\n", + " \n", + " \n", + " Teams\n", + " \n", + " ,\n", + " \n", + " \n", + " Players\n", + " \n", + " ,\n", + " \n", + " \n", + " Stats\n", + " \n", + " ,\n", + " \n", + " \n", + " Standings\n", + " \n", + " ,\n", + " \n", + " \n", + " Inspire Change\n", + " \n", + " ,\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " ,\n", + " \n", + " \n", + " NFL Films\n", + " \n", + " ,\n", + " \n", + " \n", + " Salute to Service\n", + " \n", + " ,\n", + " \n", + " \n", + " Community\n", + " \n", + " ,\n", + " \n", + " \n", + " Por la Cultura\n", + " \n", + " ,\n", + " \n", + " \n", + " Inspire Change\n", + " \n", + " ,\n", + " \n", + " \n", + " HBCU\n", + " \n", + " ,\n", + " \n", + " \n", + " Ways to Watch\n", + " \n", + " ,\n", + " \n", + " \n", + " Photos\n", + " \n", + " ,\n", + " \n", + " \n", + " En Español\n", + " \n", + " ,\n", + " \n", + " \n", + " Super Bowl\n", + " \n", + " ,\n", + " \n", + " \n", + " Pro Bowl Games\n", + " \n", + " ,\n", + " \n", + " \n", + " NFL Shop\n", + " \n", + " ,\n", + " \n", + " \n", + " NFL+\n", + " \n", + " ,\n", + " \n", + "
\n", + " \"NFL+\"\n", + "
\n", + " \n", + " NFL+\n", + " \n", + "
,\n", + " \n", + " \n", + " NFL Network\n", + " \n", + " ,\n", + " \n", + " \n", + " Fantasy\n", + " \n", + " ,\n", + " \n", + " \n", + " Tickets\n", + " \n", + " ,\n", + " \n", + " \n", + " Experiences\n", + " \n", + " ,\n", + " \n", + " \n", + " Shop\n", + " \n", + " ,\n", + " \n", + " \n", + " Sign In\n", + " \n", + " ,\n", + " \n", + " \n", + " League Schedule\n", + " \n", + " ,\n", + " \n", + " \n", + " Team Schedules\n", + " \n", + " ,\n", + " \n", + " \n", + " TNF\n", + " \n", + " ,\n", + " \n", + " \n", + " SNF\n", + " \n", + " ,\n", + " \n", + " \n", + " MNF\n", + " \n", + " ,\n", + " \n", + " \n", + " Network Games\n", + " \n", + " ,\n", + " \n", + " \n", + " Buy Tickets\n", + " \n", + " ,\n", + " \n", + " \n", + " Team Experiences\n", + " \n", + " ,\n", + " NFL Schedule,\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " ,\n", + " \n", + " View Schedule\n", + " ,\n", + " \n", + " View Schedule\n", + " ,\n", + " \n", + " View Schedule\n", + " ,\n", + " \n", + " View Flexible Scheduling Procedures\n", + " ,\n", + " \n", + " \n", + " \"Baltimore\n", + " \n", + " ,\n", + " \n", + " \"Cincinnati ,\n", + " \n", + " \"Cleveland ,\n", + " \n", + " \"Pittsburgh ,\n", + " \n", + " \"Buffalo ,\n", + " \n", + " \"Miami ,\n", + " \n", + " \"New ,\n", + " \n", + " \"New ,\n", + " \n", + " \"Houston ,\n", + " \n", + " \"Indianapolis ,\n", + " \n", + " \"Jacksonville ,\n", + " \n", + " \"Tennessee ,\n", + " \n", + " \"Denver ,\n", + " \n", + " \"Kansas ,\n", + " \n", + " \"Las ,\n", + " \n", + " \"Los ,\n", + " \n", + " \"Chicago ,\n", + " \n", + " \"Detroit ,\n", + " \n", + " \"Green ,\n", + " \n", + " \"Minnesota ,\n", + " \n", + " \"Dallas ,\n", + " \n", + " \"New ,\n", + " \n", + " \"Philadelphia ,\n", + " \n", + " \"Washington ,\n", + " \n", + " \"Atlanta ,\n", + " \n", + " \"Carolina ,\n", + " \n", + " \"New ,\n", + " \n", + " \"Tampa ,\n", + " \n", + " \"Arizona ,\n", + " \n", + " \"Los ,\n", + " \n", + " \"San ,\n", + " \n", + " \"Seattle ,\n", + " \n", + " Contact Us ,\n", + " \n", + " Privacy Policy ,\n", + " \n", + " NFL Communications ,\n", + " \n", + " Careers ,\n", + " \n", + " Terms & Conditions ,\n", + " \n", + " Media Guides ,\n", + " \n", + " Rule Book ,\n", + " \n", + " Accessibility ,\n", + " \n", + " Record & Fact Book ,\n", + " \n", + " Sitemap ,\n", + " \n", + " Activate - CTV ,\n", + " \n", + " NFL Auction ,\n", + " \n", + " Play 60 ,\n", + " \n", + " Play Football ,\n", + " \n", + " In the Community ,\n", + " \n", + " Inspire Change ,\n", + " \n", + " NFL Health & Safety ,\n", + " \n", + " Player Engagement ,\n", + " \n", + " NFL Alumni Association ,\n", + " \n", + " NFL Player Care ,\n", + " \n", + " NFL Films ,\n", + " \n", + " USA Football ,\n", + " \n", + " NFL Shop ,\n", + " \n", + " NFL Football Operations ,\n", + " \n", + " On Location ,\n", + " \n", + " Pro Football Hall of Fame ,\n", + " \n", + " Licensing ,\n", + " \n", + " NFL Extra Points Credit Card ,\n", + " \n", + " NFL Ticket Exchange ,\n", + " \n", + " \"Download\n", + " ,\n", + " \n", + " \"Get\n", + " ,\n", + " \n", + " Privacy Policy\n", + " ,\n", + " \n", + " Terms of Service\n", + " ,\n", + " Your Privacy Choices\n", + " ]" + ] + }, + "execution_count": 32, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "import pandas as pd\n", + "import requests\n", + "from bs4 import BeautifulSoup\n", + "\n", + "headers = {\n", + "'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7',\n", + "'Accept-Encoding': 'gzip, deflate',\n", + "'Accept-Language': 'en-US,en;q=0.9',\n", + "'Cache-Control': 'max-age=0',\n", + "'Connection': 'keep-alive',\n", + "'Dnt': '1',\n", + "'Upgrade-Insecure-Requests': '1',\n", + "'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36'\n", + "}\n", + "\n", + "resp = requests.get('https://www.nfl.com/schedules/', headers=headers)\n", + "soup = BeautifulSoup(resp.text, 'html.parser')\n", + "soup.find_all('a')#, {'class':\"nfl-c-matchup\"})\n", + "#soup.find_all('div')" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
Away TeamAway TeamHome TeamHome TeamGame TimeGame TimeNetworkNetworkVenueVenue
0MIN Minnesota VikingsPHI Philadelphia Eagles09/14/23 8:15 PM ESTAMZNLincoln Financial Field
1GB Green Bay PackersATL Atlanta Falcons09/17/23 1:00 PM ESTFOXMercedes-Benz Stadium
2LV Las Vegas RaidersBUF Buffalo Bills09/17/23 1:00 PM ESTCBSHighmark Stadium
3BAL Baltimore RavensCIN Cincinnati Bengals09/17/23 1:00 PM ESTCBSPaycor Stadium
4SEA Seattle SeahawksDET Detroit Lions09/17/23 1:00 PM ESTFOXFord Field
5IND Indianapolis ColtsHOU Houston Texans09/17/23 1:00 PM ESTFOXNRG Stadium
6KC Kansas City ChiefsJax Jacksonville Jaguars09/17/23 1:00 PM ESTCBSEverBank Stadium
7CHI Chicago BearsTB Tampa Bay Buccaneers09/17/23 1:00 PM ESTFOXRaymond James Stadium
8LAC Los Angeles ChargersTEN Tennessee Titans09/17/23 1:00 PM ESTCBSNissan Stadium
9NYG New York GiantsARI Arizona Cardinals09/17/23 4:05 PM ESTFOXState Farm Stadium
10SF San Francisco 49ersLAR Los Angeles Rams09/17/23 4:05 PM ESTFOXSoFi Stadium
11NYJ New York JetsDAL Dallas Cowboys09/17/23 4:25 PM ESTCBSAT&T Stadium
12WAS Washington CommandersDEN Denver Broncos09/17/23 4:25 PM ESTCBSEmpower Field at Mile High
13MIA Miami DolphinsNE New England Patriots09/17/23 8:20 PM ESTNBC, PEAKGillette Stadium
14NO New Orleans SaintsCAR Carolina Panthers09/18/23 7:15 PM ESTESPNBank of America Stadium
15CLE Cleveland BrownsPIT Pittsburgh Steelers09/18/23 8:15 PM ESTABCAcrisure Stadium
\n", + "
" + ], + "text/plain": [ + " Away TeamAway Team Home TeamHome Team Game TimeGame Time \\\n", + "0 MIN Minnesota Vikings PHI Philadelphia Eagles 09/14/23 8:15 PM EST \n", + "1 GB Green Bay Packers ATL Atlanta Falcons 09/17/23 1:00 PM EST \n", + "2 LV Las Vegas Raiders BUF Buffalo Bills 09/17/23 1:00 PM EST \n", + "3 BAL Baltimore Ravens CIN Cincinnati Bengals 09/17/23 1:00 PM EST \n", + "4 SEA Seattle Seahawks DET Detroit Lions 09/17/23 1:00 PM EST \n", + "5 IND Indianapolis Colts HOU Houston Texans 09/17/23 1:00 PM EST \n", + "6 KC Kansas City Chiefs Jax Jacksonville Jaguars 09/17/23 1:00 PM EST \n", + "7 CHI Chicago Bears TB Tampa Bay Buccaneers 09/17/23 1:00 PM EST \n", + "8 LAC Los Angeles Chargers TEN Tennessee Titans 09/17/23 1:00 PM EST \n", + "9 NYG New York Giants ARI Arizona Cardinals 09/17/23 4:05 PM EST \n", + "10 SF San Francisco 49ers LAR Los Angeles Rams 09/17/23 4:05 PM EST \n", + "11 NYJ New York Jets DAL Dallas Cowboys 09/17/23 4:25 PM EST \n", + "12 WAS Washington Commanders DEN Denver Broncos 09/17/23 4:25 PM EST \n", + "13 MIA Miami Dolphins NE New England Patriots 09/17/23 8:20 PM EST \n", + "14 NO New Orleans Saints CAR Carolina Panthers 09/18/23 7:15 PM EST \n", + "15 CLE Cleveland Browns PIT Pittsburgh Steelers 09/18/23 8:15 PM EST \n", + "\n", + " NetworkNetwork VenueVenue \n", + "0 AMZN Lincoln Financial Field \n", + "1 FOX Mercedes-Benz Stadium \n", + "2 CBS Highmark Stadium \n", + "3 CBS Paycor Stadium \n", + "4 FOX Ford Field \n", + "5 FOX NRG Stadium \n", + "6 CBS EverBank Stadium \n", + "7 FOX Raymond James Stadium \n", + "8 CBS Nissan Stadium \n", + "9 FOX State Farm Stadium \n", + "10 FOX SoFi Stadium \n", + "11 CBS AT&T Stadium \n", + "12 CBS Empower Field at Mile High \n", + "13 NBC, PEAK Gillette Stadium \n", + "14 ESPN Bank of America Stadium \n", + "15 ABC Acrisure Stadium " + ] + }, + "execution_count": 35, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "pd.read_html('Static/week2.html')[1]" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": {}, + "outputs": [], + "source": [ + "import os \n", + "import pickle as pkl\n", + "\n", + "# get team abbreviations\n", + "file_path = ('Source/Pickles/team_name_to_abbreviation.pkl')\n", + "with open(file_path, 'rb') as f:\n", + " team_name_to_abbreviation = pkl.load(f)\n", + "\n", + "file_path = ('Source/Pickles/team_abbreviation_to_name.pkl')\n", + "with open(file_path, 'rb') as f:\n", + " team_abbreviation_to_name = pkl.load(f)" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'LAR'" + ] + }, + "execution_count": 38, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "team_name_to_abbreviation['Los Angeles Rams']" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'Los Angeles Rams'" + ] + }, + "execution_count": 40, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "team_abbreviation_to_name['LA']" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "metadata": {}, + "outputs": [], + "source": [ + "team_name_to_abbreviation['Los Angeles Rams'] = 'LA'\n", + "\n", + "file_path = ('Source/Pickles/team_name_to_abbreviation.pkl')\n", + "with open(file_path, 'wb') as f:\n", + " pkl.dump(team_name_to_abbreviation, f) " + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "['GP', 'W', 'L', 'W_PCT', 'TOP', 'FGA', 'FGM', 'FG_PCT', 'PassTD',\n", + " 'RushTD', 'PassTD_Allowed', 'RushTD_Allowed', 'PassYds', 'RushYds',\n", + " 'PassYds_Allowed', 'RushYds_Allowed', 'Fum', 'Fum_Allowed', 'INT',\n", + " 'INT_Allowed', 'Sacks', 'Sacks_Allowed', 'Penalties', 'FirstDowns',\n", + " '3rdDownConverted', '3rdDownFailed', '3rdDownAllowed',\n", + " '3rdDownDefended', 'PTS', 'PointDiff', 'GP.Away', 'W.Away', 'L.Away',\n", + " 'W_PCT.Away', 'TOP.Away', 'FGA.Away', 'FGM.Away', 'FG_PCT.Away',\n", + " 'PassTD.Away', 'RushTD.Away', 'PassTD_Allowed.Away',\n", + " 'RushTD_Allowed.Away', 'PassYds.Away', 'RushYds.Away',\n", + " 'PassYds_Allowed.Away', 'RushYds_Allowed.Away', 'Fum.Away',\n", + " 'Fum_Allowed.Away', 'INT.Away', 'INT_Allowed.Away', 'Sacks.Away',\n", + " 'Sacks_Allowed.Away', 'Penalties.Away', 'FirstDowns.Away',\n", + " '3rdDownConverted.Away', '3rdDownFailed.Away', '3rdDownAllowed.Away',\n", + " '3rdDownDefended.Away', 'PTS.Away', 'PointDiff.Away',\n", + " 'Total Score Close']\n", + "\n", + "['GP', 'W', 'L', 'W_PCT', 'TOP', 'FGA', 'FGM', 'FG_PCT', 'PassTD',\n", + " 'RushTD', 'PassTD_Allowed', 'RushTD_Allowed', 'PassYds', 'RushYds',\n", + " 'PassYds_Allowed', 'RushYds_Allowed', 'Fum', 'Fum_Allowed', 'INT',\n", + " 'INT_Allowed', 'Sacks', 'Sacks_Allowed', 'Penalties', 'FirstDowns',\n", + " '3rdDownConverted', '3rdDownFailed', '3rdDownAllowed',\n", + " '3rdDownDefended', 'PTS', 'PointDiff', 'GP.Away', 'W.Away', 'L.Away',\n", + " 'W_PCT.Away', 'TOP.Away', 'FGA.Away', 'FGM.Away', 'FG_PCT.Away',\n", + " 'PassTD.Away', 'RushTD.Away', 'PassTD_Allowed.Away',\n", + " 'RushTD_Allowed.Away', 'PassYds.Away', 'RushYds.Away',\n", + " 'PassYds_Allowed.Away', 'RushYds_Allowed.Away', 'Fum.Away',\n", + " 'Fum_Allowed.Away', 'INT.Away', 'INT_Allowed.Away', 'Sacks.Away',\n", + " 'Sacks_Allowed.Away', 'Penalties.Away', 'FirstDowns.Away',\n", + " '3rdDownConverted.Away', '3rdDownFailed.Away', '3rdDownAllowed.Away',\n", + " '3rdDownDefended.Away', 'PTS.Away', 'PointDiff.Away',\n", + " 'Total Score Close']" + ] + }, + { + "cell_type": "code", + "execution_count": 47, + "metadata": {}, + "outputs": [], + "source": [ + "url = 'https://www.sportsbettingdime.com/nfl/public-betting-trends/'\n", + "public = pd.read_html(url)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 95, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "MIN\n", + "GB\n", + "IND\n", + "SEA\n", + "LAC\n", + "BAL\n", + "LV\n", + "KC\n", + "SF\n", + "NYG\n", + "NYJ\n", + "WAS\n", + "MIA\n", + "NO\n", + "CLE\n" + ] + } + ], + "source": [ + "import re\n", + "season = '2023'\n", + "week = '02'\n", + "\n", + "for i in public[1:-1]:\n", + " try:\n", + " home_team = re.findall(r'([A-Z]{2,3})$', i.iloc[1,0])[0]\n", + " away_team = re.findall(r'([A-Z]{2,3})$', i.iloc[0,0][:-1])[0]\n", + " pct_home = int(i['Unnamed: 9'][1][:-1])\n", + " pct_away = int(i['Unnamed: 9'][0][:-1])\n", + " \n", + " except ValueError:\n", + " continue\n", + "\n", + " print(away_team)" + ] + }, + { + "cell_type": "code", + "execution_count": 58, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "18" + ] + }, + "execution_count": 58, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "len(public)" + ] + }, + { + "cell_type": "code", + "execution_count": 62, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
9/18/2023 @ 7:15 EDT9/18/2023 @ 7:15 EDT.19/18/2023 @ 7:15 EDT.29/18/2023 @ 7:15 EDT.39/18/2023 @ 7:15 EDT.49/18/2023 @ 7:15 EDT.5Unnamed: 6Unnamed: 7Unnamed: 8Unnamed: 9Unnamed: 10Unnamed: 11Unnamed: 12
0New OrleansNO@-351%39%-351%39%-15989%88%o4029%47%
1CarolinaCAR+349%61%+349%61%+14611%12%u40.571%53%
29/18/2023 @ 7:15 EDTFull Game Stats9/18/2023 @ 7:15 EDTFull Game Stats9/18/2023 @ 7:15 EDTFull Game Stats9/18/2023 @ 7:15 EDTFull Game Stats9/18/2023 @ 7:15 EDTFull Game Stats9/18/2023 @ 7:15 EDTFull Game Stats9/18/2023 @ 7:15 EDTFull Game Stats9/18/2023 @ 7:15 EDTFull Game Stats9/18/2023 @ 7:15 EDTFull Game Stats9/18/2023 @ 7:15 EDTFull Game StatsNaNNaNNaN
\n", + "
" + ], + "text/plain": [ + " 9/18/2023 @ 7:15 EDT 9/18/2023 @ 7:15 EDT.1 \\\n", + "0 New OrleansNO@ -3 \n", + "1 CarolinaCAR +3 \n", + "2 9/18/2023 @ 7:15 EDTFull Game Stats 9/18/2023 @ 7:15 EDTFull Game Stats \n", + "\n", + " 9/18/2023 @ 7:15 EDT.2 9/18/2023 @ 7:15 EDT.3 \\\n", + "0 51% 39% \n", + "1 49% 61% \n", + "2 9/18/2023 @ 7:15 EDTFull Game Stats 9/18/2023 @ 7:15 EDTFull Game Stats \n", + "\n", + " 9/18/2023 @ 7:15 EDT.4 9/18/2023 @ 7:15 EDT.5 \\\n", + "0 -3 51% \n", + "1 +3 49% \n", + "2 9/18/2023 @ 7:15 EDTFull Game Stats 9/18/2023 @ 7:15 EDTFull Game Stats \n", + "\n", + " Unnamed: 6 Unnamed: 7 \\\n", + "0 39% -159 \n", + "1 61% +146 \n", + "2 9/18/2023 @ 7:15 EDTFull Game Stats 9/18/2023 @ 7:15 EDTFull Game Stats \n", + "\n", + " Unnamed: 8 Unnamed: 9 \\\n", + "0 89% 88% \n", + "1 11% 12% \n", + "2 9/18/2023 @ 7:15 EDTFull Game Stats 9/18/2023 @ 7:15 EDTFull Game Stats \n", + "\n", + " Unnamed: 10 Unnamed: 11 Unnamed: 12 \n", + "0 o40 29% 47% \n", + "1 u40.5 71% 53% \n", + "2 NaN NaN NaN " + ] + }, + "execution_count": 62, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "public[15]" + ] + }, + { + "cell_type": "code", + "execution_count": 44, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "\n", + "NFL Public Betting: Latest Bet & Money Percentages for NFL Week 2
Upcoming Match-ups

NFL Public Betting Trends

\"SBD
Latest Bet & Money Percentages for 2023-24 NFL Season

Whether you want to tail or fade the public, knowing the public betting trends – bet percentages and money percentages – is vital to making intelligent sports wagers. This is the place you’ll find these trends each week for the 2023-24 NFL season. We will also be tracking how the public’s picks do all season—you can see how they fared last year against the spread below.

\n", + "

NFL Public Betting Splits for Week 2

\n", + "
\"Icon

Filter

All
Spread
Week 2
Matchup
spread$$Money %Bet %spreadMoney %Bet %moneylineMoney %Bet %totalMoney %Bet %
Minnesota
MIN
@
+7
29%
45%
+7
29%
45%
+260
25%
6%
o49
57%
62%
Philadelphia
PHI
-7
71%
55%
-7
71%
55%
-300
75%
94%
u49.5
43%
38%
Full Game Stats
Chicago
CHI
@
+3
57%
40%
+3
57%
40%
+130
--
--
o41
43%
64%
Tampa Bay
TB
-3
43%
60%
-3
43%
60%
-142
--
--
u41.5
57%
36%
Full Game Stats
Green Bay
GB
@
-1.5
62%
55%
-1.5
62%
55%
-120
63%
57%
o40.5
58%
30%
Atlanta
ATL
+2
38%
45%
+2
38%
45%
+106
37%
43%
u40.5
42%
70%
Full Game Stats
\"\"
\"\"

SIGNUP PROMO

Bet $5 & Get $200 in Bonus Bets + $100 Off NFL Sunday Ticket!

T&C Apply
\"\"
\"\"

SIGNUP OFFER

Bet $5 on Any Pre-Game Moneyline & Get $200 Instantly!

T&C Apply
\"\"
\"\"

SIGNUP BONUS

Bet $50 on NFL & Get $250 in Bonus Bets on Caesars!

T&C Apply
\"\"
\"\"

SIGN UP PROMO

First Bet Offer: Get Up To $1,000 Paid Back & and a Bonus $25 Bet!

T&C Apply
Indianapolis
IND
@
-1
59%
61%
-1
59%
61%
-115
14%
74%
o39.5
63%
74%
Houston
HOU
+1.5
41%
39%
+1.5
41%
39%
+106
86%
26%
u40
37%
26%
Full Game Stats
Seattle
SEA
@
+5.5
45%
61%
+5.5
45%
61%
+210
64%
18%
o47
46%
71%
Detroit
DET
-5.5
55%
39%
-5.5
55%
39%
-238
36%
82%
u47.5
54%
29%
Full Game Stats
LA Chargers
LAC
@
-3
53%
53%
-3
53%
53%
-155
88%
87%
o45
66%
44%
Tennessee
TEN
+3
47%
47%
+3
47%
47%
+140
12%
13%
u45.5
34%
56%
Full Game Stats
Baltimore
BAL
@
+3.5
53%
64%
+3.5
53%
64%
+164
83%
48%
o46
85%
73%
Cincinnati
CIN
-3.5
47%
36%
-3.5
47%
36%
-170
17%
52%
u46.5
15%
27%
Full Game Stats
Las Vegas
LV
@
+9.5
59%
65%
+9.5
59%
65%
+350
11%
5%
o46.5
72%
55%
Buffalo
BUF
-8.5
41%
35%
-8.5
41%
35%
-380
89%
95%
u47
28%
45%
Full Game Stats
Kansas City
KC
@
-3
64%
46%
-3
64%
46%
-158
77%
86%
o51
64%
23%
Jacksonville
JAC
+3
36%
54%
+3
36%
54%
+140
23%
14%
u51.5
36%
77%
Full Game Stats
San Francisco
SF
@
-7.5
88%
66%
-7.5
88%
66%
-345
86%
93%
o44
59%
50%
LA Rams
LAR
+8.5
12%
34%
+8.5
12%
34%
+290
14%
7%
u44.5
41%
50%
Full Game Stats
NY Giants
NYG
@
-5.5
82%
44%
-5.5
82%
44%
-218
45%
74%
o39.5
64%
75%
Arizona
ARI
+6
18%
56%
+6
18%
56%
+200
55%
26%
u40
36%
25%
Full Game Stats
\"\"
\"\"

SIGNUP PROMO

Bet $5 & Get $200 in Bonus Bets + $100 Off NFL Sunday Ticket!

T&C Apply
\"\"
\"\"

SIGNUP OFFER

Bet $5 on Any Pre-Game Moneyline & Get $200 Instantly!

T&C Apply
\"\"
\"\"

SIGNUP BONUS

Bet $50 on NFL & Get $250 in Bonus Bets on Caesars!

T&C Apply
\"\"
\"\"

SIGN UP PROMO

First Bet Offer: Get Up To $1,000 Paid Back & and a Bonus $25 Bet!

T&C Apply
NY Jets
NYJ
@
+9.5
22%
54%
+9.5
22%
54%
+360
35%
7%
o39
18%
50%
Dallas
DAL
-9
78%
46%
-9
78%
46%
-395
65%
93%
u39.5
82%
50%
Full Game Stats
Washington
WAS
@
+3.5
71%
60%
+3.5
71%
60%
+158
66%
32%
o38
43%
69%
Denver
DEN
-3.5
29%
40%
-3.5
29%
40%
-175
34%
68%
u38.5
57%
31%
Full Game Stats
Miami
MIA
@
-2
65%
52%
-2
65%
52%
-136
79%
78%
o46.5
40%
52%
New England
NE
+2.5
35%
48%
+2.5
35%
48%
+130
21%
22%
u46.5
60%
48%
Full Game Stats
New Orleans
NO
@
-3
51%
39%
-3
51%
39%
-159
89%
88%
o40
29%
47%
Carolina
CAR
+3
49%
61%
+3
49%
61%
+146
11%
12%
u40.5
71%
53%
Full Game Stats
Cleveland
CLE
@
-2
50%
52%
-2
50%
52%
-125
81%
78%
o39
21%
69%
Pittsburgh
PIT
+2.5
50%
48%
+2.5
50%
48%
+115
19%
23%
u39.5
79%
31%
Full Game Stats

NFL public betting splits above are updated hourly; the data presented in the public betting chart is an average of the NFL public bets and NFL public money from multiple North American and global sportsbooks.

\n", + "
\n", + "

Here is what we’re seeing from the early public money for Week 2 of the 2023-24 NFL season:

\n", + "
    \n", + "
  • Early money on Thursday Night Football is on the Eagles as 7-point favorites over the Vikings. We are seeing 71% of the money bet against the spread on Philadelphia.
  • \n", + "
  • The public absolutely loves the 49ers as 8-point favorites in their matchup with the Rams. We are seeing 88% of the ATS money on San Francisco.
  • \n", + "
  • There are only two other teams in Week 2 receiving more than 75% of the money bet against the spread: the Giants (82%) and Cowboys (78%).
  • \n", + "
  • There are three totals bets receiving more than 75% of the money bet on the over/under: under 46.5 in Ravens vs Bengals (85%), under 39.5 in Jets vs Cowboys (82%), and under 39.5 in Browns vs Steelers (79%).
  • \n", + "
\n", + "

Public’s NFL Betting Record

\n", + "
\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
WeekPublic’s Record Against the Spread
Week 113-3
2023-24 TOTAL13-3
2022-23 TOTAL122-149-8
2021-22 TOTAL140-137-4
\n", + "
\n", + "

The public got a win in the first game of the season, as they sided with the Lions, who were getting four points. Detroit won the game outright and the public is off to a 1-0 start against the spread to the 2023-24 NFL season. They continued their heater into Sunday, where the public went a scorching 12-2 against the spread. The public would lose their MNF bet on the Bills, but still finish the week a red hot 13-3 against the spread.

\n", + "

Here is how the public has fared against the spread in games where more than 75% of the money is on one side (a pick they are very confident in):

\n", + "
    \n", + "
  • Week 1: 6-1
  • \n", + "
\n", + "

Here are some quick stats looking back to the public’s 2022-23 record against the spread:

\n", + "
    \n", + "
  • Went 6-10 against the spread in Week 1
  • \n", + "
  • Worst week was Week 6 (4-10 ATS)
  • \n", + "
  • First winning week against the spread didn’t come until Week 8 (8-7)
  • \n", + "
  • Best week was Week 11 (8-5-1 ATS)
  • \n", + "
\n", + "
\n", + "
\n", + "

Looking for the latest NFL odds? – Get current spreads, totals, and moneyline odds for all upcoming games this week here.

\n", + "
\n", + "

What Are NFL Betting Trends?

\n", + "

Online sports betting sites are very good at bookkeeping. Every single bet they take from a customer is recorded and stored in their system. Using all these financial transactions, we can sew together NFL betting percentages based off the total number of bets placed and total amount of money bet on any given game, whether it be the moneyline, spread, or total.

\n", + "

To get the biggest bonuses that can be used to tail or fade the public, be sure to check out the latest Caesars Sportsbook promo code prior to kick-off.

\n", + "

What are Money Percentages?

\n", + "

In my opinion, the money percentage is the more important of the two NFL public betting percentages. You’ll often hear money percentages referred to as the “% of handle”. First off, the betting handle is simply the total amount of money wagered on an event, often broken down by bet type.

\n", + "

The money percentage simply pools all the money wagered on any game together, first sorting it by the type of bet (moneyline, against the spread, or over/under), and then breaks down what percentage of the handle is bet on each side.

\n", + "

The money percentage (obviously) tells you which side the money is on, and can give you a better picture of who the sharper bettors are siding with.

\n", + "

What Are Bet Percentages?

\n", + "

Though I don’t value betting percentages as much as money percentages, they still vital in helping to paint the full picture of NFL public betting. Bet percentages are frequently referred to as “% of tickets” or “% of bets”. Tickets are just a term used for all the bets placed – when you make a bet, a ticket is created.

\n", + "

To get the bet percentage, you look at all the bets placed (regardless of the amount of money risked on each one), again, sorting first by the type of bet, and then look at the percentage of tickets on each side of the game.

\n", + "

This is a more square way to look at NFL betting trends, since a $1 throw-away bet holds the same weight as a $1,000+ play.

\n", + "

How Can Bet Percentages and Money Percentages Signal Sharp Action?

\n", + "

As mentioned, ticket percentage does not consider the amount risked on each ticket, and just counts each bet placed. If we compare the bet percentage and money percentage of the same team (for the same bet type), you’ll know something is up if they are not relatively similar.

\n", + "

For example, if Team A has 78% of the tickets bet against the spread, but only has 50% of the money, we now know the bets being placed on Team A are quite small – or the bets being placed on Team B are quite large.

\n", + "

A large difference between a team’s bet and money percentages can help signal sharp action. In order to calculate this, just subtract their bet percentage from their money percentage. If the result is a positive number, you’ve got larger bets being placed on this team. If the result is a negative number, you’ve got larger bets being placed on the other team.

\n", + "

This is not 100% accurate in signaling sharp action, however. It does provide an early sign, but you’d need to know the total handle bet on the game to properly sniff out sharp action. For example, if a game only has $1,000 wagered on it, you can throw out the idea of sharp action.

\n", + "

If you’re on the hunt for new sportsbooks and are hungry for irresistible welcome offers, we’ve got some recommendations. Utilizing the primary Bet365 bonus code can unlock a fantastic promotion upon registration: Bet $1 and Get $200 in Bonus Bets. Taking advantage of boosted odds specials can enhance your NFL wagers, and with a FanDuel promo code, you can elevate your potential winnings.

\n", + "

Starting your NFL betting journey with a BetMGM promo code is an ideal way to experience the ‘King of Sportsbooks’. You may have noticed numerous advertisements for DraftKings during NFL games, but don’t disregard them, as claiming a DraftKings promo code can greatly contribute to your success as a bettor.

\n", + "

NFL Public Betting Trends FAQ

\n", + "
\n", + "
\n", + "

Is it better to bet against the public in NFL?

\n", + "

\n", + "\t\t\t\t\t\tThe answer changes from season to season. In 2021, betting against the public resulted in a winning record (140-137-4) but because of the juice (usually -110) it was not profitable. With a standard -110 vig, bettors need to win 52.4% of their wagers to make a profit. Last year, betting against the public only resulted in a 50.5% win rate.\t\t\t\t\t

\n", + "
\n", + "
\n", + "
\n", + "
\n", + "
\n", + "

What percentage of NFL favorites cover the spread?

\n", + "

\n", + "\t\t\t\t\t\tOver the past ten seasons, favorites have only covered 48.2% of the time.\t\t\t\t\t

\n", + "
\n", + "
\n", + "
\n", + "
\n", + "
\n", + "

What is the biggest trend in NFL betting?

\n", + "

\n", + "\t\t\t\t\t\tLooking for something to follow blindly? SBD's NFL score predictor is 51-36-3 ATS all-time and is up 23.38 units on upset picks, i.e. when it predicts the betting underdog will win straight-up. To see its projections, go to SBD's NFL odds page, find the matchup you're interested in, and click FULL GAME STATS. The ensuing page will display the predicted score.\t\t\t\t\t

\n", + "
\n", + "
\n", + "
\n", + "\n", + "
\n", + "
" + ] + }, + "execution_count": 44, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "url = 'https://www.sportsbettingdime.com/nfl/public-betting-trends/'\n", + "resp = requests.get(url,headers=headers)\n", + "soup = BeautifulSoup(resp.text, 'html.parser')\n", + "soup" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "import pandas as pd\n", + "import requests\n", + "from bs4 import BeautifulSoup\n", + "\n", + "headers = {\n", + "'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7',\n", + "'Accept-Encoding': 'gzip, deflate',\n", + "'Accept-Language': 'en-US,en;q=0.9',\n", + "'Cache-Control': 'max-age=0',\n", + "'Connection': 'keep-alive',\n", + "'Dnt': '1',\n", + "'Upgrade-Insecure-Requests': '1',\n", + "'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36'\n", + "}\n", + "url = 'https://www.bovada.lv/sports/football'\n", + "resp = requests.get(url,headers=headers)" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "soup = BeautifulSoup(resp.text, 'html.parser')\n", + "soup" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.11.5" + }, + "orig_nbformat": 4 + }, + "nbformat": 4, + "nbformat_minor": 2 +}