Code Monkey home page Code Monkey logo

gameday's Introduction

gameday

A package that allows the user to extract data on NHL teams without using the browser. The RStudio interface is simple and intuitive to use.

Installation

Install gameday from GitHub:

devtools::install_github("dchiu911/gameday")

Note that you need the devtools package to do this.

Usage

At the current version, gameday has two functions: gday() and scores(). We'll discuss each in turn.

Given a team and a date, we can call gday(team, date) to see whether that team plays on that date.

library(gameday)

gday("devils", "2014-11-03")
## [1] FALSE

What if we wanted to find all the final scores on a particular date? Then we can call scores(date) to return a data.frame with this information.

scores("2014-11-15")
##                     home                   away home_score away_score
## 1          BOSTON BRUINS    CAROLINA HURRICANES          2          1
## 2           DALLAS STARS         MINNESOTA WILD          1          2
## 3      LOS ANGELES KINGS          ANAHEIM DUCKS          3          2
## 4         BUFFALO SABRES    TORONTO MAPLE LEAFS          6          2
## 5     MONTREAL CANADIENS    PHILADELPHIA FLYERS          6          3
## 6    TAMPA BAY LIGHTNING NY ISLANDERS ISLANDERS          5          2
## 7      NEW JERSEY DEVILS     COLORADO AVALANCHE          2          3
## 8    PITTSBURGH PENGUINS     NY RANGERS RANGERS          3          2
## 9  COLUMBUS BLUE JACKETS        SAN JOSE SHARKS          2          1
## 10   NASHVILLE PREDATORS          WINNIPEG JETS          2          1
## 11        ST LOUIS BLUES    WASHINGTON CAPITALS          4          1
## 12        CALGARY FLAMES        OTTAWA SENATORS          4          2

Vignette

Further details can be found in the vignette for this package. To view it, run this command in the R console:

browseVignettes("gameday")

Once there, you can click on the HTML link to get a nice introduction to gameday. The help files can be accessed with ?gday and ?scores for details on function arguments and some examples.

Alternatively, there is a markdown version available in this repository, found here.

gameday's People

Watchers

 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.