The purpose of this package is to obtain data from any section of
craigslist and load it into a clean data.frame
within R. Currently this only
works with apartment searches. See the "Package status" below.
devtools::install_github("adletaw/craigr")
Note that the package depends on: rvest
, stringr
, xml2
, RCurl
and magrittr
This package is under passive development. Currently, you can download housing rental data only.
craigr will do an apartment search using the function rentals
. You can
supply almost any search parameters that are available on craiglist. See the
help page for rentals
to get the full parameter list.
First you have to specify the location and area. The location works as the
Craigslist subdomain, e.g. seattle.craigslist.org.
The area allows you to filter to a more specific location according to the
pre-programmed three-letter codes in Craigslist. For example, using see
limits the search to the Seattle city limits only. The default is all
.
results <- craigr::rentals(location = "seattle", area = "see", max_results = 100) head(results)
The listing title, price, data and url are provided. Check craigslist to find the location subdomain and three-letter area code.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.