get_past_sales_data.Rd
Extract Allhomes past sales data for a/multiple suburb(s) and year(s).
get_past_sales_data(suburb, year, quiet = FALSE)
A character
vector denoting a/multiple suburbs. Format for
every entry must be "suburb_name, state/territory_abbreviation", e.g.
"Balmain, ACT".
An integer
vector denoting the year(s).
If TRUE
then messages are suppressed. Currently ignored.
A tibble
.
# \donttest{
get_past_sales_data(
c("Balmain, NSW", "Acton, ACT", "Nowra, NSW"),
2020L:2021L)
#> [2022-09-13 06:09:01] Looking up division ID for suburb='Balmain, NSW'...
#> [2022-09-13 06:09:01] URL: https://www.allhomes.com.au/svc/locality/searchallbyname?st=NSW&n=balmain
#> [2022-09-13 06:09:01] Finding data for ID=7857, year=2020...
#> [2022-09-13 06:09:01] URL: https://www.allhomes.com.au/ah/research/_/120785712/sale-history?year=2020
#> [2022-09-13 06:09:03] Found 211 entries.
#> [2022-09-13 06:09:03] Finding data for ID=7857, year=2021...
#> [2022-09-13 06:09:03] URL: https://www.allhomes.com.au/ah/research/_/120785712/sale-history?year=2021
#> [2022-09-13 06:09:04] Found 92 entries.
#> [2022-09-13 06:09:04] Looking up division ID for suburb='Acton, ACT'...
#> [2022-09-13 06:09:04] URL: https://www.allhomes.com.au/svc/locality/searchallbyname?st=ACT&n=acton
#> [2022-09-13 06:09:04] Finding data for ID=14512, year=2020...
#> [2022-09-13 06:09:04] URL: https://www.allhomes.com.au/ah/research/_/121451212/sale-history?year=2020
#> [2022-09-13 06:09:05] Found 2 entries.
#> [2022-09-13 06:09:05] Finding data for ID=14512, year=2021...
#> [2022-09-13 06:09:05] URL: https://www.allhomes.com.au/ah/research/_/121451212/sale-history?year=2021
#> [2022-09-13 06:09:05] Found 2 entries.
#> [2022-09-13 06:09:05] Looking up division ID for suburb='Nowra, NSW'...
#> [2022-09-13 06:09:05] URL: https://www.allhomes.com.au/svc/locality/searchallbyname?st=NSW&n=nowra
#> [2022-09-13 06:09:05] Finding data for ID=14674, year=2020...
#> [2022-09-13 06:09:05] URL: https://www.allhomes.com.au/ah/research/_/121467412/sale-history?year=2020
#> [2022-09-13 06:09:08] Found 279 entries.
#> [2022-09-13 06:09:08] Finding data for ID=14674, year=2021...
#> [2022-09-13 06:09:08] URL: https://www.allhomes.com.au/ah/research/_/121467412/sale-history?year=2021
#> [2022-09-13 06:09:09] Found 248 entries.
#> # A tibble: 834 × 27
#> division state postcode value year address bedro…¹ bathr…² ensui…³ garages
#> <chr> <chr> <chr> <int> <int> <chr> <dbl> <dbl> <dbl> <dbl>
#> 1 Balmain NSW 2041 7857 2020 24 Wisbe… NA NA NA NA
#> 2 Balmain NSW 2041 7857 2020 1 Campbe… 6 3 NA 3
#> 3 Balmain NSW 2041 7857 2020 73 Beatt… NA NA NA NA
#> 4 Balmain NSW 2041 7857 2020 73 Smith… 5 2 NA 3
#> 5 Balmain NSW 2041 7857 2020 33 Campb… NA NA NA NA
#> 6 Balmain NSW 2041 7857 2020 70 Campb… NA NA NA NA
#> 7 Balmain NSW 2041 7857 2020 11 Jane … NA NA NA NA
#> 8 Balmain NSW 2041 7857 2020 8 Grafto… 4 3 NA 2
#> 9 Balmain NSW 2041 7857 2020 350 Darl… NA NA NA NA
#> 10 Balmain NSW 2041 7857 2020 1 Macqua… 5 2 NA 2
#> # … with 824 more rows, 17 more variables: carports <dbl>, contract_date <chr>,
#> # transfer_date <chr>, list_date <chr>, price <dbl>, block_size <dbl>,
#> # transfer_type <chr>, full_sale_price <dbl>, days_on_market <dbl>,
#> # sale_type <lgl>, sale_record_source <chr>, building_size <dbl>,
#> # land_type <lgl>, property_type <lgl>, purpose <chr>,
#> # unimproved_value <lgl>, unimproved_value_ratio <lgl>, and abbreviated
#> # variable names ¹bedrooms, ²bathrooms, ³ensuites
# }