Description Usage Arguments Details Value Examples
View source: R/companies_house_collect.R
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.
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)
|
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. |
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.
A list with two elements:
results_df A data-frame with the results returned from the 'companies/' end point of the CompaniesHouse API. The results can be explored via this link.
errorLogs In case some CompanyNumbers failed to return values either because of errors or because there was no results to be returned, these can be explored via errorLogs.
1 2 3 4 | ## Not run:
companies_house_collect(companies, auth_api_key , time_to_rest = 3)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.