data_cleaner: Clean web-scraped data.

Description Usage Arguments Value Examples

View source: R/data_cleaner.R

Description

A function to clean web-scraped data given the tibble containing raw data .

Usage

1
data_cleaner(scraped_df)

Arguments

scraped_df

A tibble containing web-scraped data like listing url, price and house type.

Value

tibble A cleaned tibble containing information like listing url, price, number of bedrooms, area in sqft, and city.

Examples

1
2
3
4
5
6
7
8
data_cleaner(tibble::tibble(
  "price" = c("$1,300", "$1,200"),
  "house_type" = c("1br-600ft2-", "2br-"),
  "listing_url" = c(
    "https://vancouver.craigslist.org/bnc/apa/d/burnaby-must-see-1br-suite/7282955370.html",
    "https://vancouver.craigslist.org/rds/apa/d/surrey-bedroom-basement-for-rent/7273877138.html"
  )
))

UBC-MDS/rhousehunter documentation built on April 6, 2021, 7:54 a.m.