53 lines
1.9 KiB
Markdown
53 lines
1.9 KiB
Markdown
# Lottery_Project
|
|
|
|
A Python project to analyze and pick lottery numbers using past draw results to predict future draws.
|
|
|
|
## Draw Dates
|
|
|
|
Mega Millions drawings are held every Tuesday and Friday. Powerball drawings are held every Monday,
|
|
Wednesday, and Friday. In order to conserve processing cycles, the predictor will only request new data
|
|
if there is the potential for new drawings to collect and save.
|
|
|
|
|
|
## Storage
|
|
|
|
The data will eventually be stored in database tables for faster execution. This will also allow for dynamic
|
|
calls for more data based on the draw dates and last drawing stored locally.
|
|
|
|
## Historical Info
|
|
|
|
The first Powerball drawing was on April 22, 1992.
|
|
The first Mega Millions drawing was on September 6, 1996. The original name was "The Big Game" and was
|
|
rebranded to Mega Millions in May 2002.
|
|
|
|
Historical results can be scraped from the web and added to the database from the URLs below. The
|
|
results must be scraped by year. Changing the year in the URLs alters the resultset displayed.
|
|
|
|
Powerball: https://www.lotto.net/powerball/numbers/1992
|
|
Mega Millions: https://www.lotto.net/mega-millions/numbers/1996
|
|
|
|
## Environment Variables
|
|
|
|
To facilitate environment variables for testing or execution, create a .env file in the root folder of
|
|
the project and add the following lines to it:
|
|
|
|
DATABASE_URL="sqlite:///predictor.db"
|
|
POWERBALL_INCEPTION="1992"
|
|
MEGA_MILLIONS_INCEPTION="1996"
|
|
BASE_SCRAPE_URL="https://www.lotto.net/"
|
|
TARGET_CONTAINER="div"
|
|
TARGET_CLASS="archive-container"
|
|
BALL_CLASS="ball ball"
|
|
POWERBALL_CLASS="ball powerball"
|
|
MEGABALL_CLASS="ball mega-ball"
|
|
POWERBALL_MULTIPLIER_CLASS="ball power-play"
|
|
MEGA_MILLIONS_MULTIPLIER_CLASS="ball megaplier"
|
|
DATE_CLEAN_REGEX="r'(st|nd|rd|th)'"
|
|
DATE_INPUT_FORMAT="%B %d %Y"
|
|
|
|
## TO-DOs
|
|
|
|
1. Review standard tests for sqlalchemy objects
|
|
2. Decide which DBE to use for data storage
|
|
3. Continue starter code review
|