get_ah_division_ids.Rd
Get Allhomes division (suburb) names and IDs for a (vector of) suburb(s).
The input must be a character
vector of suburbs with states (of the form
"Acton, ACT"), and it uses the Allhomes API to query internal Allhomes data
for matching entries. If successful, it will return a tibble
with Allhomes
division names, states, postcodes and IDs. If unsuccessful, it will skip the
entry.
get_ah_division_ids(x, quiet = FALSE)
A character
vector (or scalar) with suburb + state entries
(e.g. "Balmain, NSW")
If TRUE
then messages are suppressed.
A tibble
with Allhomes data for the division (suburb), state,
postcode, and ID.
# \donttest{
get_ah_division_ids(c("Acton, ACT", "Balmain, NSW"))
#> [2022-09-13 06:09:00] Looking up division ID for suburb='Acton, ACT'...
#> [2022-09-13 06:09:00] URL: https://www.allhomes.com.au/svc/locality/searchallbyname?st=ACT&n=acton
#> [2022-09-13 06:09:00] Looking up division ID for suburb='Balmain, NSW'...
#> [2022-09-13 06:09:00] URL: https://www.allhomes.com.au/svc/locality/searchallbyname?st=NSW&n=balmain
#> division state postcode value
#> 1 Acton ACT 2601 14512
#> 2 Balmain NSW 2041 7857
# }