Git Product home page Git Product logo

usau-scraper's Introduction

USAU logo surrounded by data icons

The USAU scraper is a data collector that allows developers to easily aggregate and use team results, rosters, and schedule data from the USAU website.

Apache Liscence

PyPI

Docs Collab Example

Build Status Open Issues codecov

Overview

USAU (USA Ultimate) is the governing body of ultimate frisbee, and its website (which is notoriously hard to navigate) contains all of the information about high school, college, and club ultimate frisbee teams. Right now, there is no easy way to access this data. USAU scraper solves this problem by scraping the USAU website for data and therefore allowing other developers to easily use the data on the USAU site. This project will open the door to more data analytic projects concerning ultimate frisbee.

Installation

pip install usau-scraper

How to Use

After installing the library, there are currently 3 functions available for use: getTeamInfo, getTeamSchedule, and getTeamRoster.

Simply import * from usau_scraper, and then call any of the following functions:

getTeamInfo()

getTeamInfo() returns all information about the first 20 teams matching the query

Input: schoolName, teamName, genderDivision, state, competitionLevel, competitionDivision, and teamDesignation as named arguments

Output:

{
    res: OK, NOTFOUND
    teams: [
        {
            schoolName,
            teamName,
            competitionLevel,
            genderDivision,
            location,
            coaches,
            website,
            facebook,
            twitter,
        },
        ...
    ]
}

getTeamSchedule

getTeamSchedule() returns the season schedule and record of the first 20 teams matching the query

Input: schoolName, teamName, genderDivision, state, competitionLevel, competitionDivision, and teamDesignation as named arguments

Output:

{
    res: OK, NOTFOUND
    teams: [
        {
            schoolName,
            teamName,
            competitionLevel,
            genderDivision,
            wins,
            losses,
            tournaments: {
                name: {
                    games: [
                        {
                            date,
                            score,
                            opponentCollege,
                            opponentTeamPage
                        },
                        ...
                    ]
                },
                ...
            },
        },
        ...
    ]
}

getTeamRoster

getTeamRoster() returns the roster of the first 20 teams matching the query

Input: schoolName, teamName, genderDivision, state, competitionLevel, competitionDivision, and teamDesignation as named arguments

Output:

{
    res: OK, NOTFOUND
    teams: [
        {
            schoolName,
            teamName,
            competitionLevel,
            genderDivision,
            roster: [
                {
                    no,
                    name,
                    pronouns,
                    position,
                    year,
                    height,
                },
                ...
            ]
        },
        ...
    ]
}

Example Usage

After pip install --upgrade usau-scraper in your python env:

from usau_scraper import getTeamInfo, getTeamSchedule, getTeamRoster

# Get a team's basic information
print(getTeamInfo(
    schoolName = 'Columbia', 
    teamName = 'Baewatch', 
    genderDivision='Women', 
    state='NY', 
    competitionLevel='College', 
    competitionDivision='Division 1', 
    teamDesignation='B'))

# Get a team's schedule for the current season
print(getTeamSchedule(schoolName='Columbia', teamName='Curbside'))

# Get a team's roster for the current season
print(getTeamRoster(schoolName='Columbia', teamName='Curbside'))

Additional usage examples are in this notebook.

Features (MVP)

  • A function that, given a team name, returns basic information about them.
  • A function that, given a team name, returns their schedule and record.
  • A function that, given a team name, returns its roster.
  • A function that, given a tournament name, returns the results of the tournament.

Additional features

  • A function that, given a college division, returns the current standings of that division.
  • An additional plugin to ultiworld to show recent articles given a team name or college division.
  • More features tbd!

Possible Applications

  • A seeding helper that, given a list of team names, returns their records for the season and their record against top 25 teams.

usau-scraper's People

Contributors

erin2722 avatar

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.