soccer: Send and Retrive data from SOCcer API

Description Usage Arguments Value Examples

View source: R/soccer.R

Description

This function facilitates querying the SOCcer API in a vectorized manner. Each argument must be either length 1 or n. This function facilitates request throttling and verbose output.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
soccer(
  job_title,
  job_desc = NULL,
  industry = NULL,
  n_results = 10,
  req_per_min = 5000,
  user_agent = "Daniel Molitor (dmolitor@ripl.org)",
  verbose = 0L,
  progress = FALSE,
  ...
)

Arguments

job_title

Character string of job title.

job_desc

Optional character string of job description.

industry

Optional character string of industry code.

n_results

Integer specifying the number of top matches to return.

req_per_min

Integer specifying the max number of requests per minute.

user_agent

Character string of user agent. Set to helpful value so for API maintainer in case of serious problems.

verbose

An integer between 0 and 3 specifying level of verbosity.

progress

A boolean; whether to print progress across job classifications. Will only work if the progressr package is installed.

...

Additional arguments that will be mutated onto the returned data frame.

Value

A list with two elements: problems which contains a tibble of all requests that encountered an error and valid which contains a tibble of all successfully validated results.

Examples

1
2
3
4
dat <- head(job_desc, 1)
soccer(job_title = dat$title,
       job_desc = dat$description,
       job_id = dat$job_id)

dmolitor/socR documentation built on Dec. 20, 2021, 12:11 a.m.