HW 6

Introduction

The api serivce I chose was openbrewerydb. Data provided from the site pertains to types of brewerys, including their size, type, and various types of location data. For somone looking to use this they may be wanting to find breweries near them, or if they are traveling # they might want to see if there are breweries near they are traveling.

Walkthrough

The first steps to set up is to define the basic link outside of requests for the site you are using. The code below defines parameters to which the data is filtered down and combined into a url which then grabs the data.

brew <- "https://api.openbrewerydb.org/v1/breweries?by_"

type <- "&brewery_type=micro"
city <- "&by_city=san_diego"
per_page <- "&per_page=5"

brew_url <- 
  paste(brew, type, city, per_page, sep ="")

brew_url
[1] "https://api.openbrewerydb.org/v1/breweries?by_&brewery_type=micro&by_city=san_diego&per_page=5"