Skip to content

Instantly share code, notes, and snippets.

@flybayer
Forked from cheerfulstoic/graph_gist_template.adoc
Last active January 12, 2016 19:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flybayer/137d06fc390cfed1d1eb to your computer and use it in GitHub Desktop.
Save flybayer/137d06fc390cfed1d1eb to your computer and use it in GitHub Desktop.
My Submission

TODO

  1. Create many more nodes

  2. Create queries for the questions

  3. Review questions & maybe add more or more complexity

  4. Create domain model image

What can I eat for the holidays??

I’m looking forward to the holidays and eating yummy food! But wait, this year isn’t going to be the same. My doctor has prescribed me on the autoimmune protocol (AIP) diet. I won’t be able to eat what everyone else fixes.

I’m sure there are AIP food alternatives to my favorites, but how do I know if a random recipe from Pintrest is a good one? I don’t have time to experiment, so I need some recipes that I know others love and have made many times. I tried to search Pintrest, but the AIP label’s there don’t gaurentee anything, and I can’t tell what other people think of it. Please help!

Nodes

  • Food (Ex: Egg Nog)

  • Recipe (Ex: Super Holiday Nog)

  • Ingredient (Ex: milk)

  • Person (Ex: Brandon)

Relationships

  • Food - HAS_RECIPE → Recipe

  • Recipe - HAS_INGREDIENT → Ingredient

  • Recipe - OPTIONAL_INGREDIENT → Ingredient

  • Ingredient - HAS_SUBSTITUTE → Ingredient

  • Person - MADE → Recipe

  • Person - LOVES → Recipe

Create the graph

CREATE
  (a:Food {name: 'Egg Nog', holiday: 'Christmas'}),
  (b:Recipe {name: 'Super Holiday Nog', date_added: '12/9/15'}),
  (c:Ingredient {name: 'Milk'}),
  (d:Person {name: 'Brandon'}),
  (e:Person {name: 'Evelyn'}),
  (f:Ingredient {name: 'Coconut Milk'}),
  (g:Ingredient {name: 'Nutmeg'}),

  (a)-[:HAS_RECIPE]->(b),
  (b)-[:HAS_INGREDIENT {quantity: 1, units: 'cups'}]->(c),
  (e)-[:MADE {times: 15}]->(b),
  (d)-[:LOVES]->(b),
  (c)-[:HAS_SUBSTITUTE {ratio: '1:1'}]->(f),
  (b)-[:HAS_INGREDIENT]->(g),
  (b)-[:OPTIONAL_INGREDIENT]->(g)

What recipes are AIP?

What is an AIP alternative to X food?

Of these, which ones are loved by people who have made them many times?

Is there a non-AIP recipe for X that I could make AIP with a simple substitution or removal?

What is a new AIP recipe with brussel sprouts and sweet potatos?

Judging Criteria

  • Creativity

  • Relevance to Category

  • Quality of written explanation & visual presentation

  • Adherance to data modeling & cypher best practices

  • Thoroughness

Addtional Options

  • cooking_method

  • food_type (soup)

  • meal_type (entre/lunch)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment