Giter Club home page Giter Club logo

ncaa-stats's Introduction

ncaa-stats

  • currently supports retrieving the following types of statistics:
    • individual stats
    • team stats
    • individual game highs
    • team game highs

install

npm install ncaa-stats

use

Get sports data

var ncaa = require('ncaa-stats');

// get all available sports
ncaa.sports.getSports().then((data) => {
    console.log(data);
});

// get list of seasons for a particular sport (e.g. Men's Basketball')
ncaa.sports.getSeasons('MBB').then((data) => {
    console.log(data);
});

// get list of divisions for a particular sport and season
ncaa.sports.getDivisions({
    sport: 'MFB', // Football
    season: '2017' // The 2016-2017 season
}).then((data) => {
    console.log(data);
});

// get statistical categories and available ranking periods for a set of parameters
ncaa.sports.getSportDivisionData({
    sport: 'MFB', // Football
    season: 2016, // The season ending in 2016 (i.e. the 2015-2016 season)
    division: 11, // Division I FBS
    type: 'individual', // individual statistics
    gameHigh: false // regular statistics
}).then((data) => {
    console.log(data);
});

ncaa.sports.getSportDivisionData({
    sport: 'MFB', // Football
    season: 2016, // The 2015-2016 season
    division: 12, // Division I FCS
    type: 'team', // team statistics
    gameHigh: true // game high statistics
}).then((data) => {
    console.log(data);
});

Get individual statistics

var ncaa = require('ncaa-stats');

// get individual stats

ncaa.stats.getIndividualStats({
    sport: 'MFB', // Footbal
    division: '11', // Div I FBS
    category: '20' // All purpose yardage
        // defaults to most recent year and ranking period if none specified
}).then((data) => {
    console.log(data);
});

// get individual game highs

ncaa.stats.getIndividualGameHighs({
    sport: 'MBB', // Men's Basketball
    division: '2', // Division II
    season: '2016', // The 2015-2016 season
    category: '612' // Field Goals Made
}).then((data) => {
    console.log(data);
});

Get team statistics

var ncaa = require('ncaa-stats');

// get team statistics
ncaa.stats.getTeamStats({
    sport: 'MIH', // Men's Ice Hockey
    division: '3', // Division III
    season: '2015', // The 2014-2015 season
    category: '173' // Goal Against Average
}).then((data) => {
    console.log(data);
});

// get team game highs
ncaa.stats.getTeamGameHighs({
    sport: 'WSO', // Women's Soccer
    division: '1', // Division I
    season: '2016', // The 2015-2016 season
    category: '746' // Attendance
}).then((data) => {
    console.log(data);
});

license

MIT

ncaa-stats's People

Contributors

bluescar avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  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.