GithubHelp home page GithubHelp logo

onebitbrain / nflcmd Goto Github PK

View Code? Open in Web Editor NEW

This project forked from burntsushi/nflcmd

0.0 2.0 0.0 216 KB

A collection of command line utilities for viewing NFL statistics and rankings with nfldb.

License: The Unlicense

Makefile 2.43% Python 97.36% Vim Script 0.20%

nflcmd's Introduction

nflcmd is a set of command line programs for interacting with NFL data using nfldb. This includes, but is not limited to, viewing game stats, season stats and ranking players by any combination of statistical category over any duration.

There are two main goals of this project:

  • The commands should be simple with sane defaults.
  • Commands should be reasonably fast.

Documentation and getting help

Run any of the commands with the --help flag:

nflstats --help
nflrank --help

nflcmd has some API documentation, but it's mostly only useful to developers seeking to add more commands.

If you need any help or have found a bug, please open a new issue on nflcmd's issue tracker or join us at our IRC channel #nflgame on FreeNode.

Installation and dependencies

nflcmd depends only on nfldb, which includes having a PostgreSQL database accessible to you.

I've only tested nflcmd with Python 2.7 on a Linux system. In theory, nflcmd should be able to work on Windows and Mac systems as long as you can get PostgreSQL running. It is not Python 3 compatible.

Examples for nflstats

nflstats shows either game or season statistics for a player.

Show Tom Brady's stats for the current season:

nflstats tom brady

Or for all seasons (in nfldb):

nflstats tom brady --season

Or only show his stats for the first four weeks of the 2011 season:

nflstats tom brady --year 2011 --weeks 1-4

Examples for nflrank

nflrank shows player rankings on one or more statistical categories.

Show the leading touchdown passers for the 2010 season:

nflrank passing_tds --years 2010

Or for all seasons from 2009 to the current season:

nflrank passing_tds --years 2009-

The same, but restricted to just the first four weeks of each season:

nflrank passing_tds --years 2009- --weeks 1-4

Show the rushing leaders for the Patriots in the 2013 season, ranked first by touchdowns and then by rushing yards:

nflrank rushing_tds rushing_yds --teams NE

Show the most targeted receivers of the 2012 postseason:

nflrank receiving_tar --years 2012 --post

Or the running backs who can't hold on to the ball in the current season:

nflrank fumbles_lost --pos RB

Or the guys who are best at stripping the ball:

nflrank defense_ffum

Or the guys who are best at returning interceptions:

nflrank defense_int_yds defense_int

nflcmd's People

Contributors

burntsushi avatar

Watchers

James Cloos avatar sam 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.