Title: | Interface to 'Glassdoor' API |
---|---|
Description: | Interacts with the 'Glassdoor' API <https://www.glassdoor.com/developer/index.htm>. Allows the user to search job statistics, employer statistics, and job progression, where 'Glassdoor' provides a breakdown of other jobs a person did after their current one. |
Authors: | John Muschelli [aut, cre] |
Maintainer: | John Muschelli <[email protected]> |
License: | GPL-2 |
Version: | 0.8.1 |
Built: | 2024-10-31 16:33:19 UTC |
Source: | https://github.com/muschellij2/glassdoor |
General Glassdoor API function
gd_api(query = NULL, action = NULL, agent = gd_user_agent(), version = 1, format = "json", url = gd_url(), pid = gd_pid(), pat = gd_pat(), ip_address = NULL, add_query = NULL, ...)
gd_api(query = NULL, action = NULL, agent = gd_user_agent(), version = 1, format = "json", url = gd_url(), pid = gd_pid(), pat = gd_pat(), ip_address = NULL, add_query = NULL, ...)
query |
Additional options to pass to the query other than those specified here |
action |
The particular API call that you would like to make |
agent |
The User-Agent (browser) of the end user to whom the API results will be shown. Note that you can can obtain this from the "User-Agent" HTTP request header from the end-user |
version |
The API version. The current version is 1 except for jobs, which is currently version 1.1 |
format |
Either |
url |
Glassdoor RESTful API URL |
pid |
Your partner id, as assigned by Glassdoor |
pat |
Your partner key, as assigned by Glassdoor |
ip_address |
The IP address of the end user to whom the API results will be shown |
add_query |
Additional options to pass to the query other than those specified here (named list) |
... |
Additional options to send to |
A list of class gd_api
if (have_gd_pid() && have_gd_pat()) { res = gd_api( action = "employers", other = NULL, version = 1, format = "json", query = "pharmaceuticals") res = gd_api( action = "employers", other = NULL, version = 1, format = "json", query = "pharmaceuticals", config = list()) }
if (have_gd_pid() && have_gd_pat()) { res = gd_api( action = "employers", other = NULL, version = 1, format = "json", query = "pharmaceuticals") res = gd_api( action = "employers", other = NULL, version = 1, format = "json", query = "pharmaceuticals", config = list()) }
Glassdoor Company Search
gd_company(query = NULL, ..., location = NULL, city = NULL, state = NULL, country = NULL, page_number = NULL, page_size = NULL) gd_employer(query = NULL, ..., location = NULL, city = NULL, state = NULL, country = NULL, page_number = NULL, page_size = NULL) gd_company_df(...) gd_employer_df(...)
gd_company(query = NULL, ..., location = NULL, city = NULL, state = NULL, country = NULL, page_number = NULL, page_size = NULL) gd_employer(query = NULL, ..., location = NULL, city = NULL, state = NULL, country = NULL, page_number = NULL, page_size = NULL) gd_company_df(...) gd_employer_df(...)
query |
Additional options to pass to the query other than those specified here |
... |
arguments to pass to |
location |
Scope the search to a specific location by specifying it here - city, state, or country. |
city |
Scope the search to a specific city by specifying it here. |
state |
Scope the search to a specific state by specifying it here. |
country |
Scope the search to a specific country by specifying it here. |
page_number |
Page number to retrieve. Default is 1. |
page_size |
Page size, i.e. the number of jobs returned on each page of results. Default is 20. |
if (have_gd_tokens()) { res = gd_company_df("walmart") head(res[, c("id", "name")]) res = gd_company_df("Target") res = gd_company("Dropbox") }
if (have_gd_tokens()) { res = gd_company_df("walmart") head(res[, c("id", "name")]) res = gd_company_df("Target") res = gd_company("Dropbox") }
Glassdoor Job Progression
gd_job_prog(..., jobTitle, countryId = 1, query = NULL)
gd_job_prog(..., jobTitle, countryId = 1, query = NULL)
... |
arguments to pass to |
jobTitle |
Job Title - the job title to get related jobs for |
countryId |
Country Id - only 1 (US) is supported right now. |
query |
Additional options to pass to the query other than those specified here |
if (have_gd_tokens()) { paste0("&countryId=1&jobTitle=cashier") res = gd_job_prog(jobTitle = "cashier", countryId = 1) }
if (have_gd_tokens()) { paste0("&countryId=1&jobTitle=cashier") res = gd_job_prog(jobTitle = "cashier", countryId = 1) }
Glassdoor Job Stats
gd_job_stats(..., query = NULL, employer = NULL, location = NULL, city = NULL, state = NULL, country = NULL, fromAge = NULL, jobType = NULL, minRating = NULL, radius = NULL, job_title = NULL, job_category = NULL, returnCities = NULL, returnStates = NULL, returnJobTitles = NULL, returnEmployers = NULL, admLevelRequested = NULL)
gd_job_stats(..., query = NULL, employer = NULL, location = NULL, city = NULL, state = NULL, country = NULL, fromAge = NULL, jobType = NULL, minRating = NULL, radius = NULL, job_title = NULL, job_category = NULL, returnCities = NULL, returnStates = NULL, returnJobTitles = NULL, returnEmployers = NULL, admLevelRequested = NULL)
... |
arguments to pass to |
query |
Additional options to pass to the query other than those specified here |
employer |
Scope the search to a specific employer by specifying the name here. |
location |
Scope the search to a specific location by specifying it here - city, state, or country. |
city |
Scope the search to a specific city by specifying it here. |
state |
Scope the search to a specific state by specifying it here. |
country |
Scope the search to a specific country by specifying it here. |
fromAge |
Scope the search to jobs that are less than X days old (-1 = show all jobs (default), 1 = 1 day old, 7 = 1 week old, 14 = 2 weeks old, etc.) |
jobType |
Scope the search to certain job types. Valid values are all
(default), |
minRating |
Scope the search to jobs of companies
with rating >= |
radius |
Scope the search to jobs within a certain radius, in miles, of the location specified. |
job_title |
Scope the search to a specific job title by specifying it here. |
job_category |
Job category id to scope the search to - see the Job Category table below - note you must pass the id. This can be a comma separated list of ids if you desire to select more than one category. |
returnCities |
Results will include geographical data (job counts) broken down by city. |
returnStates |
Results will include geographical data (job counts,
score) broken down by the type of geographical district specified in
parameter |
returnJobTitles |
Results will include job data broken down by job title. |
returnEmployers |
Results will include job data broken down by employer. |
admLevelRequested |
Geographic district type requested when
|
if (have_gd_tokens()) { paste0("returnStates=true&admLevelRequested=1") res = gd_job_stats(returnStates = TRUE, admLevelRequested = 1) }
if (have_gd_tokens()) { paste0("returnStates=true&admLevelRequested=1") res = gd_job_stats(returnStates = TRUE, admLevelRequested = 1) }
Glassdoor Partner ID
gd_pid(token = NULL, error = TRUE) gd_pat(token = NULL, error = TRUE) have_gd_pid(token = NULL) have_gd_pat(token = NULL) have_gd_tokens()
gd_pid(token = NULL, error = TRUE) gd_pat(token = NULL, error = TRUE) have_gd_pid(token = NULL) have_gd_pat(token = NULL) have_gd_tokens()
token |
Partner ID or Authentication token |
error |
Should the function error if no token specified? |
A vector of class character
if (have_gd_pid()) { gd_pid() }
if (have_gd_pid()) { gd_pid() }
Glassdoor Company Search
gd_review(employer_id, ..., page_number = NULL, page_size = NULL, query = NULL)
gd_review(employer_id, ..., page_number = NULL, page_size = NULL, query = NULL)
employer_id |
Glassdoor ID for the company, can be accessed using
|
... |
arguments to pass to |
page_number |
Page number to retrieve. Default is 1. |
page_size |
Page size, i.e. the number of jobs returned on each page of results. Default is 20. |
query |
Additional options to pass to the query other than those specified here |
if (have_gd_tokens()) { res = gd_review(employer_id = 715) # walmart }
if (have_gd_tokens()) { res = gd_review(employer_id = 715) # walmart }
Glassdoor URL
gd_url()
gd_url()
Object of class character
gd_url()
gd_url()
Glassdoor User Agent
gd_user_agent()
gd_user_agent()
Character vector
gd_user_agent()
gd_user_agent()
Get IP Address
get_ip(agent = gd_user_agent())
get_ip(agent = gd_user_agent())
agent |
User Agent for Header |
Character Vector of IP
Inspired by https://github.com/gregce/ipify/blob/master/R/ipify.R
get_ip()
get_ip()
Calculates the results from Glassdoor object
results(gd, ...) ## Default S3 method: results(gd, ...) ## S3 method for class 'gd_api' results(gd, ...) ## S3 method for class 'gd_job_prog' results(gd, ...)
results(gd, ...) ## Default S3 method: results(gd, ...) ## S3 method for class 'gd_api' results(gd, ...) ## S3 method for class 'gd_job_prog' results(gd, ...)
gd |
an object for which we want the results, the output from a Glassdoor call |
... |
Any additional arguments to be passed to |
A class of gd_job_prog
will return a
list of progression_table
and job_info
.
if (have_gd_tokens()) { gd = gd_job_prog(jobTitle = "cashier", countryId = 1) res = results(gd) }
if (have_gd_tokens()) { gd = gd_job_prog(jobTitle = "cashier", countryId = 1) res = results(gd) }