companies_house_collect: Companies House - companies_house_collect

Description Usage Arguments Details Value Examples

View source: R/companies_house_collect.R

Description

This function is a wrapper for the Company Profile API end-point from Companies House. Allows the user to collect company profile data by parsing a CompanyNumbers and returning a tabular data-frame as response.

Usage

1
2
3
companies_house_collect(companies, api_end_point = "company_profile",
  auth_api_key, time_to_rest = 3, items_per_page = 1000, join = TRUE,
  verbose = TRUE)

Arguments

companies

A data-frame with CompanyNumber column (see companies data file as example) or a character vector with CompanyNumber.

api_end_point

A character value describing which end-point to call. Can be 'company_profile', 'persons_significant_control', 'officers' or 'charges'. Defaults to 'company_profile'.

auth_api_key

The CompaniesHouse API Key. To generate one please go to CompaniesHouse Developers Page.

time_to_rest

In case the API repsonse is 429 ('Too Many Requests') the user can select the period to wait until it tries again. It defaults to 3 seconds.

items_per_page

The items per page request to try and return (defaults to 1000).

join

A boolean value that when TRUE whill return the results joined with the original df parsed. It only applies when companies argument is a data.frame. Defaults to TRUE.

verbose

Boolean value set to TRUE to print the status of each API call.

Details

All Companies House APIs are accessed by company number. The user can collect company numbers from monthly extracts offered by CompanyHouse that can be accessed here.

Value

A list with two elements:

Examples

1
2
3
4
## Not run: 
companies_house_collect(companies, auth_api_key , time_to_rest = 3)

## End(Not run)

joaocunha1991/companieshr documentation built on Feb. 8, 2020, 10:31 a.m.