knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of socR is to query the SOCcer API.
You can install the development version from GitHub with:
# install.packages("devtools") devtools::install_github("dmolitor/socR")
This is a basic example of how to use the package:
library(socR)
Using the built-in data set we can query the first three jobs and see how long it takes. The first three job postings:
head(job_desc, 3)
Now, using SOCcer to return the top three SOC matches for each:
system.time({ jobs <- soccer( job_title = job_desc$title[1:3], job_desc = job_desc$description[1:3], job_id = job_desc$job_id[1:3], n_results = 3, req_per_min = 12 ) })
Now we can view the top 3 results for each posting.
jobs
The API responses are stored locally in a persistent cache to keep duplicate queries from hitting the API. As we can see, re-running the function returns cached results and finishes almost immediately.
system.time({ jobs <- soccer( job_title = job_desc$title[1:3], job_desc = job_desc$description[1:3], job_id = job_desc$job_id[1:3], n_results = 3, req_per_min = 30 ) })
Daniel Russ, one of the creators of the SOCcer tool, has a similar package available here. This is the source of truth for the API query formatting, as there is no documentation currently.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.