fhrs¶
-
class
fhrs.fhrs.Client[source]¶ A class which creates the requests session object to request data from FHRS api.
Variables: - session (requests.Session()) – a session object which persists to call the fhrs api endpoints.
- url_base (str) – the path to the fhrs api domain
- headers (dict()) – the headers to be used in the requests session
Returns a dataframe of details about all the authorities in the UK.
Returns a dataframe of basic details about all the authorities in the UK.
Returns a dataframe of details about a single authority selected by _id.
Parameters: _id (int) – The id of the authority for which details are needed.
-
getbusinesstypebyid(_id)[source]¶ Return a dataframe containing details about a single business indexed by its _id
Parameters: _id (int) – The id of the business whose details are required.
-
getbusinesstypesbasic()[source]¶ Return a dataframe containing basic information about all business types.
-
getcountriesbasic()[source]¶ Returns a dataframe containing basic information about all the countries in the UK.
-
getcountrybyid(_id)[source]¶ Returns a dataframe about the details for a single country indexed by its _id.
Parameters: _id (int) – The id of the country whose details are required.
-
getestablishmentsbyid(_id)[source]¶ Returns a dataframe containing details for a single establishment indexed by its _id.
Parameters: _id (int) – The id of the establishment for which details are requested.
-
getregionbyid(_id)[source]¶ Returns a dataframe conatining details for a region specified by parameter _id.
Parameters: _id (int) – The id for a region for which details are needed.
-
getregionsbasic()[source]¶ Returns a dataframe containing basic details of all the regions in the UK.