Git Product home page Git Product logo

sportsbook's People

Contributors

dependabot[bot] avatar pringleman83 avatar surister avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sportsbook's Issues

Custom Pretty Print function only prints items in multiples of 3

When the custom pretty print function displays a list or dictionary, it only displays items up to the last multiple of 3. Anything else is omitted.

For example, there are 37 leagues to choose from, but only 36 are displayed. Some leagues have 20 teams to choose from, but only 18 are displayed.

Postponed games showing in fixtures

When searching for fixtures within a specified range, the code only checks for the future date when it needs to stop looking. Eg. for fixtures over the next five days, it will gather all predictions for until 5 days from now.

In the scraping process, anything with a score is considered a result. If there is no score it is considered a fixture.

The problem is, if a game is postponed, the "P" from the score is replaced with "" and the game is being considered a fixture. As there is no filter for how far back to look when looking for fixtures, the postponed games still show in fixtures. There is some logic to this I guess, as the games still need to be played. However, if the game is refactored into the fixtures, it'll show twice.

Anyway, I need to change how this works so that postponed games are not shown in upcoming fixtures.

Creating other branches

I think this would help you update code.
Master branch could stay untouched until you build up enough features, while feature branch would allow you and other people to contribute.
Cheers, sara

Export to JSON - Import from JSON problem

In the league selection menu (the wrong place for this option, but that's another issue), there are options to export the current leagueData dictionary to a JSON file and to import a previously exported dictionary from a JSON file.

The filename for exporting and importing is currently fixed to leagueData.

The system appears to work. When exported, the generated file appears to be accurate. When imported after the code is freshly run, I can run the display league option (also wrongly in the league selection menu) and the leagueData dictionary that has been imported from the JSON file is displayed.

However, the main football menu doesn't recognise that a league is loaded (it states "No league selected" and when I attempt to run a manual single game analysis (in the main football menu), none of the teams that should be available are listed.

I suspect the import process isn't placing some or all of the elements of the JSON file where they need to be in the dictionary.

This is a priority on my huge list of things to do.

Exporting league_data doesn't export fixtures...

... and, of course, importing league data doesn't import them either.

This means that imported data can't be used to run predictions. It also can't be used for any possible future uses that require fixture information or (in the more distant future) results data.

The best solution I can think of is to store the fixtures in the league_data dictionary. Maybe also store predictions in that dictionary too. It would make future analysis simpler.

Maybe there could be a menu for export type (League info only, fixtures, predictions etc...)

Please discuss...

Previous improvements lost

I fixed a few issues in the project including menu responses that didn't make sense, incorrect text spacing and a bit of further tidying. Unfortunately, these were lost in the last update (that'll teach me to branch!). I'm just in the process of reintroducing them.

Fixtures not coming in in order

Sometimes, scraped fixtures aren't being displayed in the correct order. This is probably due to threading the scraping process as this means that multiple threads are adding fixtures to the fixtures list at the same time. A lock currently prevents this from causing data to become corrupt, but I don't think it's enough to keep the leagues from falling out of order.

Resolution: Add post processing after each scrape to sort the fixtures into league order. This needs to be done automatically, what ever scrape system is used, before predictions are run. The code would need to be added to the scraper_function, after scraping takes place.

(Updated) Tidying... move export and import functions to common functions +

The import json and export json functions in football.py need to be moved to the common functions file. This will involve making sure that they are properly referenced when called.

The import and export functions will also need to be ask the user for a filename to save to. For the export function (which currently accepts a filename argument), this will mean reducing the number of arguments taken and therefore altering any code that calls the function.

Any questions, comment or get in touch on Slack.

The league selection menu has some options that need to be moved

This menu was the only menu in the early stages of the project. However, now there are three options that need to be moved to appropriate places in the football menu. Options 97, 98 and 99 (Display league data, Import JSON and Export JSON respectively).

They would probably go into a sub menu in Reports (found in the main football menu).

Update league selection screen

The league selection screen needs to:

  1. At the "Select league" prompt, an option needs to be provided to return to the previosu menu. (Enter "M" to return to the previous menu.)
  2. Advise that league data and fixtures have downloaded successfully.
  3. Offer the option of selecting another league.

Manual single game analysis irresponsive?

LOG:

Selected league(s):

5 Spanish Primera

(1) Select another league
(2) Download upcoming fixtures*
(3) Display upcoming fixtures*
(4) Run analytics on upcoming fixtures*
(5) Display analytics in upcoming fixtures*
(6) Single game analysis from fixture list*
(7) Manual single game analysis
(8) Reports
(9) Import data from JSON file
(10) Clear currently loaded league data
(M) Previous menu

Items marked with a * are not available in this version.
7
1 Barcelona
2 Real Madrid
3 Sevilla
4 Atlético Madrid
5 Real Betis
6 Deportivo Alavés
7 Espanyol
8 Celta de Vigo
9 Getafe
10 Real Valladolid
11 Girona
12 Villarreal
13 Real Sociedad
14 Valencia
15 Athletic Club
16 Levante
17 Eibar
18 Rayo Vallecano
19 Huesca
20 Leganés

Select home team from the above list.
1

Select home team from the above list.
2

Select home team from the above list.
6

Select home team from the above list.


Am I missing something? This is not working as intended right?

Add league options

The league menu needs some further options:

  1. Options for grouped leagues (For example, English leagues, Spanish leagues, UK leagues etc.)
  2. An option for all leagues. (DONE)

This will need some code implementing, probably generating a list of the selected leagues and iterating through that list, processing the league and fixture scraping function).

"Single game analysis" visual comparison problem and to do

The current display shows wins, draws and losses per game compared on the same chart as goals for and against per game and points per game.

The problem is, the highest wins, draws and/or losses per game can only ever be 1. The highest goals for/against per game is unlimited. The highest points per game can only be 3. The three comparisons each need their own charts.

image

An interesting addition would be goal difference per game. However, this would also run to negative numbers on the y axis and so, again, would need another chart.

The ideal solution would either be to display multiple charts at once, or to utilise the next button that shows on the chart. However, the "next chart" option might not work in some interpreters (such as Spyder) as the charts are displayed inline. Trial and error...

Store fixtures based on date

The fixture scraping process currently scrapes the next 15 fixtures for each league. All of these fixtures are stored in the fixtures list.

As dates are also scraped, this can and should be tidied up so that fixtures within a specific date range are saved only. This should be the next 7 days by default, but the idea is open for discussion and ideas (could load all fixtures from the next three available dates).

Add pipfile perhaps an installation guide

Would be awesome to add a pipfile and a installation md.

That would ease new contributors and we can say pretty much that it's the canon for almost every open python project.

A pipfile is a file generated from 'pipenv' (a python packaging manager) it's the sum of pip and virtualvenv, using pipenv and having a pipfile, any new contributor would only need to write 1 command on their terminal to have anything they need (modules) automatically installed, all the process step by step would be written in the installation.md/howtouse.md/whatevername.md.

I could do that in no time once you approve of this.

[Feature][Future] UI for the app.

Once the project gets bigger it might be interesting to make an UI for it, so it'd go from being a CLI (command line interface) app to a full featured desktop app :P!.

overall project organization

The project is getting a bit dense, with all those .md files and what not, to make it easier I will follow common practice of putting al the code relevant files ina src (source) folder.

League scraping notification problem.

Whens scraping multiple leagues, on occasion, two "X League download complete" updates appear on the same line.

This is related to the threading that is taking place to speed up the scraping process. The print statement that displays that message may need a lock on it.

After predictions are generated...

After selecting the option to generate predictions for current fixtues, an option needs to be introduced to display the predictions there and then.

[Feature][Future] Add database + self long term prediction

Dropping this for the future just in case someone ever ran out of stuff to do.

Basically add a database system that'd store every data the user looked for and perhaps having a lot of games/data we could add some precision to the prediction as we'd have some trend line.

Making the project more object oriented?

The project is looking good bit it's getting a bit big, maybe instead of wrapping everything in functions we can start playing with some classes, that'd make the code insanely more tidy

Prediction system overhaul

  1. Set up a new prediction list standard (for storing predictions):
    [["Prediction name","Game Date", "Time", "Home Team", "Home Team Score", "Away Team", "Away Team Score", "Prediction Algorithm", "Data associated with this prediction"]]

  2. Set up a list of prediction algorithms:
    ["Prediction name", "Prediction algorithm"]

  3. Ask the user what algorithm to use when running predictions:

  • List the available algorithms
  • Offer the option to run all agorithms on each game

Help, Predictions

Hi I`m guessing this is based on home win away win and draws
So this match is a draw Chojniczanka Chojnice 2 Bytovia Bytów 2 ?

But I have seen a match e.g. stockport 5 west ham 1
as stockport as 5 what does this mean please

James

Hi

I found out Multiplication based on time calculation where you can win bet with stake 100 for 100k jackpot, but i cant complete on python but i did with excel, but here i need some help from you,.

im happy to share my method with you, but i dont no how to communicate with you, im in lodon, i noticed your from birmingahm, 00447309686227

give me a call, I predict 95 percentage of cricket matches, with python on excel. maths python model,00447309686227 please give me a call, if its work its jackpot,

To do: Select leagues needs to be a separate function

The select_leagues function needs to be separated so that there is a separate function for the selection of leagues only. The new function needs an extra argument for whether multiple selection is allowed. This could be set by default to True or False.

I expect it will only be necessary for it to take the available leagues list and optional Boolean value for multi and it will return the selected league(s). The format of the returned item will need some consideration of other functions. Ideally, It'll always be a list, even if the list only contains one item. It may be necessary to edit dependant functions to make this work though.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.