Learn R Programming

fitzRoy (version 0.3.2)

get_squiggle_data: Access Squiggle data using the squiggle API service.

Description

Use get_squiggle_data to access the Squiggle API. See instructions at api.squiggle.com.au.

Usage

get_squiggle_data(
  query = c("sources", "games", "tips", "ladder", "standings"),
  ...
)

Arguments

query

A text string. The main query to use with the API. Must be one of sources, games, tips, ladder or standings

...

(optional) An optional argument provided to the Squiggle API. See details for more info.

Value

A dataframe, with the resultant data that matches the query specified in query, as well as any optional filters.

Details

The optional arguments to squiggle can be one of the following.

#'

  • year: an integer specifying the year to return data from, e.g. year = 2018

  • round: an integer specifying the round to return data from, e.g. round = 12

  • game: an integer specifying the game ID to return data from, e.g. game = 10

  • source: an integer specifying the ID of the source to return data from, e.g. source = 1

For full instructions, see api.squiggle.com.au

Examples

Run this code
# NOT RUN {
# Return a list of the sources, with ID's
sources <- get_squiggle_data("sources")

# Get tips for Round 1, 2018
tips <- get_squiggle_data(query = "tips", round = 1, year = 2018)

# Get tips from Squiggle 2019
squiggle <- get_squiggle_data(query = "tips", source = 1, year = 2019)
# }

Run the code above in your browser using DataLab