Learn R Programming

nflscrapR (version 1.8.3)

create_game_json_url: Create the url with the location of NFL game JSON data

Description

This function pastes creates the JSON url for the provided game id (first checking that it is from the 2009 season or later). The returned url is used in the various play-by-play functions to access data from the NFL's API.

Usage

create_game_json_url(game_id)

Arguments

game_id

(character or numeric) A 10 digit game id associated with a given NFL game.

Value

String url where the game JSON data for the given game can be found.

Examples

Run this code
# NOT RUN {
# Create the JSON url for the first game of the 2017 season:
create_game_json_url(2017090700) 
# }

Run the code above in your browser using DataLab