Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add draft support #18

Open
amarvin opened this issue Aug 5, 2019 · 2 comments
Open

Add draft support #18

amarvin opened this issue Aug 5, 2019 · 2 comments

Comments

@amarvin
Copy link
Owner

amarvin commented Aug 5, 2019

No description provided.

@amarvin
Copy link
Owner Author

amarvin commented Oct 19, 2021

Note that VOR calculation isn't accurate pre-draft (#48).

@amarvin
Copy link
Owner Author

amarvin commented Aug 29, 2024

To get rough VOR before a draft, can edit scraper.py to be like:

    # Calculate VOR
    columns = ["Week {}".format(i) for i in range(current_week(), 18)]
    df["Remaining"] = df[columns].sum(axis=1)
    df.sort_values(by="Remaining", ascending=False, inplace=True)
    available = df.loc[df["Owner ID"].isnull()]
    more_to_draft = {
        "QB": 20,
        "RB": 49,
        "WR": 57,
        "TE": 16,
        "K": 13,
        "DEF": 13,
    }
    drop_indexes = []
    for index, row in available.iterrows():
        positions = row["Position"].split(",")
        position = positions[0]  # TODO: pick their best position somehow
        if more_to_draft[position] > 0:
            drop_indexes.append(index)
            more_to_draft[position] -= 1
    available.drop(index=drop_indexes, inplace=True)
    means = (
        available.groupby(["Position"])["Remaining"].nlargest(3).groupby(level=0).mean()
    )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant