scrape_yelp | R Documentation |
To support the Ottawa Neighbourhood Study in refreshing its food availability database, this function does a perfunctory Yelp search for a given term in a given location.
scrape_yelp(search_term, location = "Ottawa, ON", num_pages = 24)
search_term |
Character string to search Yelp for. |
location |
Character string containing the location to search. Defaults to "Ottawa, ON". |
num_pages |
The number of pages to search. Defaults to 24. |
Results include business names and addresses. This function could be improved but it works for what we need now, and Yelp is very protective of its data. Be warned that scraping too much too quickly may get your IP address blocked.
A tibble with Yelp search results.
## Not run: convenience_stores <- scrape_yelp("convenience stores") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.