Giter Site home page Giter Site logo

c-wilkinson / basic-fpl-scrape-scripts Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 0.0 364 KB

Some basic scripts to generate FPL statistics and analysis for FPL and number geeks

License: The Unlicense

PowerShell 97.37% Python 2.63%
fantasy-premier-league fpl-analysis fpl-league-scrape powershell-script

basic-fpl-scrape-scripts's Introduction

basic-FPL-scrape-scripts

This repository represents my interest in numbers, fantasy football and experimentation with languages I don't often use. I'll split the repository by language then by title. The whole thing is covered under a "do as you wish" license.

License: Unlicense

CodeFactor

Codacy Badge

PowerShell

PSFPLInfo

Badges

License: Unlicense PowerShell Gallery Downloads PowerShell Gallery Version Github Version

Unit Tests

Create Mini-League Chart For Work Mini-League AuthenticationTestsChartCreationTests

Information

PSFPLInfo PowerShell Package Gallery.

This is a PowerShell module that scrapes the FPL website and generates objects that you can use. Usage is simple:

Install-Module -Name PSFPLInfo -Force; 
Import-Module -Name PSFPLInfo -Force; 

$session = Authenticate {your login e-mail} {your login password};
$league = Get-League {your mini league ID} $session;
$chart = Chart $league;

The three objects generated there are an FPL websession (used to allow you to scrap your mini-league data), a mini-league object (consisting of Manager, TeamName, TeamId, TeamValue and an array of GameWeekHistory) and a chart object. The chart object can be saved by calling:

$chart.SaveImage("somePath\someFile.png", "PNG");

This generates a line graph of the history of your mini-league rankings.

Python

PYFPLInfo

To come.

basic-fpl-scrape-scripts's People

Contributors

c-wilkinson avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

basic-fpl-scrape-scripts's Issues

Script doesn't deal with multiple pages

Leagues on multiple pages only display the first page in the chart and statistics. The chart should probably remain as a single page, but the rest of the statistics should consider all of the pages

Security issues in multiple files

Decide whether it's worth making the user create a credential rather than passing in a username and password. This is required for the Authenticate function, which then has a knock on to some of the unit tests.

Improve the help on each public function

Technically doesn't help the code review score, but we'll place it in that project there anyway. Need examples, outputs etc. This will make it easier to navigate around the objects.

Predicated best transfer

Using predicted score per player and team objects, suggest transfers for each team. See note book.

Scrape all players in the game

New object. Lots of data, so probably want to store to disk (JSON objects per player?) which will need to be updated when a gameweek completes. If scrape is fired and JSON data already up to date, then we need to do a shortcut and not scrape the data again.

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.