You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+32-1Lines changed: 32 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ This repository contains a modified version of Jay Zheng's draftaid-react projec
19
19
## Installation and usage
20
20
I have included a script that can be used for easy local deployment. In the top level of this project, use the command `./run.sh` from the terminal to have the project install, build, and run all at once. When built, the application will be served at [http://localhost:3000](http://localhost:3000).
21
21
22
-
Note: for the `fetch_fp.py` script you'll need to install a couple of dependencies, such as Selenium and Beautifulsoup. For the most part, they can just be installed by running `pip install <dependency>`, but pay attention to the logs for the exact package you'll need to install.
22
+
Note: for the `fetch_fp.py` script you'll need to install a couple of dependencies, such as Selenium and Beautifulsoup (and Python+pip, of course). I've included a "requirements.txt" file that can be used with `pip`to fetch the dependencies: `pip3 install -r requirements.txt`
23
23
24
24
If you are interested in external web hosting, please see Jay Zheng's original repos for more details. This is a react-based project, so the commands required to run this application are:
25
25
@@ -31,6 +31,35 @@ Note that you will need to have npm installed and configured on your machine.
31
31
32
32
Also note that you'll need geckodriver located in the `/data` folder, see the 2021 update blurb above for more details.
33
33
34
+
### Example of first-time usage:
35
+
1.`pip3 install -r data/requirements.txt` to install the python dependencies with
36
+
2. run `bash run.sh` to automate the rest of the process, which includes:
37
+
- running the `fetch_fp.py` script
38
+
- npm install, build, and start
39
+
40
+
## JSON Format
41
+
42
+
You are, of course, able to use your own rankings json with a bit of manual configuration. The format for the json is very primative; there are only two attributes, one of which contains an array of player data. It looks something like:
43
+
44
+
```
45
+
{
46
+
"format": $format, // where format is either standard, half_ppr, or ppr
47
+
"rankings": [ // array of player data
48
+
{
49
+
"tier": 1
50
+
"rank": 1
51
+
"name": Christian McCaffrey
52
+
"team": CAR
53
+
"position": RB
54
+
"bye_week": 13
55
+
},
56
+
...
57
+
]
58
+
}
59
+
```
60
+
61
+
You will need to supply the files in the naming convention `rankings_$FORMAT.json`, where $FORMAT is either: `standard`, `half_ppr`, or `ppr`.
62
+
34
63
## Differences from the original application
35
64
36
65
Jay Zheng's original application is great out of the box. However, I wanted to tweak a few things before using it for my own fantasy draft purposes.
@@ -43,3 +72,5 @@ Jay Zheng's original application is great out of the box. However, I wanted to t
43
72
## Kudos
44
73
45
74
Thank you to [Jay Zheng](https://github.com/jayjzheng) for creating this application, and elevating my draft results for (hopefully) many upcoming Fantasy Football seasons to come.
75
+
76
+
Kudos to kellenproctor for their PRs to draftaid-react! I was able to salvage the `fantasyProCsv.py` file to use a local player data .json file for the application from 2018 to 2020. This allowed for an extra ~200 data items for the application, which made it possible to track kickers and more defense options. While the script no longer works in 2021 and has since been removed from this repo, it served as the base idea for `fetch_fp.py`.
0 commit comments