Description Usage Arguments Value Examples
This function makes the information from the OCBC Locators category APIs easily accessible in an R-readable format. It also produces
an interactive map of the ATMs and their locations
There are 3 different types of locators, each with their own unique API
1. ATMs
2. OCBC Branches and Centres
3. Deposit Machines and Safe Deposit Boxes
1 2 3 4 5 6 7 8 9 10 |
locator_type |
Locator type, hence the API that the function will call from. Required. Options are "ATM" for ATMs, "Branch" for Branches and Centres, "Deposit" for Deposit Machines and Safe Deposit Boxes. Note: it is recommended to only specify 1 locator type at a time. |
acctoken |
Account token. Required. Users can sign up for their api key, api secret and account token at https://api.ocbc.com/store/home |
category |
filter locators by category. Optional. |
country |
Filter locators by country. Optional. Options are 'SG' for Singapore and 'MY' for Malaysia |
landmark |
Filter locators by local landmark. Optional. E.g 'Esplanade', '7-Eleven', 'park' |
latitude |
Filter locators by latitude. Optional. (Requires longitutde and radius to filter for nearest locator) |
longitude |
Filter locators by longtitude. Optional. (Requires latitude and radius to filter for nearest locator) |
radius |
Filter locators by radius. Optional. (Requires longtitude and latitude to filter for nearest locator) |
Returns a list containing 2 items.
1. The first is a detailed dataframe with variables of key information about the locators (e.g the category of the locator, the address of the locator, landmark where the locator is located, geological latitude and longitude of the locator, postal code, remarks and disclaimers).
2.The second is an interactive map indicating the locations of the locators featured in the dataframe. Each point on the map correponds to a row in the above dataframe, users can click on each point to reveal a summary information table about the locator.
1 2 | ocbc_locator(locator_type = "ATM", acctoken = Sys.getenv("ACC_TOKEN_OCBC"),
category = 1, country = "SG")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.