Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions NoodlePug/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,39 @@ number_per_weather = noodle_pug.dropColumns("Date", "Day_of_Week").sumBy("Weathe
Three Deephaven tables populate the IDE. Does Noodle have more "No Bone" days on Monday?


# Planet data

As an interesting use case, we wanted to see if the separation of Mercury and Jupiter is what causes Noodles to have No Bones days.

Here, we have a function that does a calculation to find the separation of the two planets and then we see how this correlates with Bones and No Bones days. We see that for Bone days, we are accurate 66% of the time - not bad! But for No Bones days, we are accurate with this model 80% of the time!

We look at the week ahead and give our predictions. Now the question is, what really causes No Bones days? We think it is a complex mixture of all these models.

```python
os.system("pip install ephem")

import ephem

def sep(date):
m = ephem.Mercury()
j = ephem.Jupiter()
m.compute(date)
j.compute(date)
return (int)(10*ephem.separation(m, j))

planet = noodle_pug.update("Mercury_Jupiter_sep = (int)sep(Date)","Prediction = (Mercury_Jupiter_sep <= 13) ? `no Bones` : `Bones`")

planet_no_bones = planet.where("Prediction.startsWith(`no`)").dropColumns("Date", "Day_of_Week", "Weather_NYC","Mercury_Jupiter_sep", "Prediction").sumBy()

planet_bones = planet.where("Prediction.startsWith(`Bone`)").dropColumns("Date", "Day_of_Week", "Weather_NYC","Mercury_Jupiter_sep", "Prediction").sumBy()

from deephaven.TableTools import newTable, stringCol

future = newTable(
stringCol("Date", "11/1/2021", "11/2/2021", "11/3/2021", "11/4/2021", "11/5/2021"))\
.update("Prediction = ((int)sep(Date)<=13) ? `no Bones` : `Bones`")
```

# Source and License

This data was built from viewing TikToks created by [@jongraz](https://www.tiktok.com/@jongraz?refer=embed). It is provided here for demonstrative use without any warranty as to the accuracy, reliability, or completeness of the data.