Added historical record analysis
This commit is contained in:
@@ -9,3 +9,12 @@ Previously there were records dating back to 1992 that were removed by the websi
|
||||
I am welcoming anyone who wants to to port it to their own state/country to do so. I currently have a website www.wvlotterypredictor.xyz hosting my numbers to be refreshed daily. Collaboration and suggestion to a more accurate algorithm is also welcome. I can be contacted about the project through my site email, on here, or on the Twitter linked on my site.
|
||||
|
||||
# Good luck!
|
||||
|
||||
# CHANGELOG
|
||||
- June 29th 2022: Added support for old data that was previously scrubbed from the lottery site. It is more accurate and more accurate than the previous one. Chance for daily3 is now bugged however due to the large amount of numbers and dates. This will be fixed soon.
|
||||
|
||||
# TODO:
|
||||
- Correct chance numbers for Daily3
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -5,6 +5,10 @@ import requests
|
||||
from collections import Counter
|
||||
|
||||
def get_data():
|
||||
# old data from WVLottery.com
|
||||
df_old = pd.read_excel('./excel_lotto_records/cash25.xlsx')
|
||||
salvaged = df_old[['Date', 'Numbers']]
|
||||
|
||||
url = 'https://wvlottery.com/draw-games/cash-25/?game-analyze=cash-25&what-to-search=historysearch&date-range=-1'
|
||||
header = {
|
||||
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.75 Safari/537.36",
|
||||
@@ -16,7 +20,7 @@ def get_data():
|
||||
dfs = pd.read_html(r.text)
|
||||
pd.set_option('display.max_rows', None)
|
||||
# Specifies no max rows, otherwise only shows 10 records
|
||||
df = dfs[0]
|
||||
df = dfs[0].append(salvaged, ignore_index=True)
|
||||
df2 = df[['Date', 'Numbers']]
|
||||
date = list(df2['Date'])
|
||||
nums = list(df2['Numbers'].astype('str'))
|
||||
|
||||
@@ -5,7 +5,7 @@ import requests
|
||||
from collections import Counter
|
||||
|
||||
def get_data():
|
||||
url = 'https://wvlottery.com/draw-games/daily-3/?game-analyze=daily-3&what-to-search=historysearch&date-range=1'
|
||||
url = 'https://wvlottery.com/draw-games/daily-3/?game-analyze=daily-3&what-to-search=historysearch&date-range=-1'
|
||||
header = {
|
||||
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.75 Safari/537.36",
|
||||
"X-Requested-With": "XMLHttpRequest"
|
||||
@@ -37,7 +37,7 @@ for n in range(0, 10):
|
||||
|
||||
sorted_nums = sorted(likely_nums)
|
||||
total_freq = sum(frequency)
|
||||
Chance = frac(total_freq, 1000) # Chance = number call freq / all possible numbers i.e. 1000
|
||||
Chance = frac(total_freq, 15000) # Chance = number call freq / all possible numbers i.e. 1000
|
||||
Winning_Numbers = str("-".join(sorted_nums))
|
||||
|
||||
print(f"Likely numbers are . . . {Winning_Numbers} \n"
|
||||
|
||||
@@ -5,6 +5,10 @@ import requests
|
||||
from collections import Counter
|
||||
|
||||
def get_data():
|
||||
# Old data from WVLottery.com
|
||||
df_old = pd.read_excel('./excel_lotto_records/daily4.xlsx')
|
||||
salvaged = df_old[['Date', 'Numbers']]
|
||||
|
||||
url = 'https://wvlottery.com/draw-games/daily-4/?game-analyze=daily-4&what-to-search=historysearch&date-range=-1'
|
||||
header = {
|
||||
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.75 Safari/537.36",
|
||||
@@ -15,7 +19,7 @@ def get_data():
|
||||
dfs = pd.read_html(r.text)
|
||||
pd.set_option('display.max_rows', None)
|
||||
# Specifies no max rows, otherwise only shows 10 records
|
||||
df = dfs[0]
|
||||
df = dfs[0].append(salvaged, ignore_index=True)
|
||||
df2 = df[['Date', 'Numbers']]
|
||||
date = list(df2['Date'])
|
||||
nums = list(df2['Numbers'].astype('str'))
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+4
-1
@@ -5,6 +5,9 @@ import requests
|
||||
from collections import Counter
|
||||
|
||||
def get_data():
|
||||
df_old = pd.read_excel('./excel_lotto_records/lotto_america.xlsx')
|
||||
salvaged = df_old[['Date', 'Numbers', 'SB', 'All Star']]
|
||||
|
||||
url = 'https://wvlottery.com/draw-games/lotto-america/?game-analyze=lotto-america&what-to-search=historysearch&date-range=-1'
|
||||
header = {
|
||||
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.75 Safari/537.36",
|
||||
@@ -16,7 +19,7 @@ def get_data():
|
||||
dfs = pd.read_html(r.text)
|
||||
pd.set_option('display.max_rows', None)
|
||||
# Specifies no max rows, otherwise only shows 10 records
|
||||
df = dfs[0]
|
||||
df = dfs[0].append(salvaged, ignore_index=True)
|
||||
df2 = df[['Date', 'Numbers', 'SB', 'All Star']]
|
||||
date = list(df2['Date'])
|
||||
nums = list(df2['Numbers'].astype('str'))
|
||||
|
||||
+6
-1
@@ -5,6 +5,11 @@ import requests
|
||||
from collections import Counter
|
||||
|
||||
def get_data():
|
||||
# previous records which have since been removed from wvlottery.com's database
|
||||
df_old = pd.read_excel('./excel_lotto_records/lotto.xlsx')
|
||||
salvaged = df_old[['Date', 'Numbers', 'PB', 'PPX', 'Winners WV Only', 'Payout WV Only']]
|
||||
|
||||
# Current web records
|
||||
url = 'https://wvlottery.com/draw-games/powerball/?game-analyze=powerball&what-to-search=historysearch&date-range=-1'
|
||||
header = {
|
||||
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.75 Safari/537.36",
|
||||
@@ -15,7 +20,7 @@ def get_data():
|
||||
dfs = pd.read_html(r.text)
|
||||
pd.set_option('display.max_rows', None)
|
||||
# Specifies no max rows, otherwise only shows 10 records
|
||||
df = dfs[0]
|
||||
df = dfs[0].append(salvaged, ignore_index=True)
|
||||
df2 = df[['Date', 'Numbers', 'PB', 'PPX', 'Winners WV Only', 'Payout WV Only']]
|
||||
date = list(df2['Date'])
|
||||
nums = list(df2['Numbers'].astype('str'))
|
||||
|
||||
+5
-1
@@ -5,6 +5,10 @@ import requests
|
||||
from collections import Counter
|
||||
|
||||
def get_data():
|
||||
# previous records which have since been removed from wvlottery.com's database
|
||||
df_old = pd.read_excel('./excel_lotto_records/lotto_megamil.xlsx')
|
||||
salvaged = df_old[['Date', 'Numbers', 'MB']]
|
||||
|
||||
url = 'https://wvlottery.com/draw-games/mega-millions/?game-analyze=mega-millions&what-to-search=historysearch&date-range=-1'
|
||||
header = {
|
||||
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.75 Safari/537.36",
|
||||
@@ -16,7 +20,7 @@ def get_data():
|
||||
dfs = pd.read_html(r.text)
|
||||
pd.set_option('display.max_rows', None)
|
||||
# Specifies no max rows, otherwise only shows 10 records
|
||||
df = dfs[0]
|
||||
df = dfs[0].append(salvaged, ignore_index=True)
|
||||
df2 = df[['Date', 'Numbers', 'MB', 'MP']]
|
||||
date = list(df2['Date'])
|
||||
nums = list(df2['Numbers'].astype('str'))
|
||||
|
||||
@@ -4,15 +4,15 @@
|
||||
# MIT License
|
||||
# Edit to your need
|
||||
|
||||
echo "Powerball" &&
|
||||
echo "<--------> Powerball <-------->" &&
|
||||
python lottopy_pb.py &&
|
||||
echo "MegaMillions" &&
|
||||
echo "<--------> MegaMillions <-------->" &&
|
||||
python megamil.py &&
|
||||
echo "Lotto America" &&
|
||||
echo "<--------> Lotto America <-------->" &&
|
||||
python lotto_america.py &&
|
||||
echo "Daily3" &&
|
||||
echo "<--------> Daily3 <-------->" &&
|
||||
python daily3.py &&
|
||||
echo "Daily4" &&
|
||||
echo "<--------> Daily4 <-------->" &&
|
||||
python daily4.py &&
|
||||
echo "Cash25" &&
|
||||
echo "<--------> Cash25 <-------->" &&
|
||||
python cash25.py
|
||||
|
||||
Reference in New Issue
Block a user