Git Product home page Git Product logo

allhomes's People

Contributors

hadley avatar mevers avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

hadley datalearns

allhomes's Issues

Suburb with whitespace not processed properly

This returns an empty tibble.

get_past_sales_data("Swinger Hill, ACT", 2020)
#[1] "https://www.allhomes.com.au/svc/locality/searchallbyname?st=ACT&n=swinger-hill"
## A tibble: 0 × 6
## … with 6 variables: division <chr>, state <chr>, postcode <chr>, value <int>, year <dbl>, data <lgl>
## ℹ Use `colnames()` to see all variable names

This works

get_ah_division_ids("Swinger Hill, ACT")
#[1] "https://www.allhomes.com.au/svc/locality/searchallbyname?st=ACT&n=swinger-hill"
#      division state postcode value
#1 Swinger Hill   ACT     2606 18009

This returns NULL

extract_past_sales_data("Swinger Hill", 18009, 2020)
# NULL

This returns a tibble

extract_past_sales_data("swinger-hill", 18009, 2020)
#[2022-07-26 17:23:13] Parsing data for swinger-hill, 2020
#            address bedrooms bathrooms ensuites garages carports contract_date transfer_date  list_date  price block_size
#1    8 Oldham Court        3         2       NA       2        0    20/01/2020            NA 19/12/2019 810000          0
#2   21 Jewell Close        2         1       NA       1        1    05/12/2020            NA 13/11/2020 592000          0
#3    7 Sulman Place        2         1       NA       2        0    07/11/2020            NA 15/10/2020 580000        190
#4    4 Hallen Close        2         1       NA       0        1    16/10/2020            NA 01/10/2020 540000        847
#...

Need to have consistent processing of suburbs with whitespaces/special characters.

`get_past_sales_data()` fails on non-existent suburb

The following gives an error

get_past_sales_data("Arboretum, ACT", 2022)
#[2022-08-20 01:18:11] Looking up division ID for suburb='Arboretum, ACT'...
#[2022-08-20 01:18:11] URL: https://www.allhomes.com.au/svc/locality/searchallbyname?st=ACT&n=arboretum
#Error in `dplyr::mutate()`:
#! Problem while computing `data = purrr::pmap(list(.data$value, .data$year, .env$quiet), extract_past_sales_data)`.
#Caused by error in `.data$value`:
#! Column `value` not found in `.data`.
#Run `rlang::last_error()` to see where the error occurred.

Expected behaviour:

A warning/error that the suburb could not be found and/or a zero-row tibble/data.frame.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.