Skip to content

Commit e88b0cd

Browse files
committed
Update Restaurant Recommendations
1 parent 9e78d56 commit e88b0cd

File tree

4 files changed

+46
-47
lines changed

4 files changed

+46
-47
lines changed

adoc/restaurant_recommendation.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
=== Introduction
88

9-
image::https://dl.dropboxusercontent.com/u/14493611/sushi_restaurants_nyc.svg[height=300,float=right]
9+
image::https://guides.neo4j.com/sushi_restaurants_nyc.svg[height=300,float=right]
1010

1111
We want to demonstrate how easy it is to model a domain as a graph and answer questions in almost natural language.
1212

@@ -93,7 +93,7 @@ RETURN nyc, restaurant, cusine
9393

9494
=== Graph Search Recommendation
9595

96-
image::https://dl.dropboxusercontent.com/u/14493611/sushi_restaurants_nyc.png[height=300,float=right]
96+
image::https://guides.neo4j.com/sushi_restaurants_nyc.png[height=300,float=right]
9797

9898
We want to answer the following question
9999

html/restaurant_recommendation.html

Lines changed: 43 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,26 @@
44
margin:-100;
55
}
66
*/
7-
.imageblock .content img {
8-
max-width: 900px;
9-
max-height: 300px;
10-
}
11-
.deck h3 {
12-
display: block !important;
13-
margin-bottom:8px;
14-
margin-top:5px;
15-
}
16-
.listingblock {
17-
margin:8px;
18-
}
19-
.pull-bottom {
20-
position:relative;
21-
bottom:1em;
22-
}
7+
@import url("//maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css");
8+
9+
.slide { min-height: 50em !important; }
10+
.imageblock .content img, .image img {max-width: 900px;max-height: 300px;}
11+
.deck > h3, .deck > h4 {display: block !important;margin-bottom:8px;margin-top:5px;}
12+
.listingblock {margin:8px;}
13+
pre.code.runnable { max-height: 10em;}
14+
.pull-bottom {position:relative;bottom:1em;}
15+
.admonitionblock td.icon [class^="fa icon-"]{font-size:2.5em;text-shadow:1px 1px 2px rgba(0,0,0,.5);cursor:default}
16+
.admonitionblock td.icon .icon-note:before{content:"\f05a";color:#19407c}
17+
.admonitionblock td.icon .icon-tip:before{content:"\f0eb";text-shadow:1px 1px 2px rgba(155,155,0,.8);color:#111}
18+
.admonitionblock td.icon .icon-warning:before{content:"\f071";color:#bf6900}
19+
.admonitionblock td.icon .icon-caution:before{content:"\f06d";color:#bf3400}
20+
.admonitionblock td.icon .icon-important:before{content:"\f06a";color:#bf0000}
21+
.admonitionblock.note.speaker { display:none; }
2322
</style>
2423
<style type="text/css" media="screen">
25-
#editor.maximize-editor .CodeMirror-code {
26-
font-size:40px;
27-
line-height:45px;
28-
}
29-
</style><article class="guide">
24+
/* #editor.maximize-editor .CodeMirror-code { font-size:24px; line-height:26px; } */
25+
</style>
26+
<article class="guide" ng-controller="AdLibDataController" style="min-height:1000px;">
3027
<carousel class="deck container-fluid">
3128
<!--slide class="row-fluid">
3229
<div class="col-sm-3">
@@ -49,17 +46,18 @@ <h3>Restaurant Recommendations</h3>
4946

5047

5148

49+
<h4 style="margin-top: 1em;margin-bottom: 1em;">Restaurant Recommendations</h4>
5250

5351

5452

5553
<slide class="row-fluid">
5654
<div class="col-sm-12">
57-
<h3>Introduction</h3>
55+
<h3 style="margin-bottom: 0.3em;">Introduction</h3>
5856
<br/>
5957
<div>
60-
<div class="imageblock" style="float: right">
58+
<div class="imageblock" style="float: right;">
6159
<div class="content">
62-
<img src="https://dl.dropboxusercontent.com/u/14493611/sushi_restaurants_nyc.svg" alt="sushi restaurants nyc" height="300">
60+
<img src="https://guides.neo4j.com/sushi_restaurants_nyc.svg" alt="sushi restaurants nyc" height="300">
6361
</div>
6462
</div>
6563
<div class="paragraph">
@@ -82,20 +80,20 @@ <h3>Introduction</h3>
8280

8381
<slide class="row-fluid">
8482
<div class="col-sm-12">
85-
<h3>Setup: Creating Friends, Restaurants in Cities and their Cusines</h3>
83+
<h3 style="margin-bottom: 0.3em;">Setup: Creating Friends, Restaurants in Cities and their Cusines</h3>
8684
<br/>
8785
<div>
8886
<div class="listingblock">
8987
<div class="content">
90-
<pre mode="cypher" class="highlight pre-scrollable code runnable"><code class="cypher language-cypher">CREATE (philip:Person {name:"Philip"})-[:IS_FRIEND_OF]-&gt;(emil:Person {name:"Emil"}),
88+
<pre mode="cypher" class="highlight pre-scrollable programlisting cm-s-neo code runnable standalone-example ng-binding" data-lang="cypher" lang="cypher"><!--code class="cypher language-cypher"-->CREATE (philip:Person {name:"Philip"})-[:IS_FRIEND_OF]-&gt;(emil:Person {name:"Emil"}),
9189
(philip)-[:IS_FRIEND_OF]-&gt;(michael:Person {name:"Michael"}),
9290
(philip)-[:IS_FRIEND_OF]-&gt;(andreas:Person {name:"Andreas"})
93-
create (sushi:Cuisine {name:"Sushi"}), (nyc:City {name:"New York"}),
91+
CREATE (sushi:Cuisine {name:"Sushi"}), (nyc:City {name:"New York"}),
9492
(iSushi:Restaurant {name:"iSushi"})-[:SERVES]-&gt;(sushi),(iSushi)-[:LOCATED_IN]-&gt;(nyc),
9593
(michael)-[:LIKES]-&gt;(iSushi),
9694
(andreas)-[:LIKES]-&gt;(iSushi),
9795
(zam:Restaurant {name:"Zushi Zam"})-[:SERVES]-&gt;(sushi),(zam)-[:LOCATED_IN]-&gt;(nyc),
98-
(andreas)-[:LIKES]-&gt;(zam)</code></pre>
96+
(andreas)-[:LIKES]-&gt;(zam)<!--/code--></pre>
9997
</div>
10098
</div>
10199
</div>
@@ -106,13 +104,13 @@ <h3>Setup: Creating Friends, Restaurants in Cities and their Cusines</h3>
106104

107105
<slide class="row-fluid">
108106
<div class="col-sm-12">
109-
<h3>Philips Friends</h3>
107+
<h3 style="margin-bottom: 0.3em;">Philips Friends</h3>
110108
<br/>
111109
<div>
112110
<div class="listingblock">
113111
<div class="content">
114-
<pre mode="cypher" class="highlight pre-scrollable code runnable"><code class="cypher language-cypher">MATCH (philip:Person {name:"Philip"})-[:IS_FRIEND_OF]-(person)
115-
RETURn person.name</code></pre>
112+
<pre mode="cypher" class="highlight pre-scrollable programlisting cm-s-neo code runnable standalone-example ng-binding" data-lang="cypher" lang="cypher"><!--code class="cypher language-cypher"-->MATCH (philip:Person {name:"Philip"})-[:IS_FRIEND_OF]-(person)
113+
RETURn person.name<!--/code--></pre>
116114
</div>
117115
</div>
118116
</div>
@@ -123,13 +121,13 @@ <h3>Philips Friends</h3>
123121

124122
<slide class="row-fluid">
125123
<div class="col-sm-12">
126-
<h3>Restaurants in NYC and their cusines</h3>
124+
<h3 style="margin-bottom: 0.3em;">Restaurants in NYC and their cusines</h3>
127125
<br/>
128126
<div>
129127
<div class="listingblock">
130128
<div class="content">
131-
<pre mode="cypher" class="highlight pre-scrollable code runnable"><code class="cypher language-cypher">MATCH (nyc:City {name:"New York"})&lt;-[:LOCATED_IN]-(restaurant)-[:SERVES]-&gt;(cusine)
132-
RETURN nyc, restaurant, cusine</code></pre>
129+
<pre mode="cypher" class="highlight pre-scrollable programlisting cm-s-neo code runnable standalone-example ng-binding" data-lang="cypher" lang="cypher"><!--code class="cypher language-cypher"-->MATCH (nyc:City {name:"New York"})&lt;-[:LOCATED_IN]-(restaurant)-[:SERVES]-&gt;(cusine)
130+
RETURN nyc, restaurant, cusine<!--/code--></pre>
133131
</div>
134132
</div>
135133
</div>
@@ -140,12 +138,12 @@ <h3>Restaurants in NYC and their cusines</h3>
140138

141139
<slide class="row-fluid">
142140
<div class="col-sm-12">
143-
<h3>Graph Search Recommendation</h3>
141+
<h3 style="margin-bottom: 0.3em;">Graph Search Recommendation</h3>
144142
<br/>
145143
<div>
146-
<div class="imageblock" style="float: right">
144+
<div class="imageblock" style="float: right;">
147145
<div class="content">
148-
<img src="https://dl.dropboxusercontent.com/u/14493611/sushi_restaurants_nyc.png" alt="sushi restaurants nyc" height="300">
146+
<img src="https://guides.neo4j.com/sushi_restaurants_nyc.png" alt="sushi restaurants nyc" height="300">
149147
</div>
150148
</div>
151149
<div class="paragraph">
@@ -161,31 +159,31 @@ <h3>Graph Search Recommendation</h3>
161159
<div class="paragraph">
162160
<p>To satisfy this question, we have to know who&#8217;s asking: <em>Philip</em> and he&#8217;s asking for 4 connected facts</p>
163161
</div>
164-
<div class="ulist">
162+
<div class="ulist" style="margin-bottom:.4em;">
165163
<ul>
166164
<li>
167-
<p><em>People</em> that are friends of <em>Philip</em></p>
165+
<em>People</em> that are friends of <em>Philip</em>
168166
</li>
169167
<li>
170-
<p><em>Restaurants</em> located in <em>New York</em></p>
168+
<em>Restaurants</em> located in <em>New York</em>
171169
</li>
172170
<li>
173-
<p><em>Restaurants</em> that server <em>Sushi</em></p>
171+
<em>Restaurants</em> that server <em>Sushi</em>
174172
</li>
175173
<li>
176-
<p><em>Restaurants</em> that his <em>Friends</em> like</p>
174+
<em>Restaurants</em> that his <em>Friends</em> like
177175
</li>
178176
</ul>
179177
</div>
180178
<div class="listingblock">
181179
<div class="content">
182-
<pre mode="cypher" class="highlight pre-scrollable code runnable"><code class="cypher language-cypher">MATCH (philip:Person {name:"Philip"}),
180+
<pre mode="cypher" class="highlight pre-scrollable programlisting cm-s-neo code runnable standalone-example ng-binding" data-lang="cypher" lang="cypher"><!--code class="cypher language-cypher"-->MATCH (philip:Person {name:"Philip"}),
183181
(philip)-[:IS_FRIEND_OF]-(friend),
184182
(restaurant:Restaurant)-[:LOCATED_IN]-&gt;(:City {name:"New York"}),
185183
(restaurant)-[:SERVES]-&gt;(:Cuisine {name:"Sushi"}),
186184
(friend)-[:LIKES]-&gt;(restaurant)
187-
RETURN restaurant.name, collect(friend.name) as likers, count(*) as occurence
188-
ORDER BY occurence DESC</code></pre>
185+
RETURN restaurant.name, collect(friend.name) AS likers, count(*) AS occurence
186+
ORDER BY occurence DESC<!--/code--></pre>
189187
</div>
190188
</div>
191189
</div>

img/sushi_restaurants_nyc.png

121 KB
Loading

img/sushi_restaurants_nyc.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)