GraphGists

Beer & Breweries GraphGist

OpenBeerDB.com has a list of 1400+ breweries and 5900+ beers. Here’s a graph of the first 50 breweries from that list. The graph makes beer recommendations based on beer style, beer category, location, and alcohol content.

Schema

fa2104ed cfdb 4ca3 a2ae 19c7f3dfd187 JHhk d0od

(Beer)

  • name: beer name

  • abv: alcohol by volume

(Brewery)

  • name: brewery name

  • address1

  • city

  • state

  • country

  • code

  • latitude

  • longitude

  • phone

  • website

(Category)

  • category

(City)

  • city

  • state

  • country

(State)

  • state

(Country)

  • country

(Beer) - [:BREWED_AT] → (Brewery) (Beer) - [:BEER_CATEGORY] → (Category) (Beer) - [:BEER_STYLE] → (Style) (Brewery) - [:LOC_CITY] → (City) - [:LOC_STATE] → (State) - [:LOC_COUNTRY] → (Country)

Create nodes and relationships

Queries: Beers in Beers San Francisco, CA

7f56d3fe ebeb 41e2 99b2 6d248926f762 zDr32nLGV
MATCH (beer:Beer) - [:BREWED_AT] -> (brewery: Brewery) - [:LOC_CITY] -> (city:City {city: 'San Francisco'}) - [:LOC_STATE] -> (state:State {state: 'California'})
RETURN Distinct(beer.name) as beer, brewery.name as brewery, brewery.address1 as address
order by brewery.name, beer.name

Queries: Beers for in the German Lager category

MATCH   (category:Category {category: "German Lager"}) <- [:BEER_CATEGORY]- (beer:Beer) - [:BREWED_AT] -> (brewery: Brewery)  - [:LOC_CITY] -> (city:City) - [:LOC_STATE] -> (state:State)  - [:LOC_COUNTRY] -> (country:Country)
RETURN Distinct(beer.name) as beer,  brewery.name as brewery, city.city as city, state.state as state , country.country as country
order by country , beer

Beers for a particular category and location: British Ale beers in the UK

188c2526 f3fa 4b3d b2b5 44953d643249 JI 40udKs
MATCH   (category:Category {category: "British Ale"}) <- [:BEER_CATEGORY]- (beer:Beer) - [:BREWED_AT] -> (brewery: Brewery)  - [:LOC_CITY] -> (city:City) - [:LOC_STATE] -> (state:State)  - [:LOC_COUNTRY] -> (country:Country {country: "United Kingdom"})
RETURN Distinct(beer.name) as beer,  brewery.name as brewery, city.city as city
order by city, beer

Beers for a particular style: Porter beers

MATCH    (style:Style {style: 'Porter'}) <- [:BEER_STYLE] - (beer:Beer) - [:BREWED_AT] -> (brewery: Brewery)  - [:LOC_CITY] -> (city:City) - [:LOC_STATE] -> (state:State)  - [:LOC_COUNTRY] -> (country:Country)
RETURN Distinct(beer.name) as beer,  brewery.name as brewery, city.city as city, state.state as state , country.country as country
order by country , beer

Beers that are the same style: Beers like IPA

552b9d21 2cc6 48dc a93c 7d9cbe41de4e sZphtDcA
MATCH   (:Beer {name: 'IPA'}) - [:BEER_STYLE] - >  (style:Style) <- [:BEER_STYLE] - (beer:Beer)  - [:BREWED_AT] -> (brewery: Brewery)  - [:LOC_CITY] -> (city:City) - [:LOC_STATE] -> (state:State)  - [:LOC_COUNTRY] -> (country:Country)
RETURN  Distinct(beer.name) as beer ,  brewery.name as brewery, city.city as city, state.state as state , country.country as country
order by beer

Strongest beers (highest alcohol by volume)

MATCH   (beer:Beer) - [:BREWED_AT] -> (brewery: Brewery)
RETURN  beer.name as beer ,  beer.abv, brewery.name as brewery, brewery.city as city, brewery.state as state , brewery.country as country
order by beer.abv desc
limit 10

Weakest beers (low alcohol content)

MATCH   (beer:Beer) - [:BREWED_AT] -> (brewery: Brewery)
where beer.abv > 0
RETURN  beer.name as beer ,  beer.abv, brewery.name as brewery, brewery.city as city, brewery.state as state , brewery.country as country
order by beer.abv
limit 10