-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtestPlot.html
166 lines (135 loc) · 5.82 KB
/
testPlot.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<html>
<head>
<script defer src="https://pyscript.net/alpha/pyscript.js"></script>
<meta charset="utf-8">
<style>
.dmsLegend{
color:rgb(0, 0, 0);
background-color: #ffffff;
}
</style>
</head>
<body>
<py-env>
- numpy
- matplotlib
- paths:
- ./gemNumFuncs.py
- ./ndigitsets3.py
- ./alphabet.py
- ./getwordsfromdbs.py
- ./gematriac.db
</py-env>
<py-script output="dmsDiv">
import matplotlib.pyplot as plt
import gemNumFuncs as gnf
import ndigitsets3 as nds
import getwordsfromdbs as gwdb
from js import localStorage, console
teddy = gnf.DistanceTeddyBear(gwdb.getDeepMem())
if localStorage.getItem("teddy_pointBias"):
teddy.pointBias=float(localStorage.getItem("teddy_pointBias"))
if localStorage.getItem("teddy_distanceBias"):
teddy.distanceBias=float(localStorage.getItem("teddy_distanceBias"))
if localStorage.getItem("teddy_commonNds"):
teddy.commonNds=float(localStorage.getItem("teddy_commonNds"))
if localStorage.getItem("teddy_commonRoot"):
teddy.commonRoot=float(localStorage.getItem("teddy_commonRoot"))
if localStorage.getItem("teddy_commonRoute"):
teddy.commonRoute=float(localStorage.getItem("teddy_commonRoute"))
if localStorage.getItem("teddy_commonNumber"):
teddy.commonNumber=float(localStorage.getItem("teddy_commonNumber"))
if localStorage.getItem("teddy_sameWord"):
teddy.sameWord=float(localStorage.getItem("teddy_sameWord"))
if localStorage.getItem("teddy_closenessWeight"):
teddy.closenessWeight=float(localStorage.getItem("teddy_closenessWeight"))
if localStorage.getItem("teddy_numberDistanceWeight"):
teddy.numberDistanceWeight=float(localStorage.getItem("teddy_numberDistanceWeight"))
if localStorage.getItem("teddy_rootDistanceWeight"):
teddy.rootDistanceWeight=float(localStorage.getItem("teddy_rootDistanceWeight"))
if localStorage.getItem("teddy_ndsDistanceWeight"):
teddy.ndsDistanceWeight=float(localStorage.getItem("teddy_ndsDistanceWeight"))
if localStorage.getItem("teddy_maxDistance"):
teddy.maxDistance=float(localStorage.getItem("teddy_maxDistance"))
searchResults = teddy.getRestrictedWordSet_wdxy(localStorage.getItem("dataForPlot_SW"), localStorage.getItem("cipher"))
searchResults = sorted(searchResults, key = lambda x: x[2], reverse=True)
gvArray=[]
xArray=[]
yArray=[]
uniqueNumbers=[]
for i in searchResults:
if not i[1] in uniqueNumbers:
uniqueNumbers+=[i[1]]
gvArray+=[i[1]]
xArray+=[i[3]]
yArray+=[i[4]]
searchedGemVal = gnf.getGematria(localStorage.getItem("dataForPlot_SW"), localStorage.getItem("cipher"))
rootNumber = gnf.getRootNumber(searchedGemVal)
routeToRoot = gnf.getParentList(searchedGemVal)[1:]
colors=[]
for i in range(len(gvArray)):
r = 0.0
g = 0.0
b = 0.0
if len(str(gvArray[i])) == len(str(searchedGemVal)):
r = 0.0
g = 0.0
b = 0.8
if gnf.getRootNumber(gvArray[i]) == rootNumber:
r = 0.0
g = 0.8
b = 0.8
if gnf.getParentList(gvArray[i])[1:] == routeToRoot:
r = 0.8
g = 0.0
b = 0.5
if gvArray[i] == searchedGemVal:
r = 0.6
g = 0.6
b = 0.0
colors+=[[r,g,b]]
fig, ax = plt.subplots()
ax.scatter(xArray, yArray, s=6, c=colors)
fig
</py-script>
<div id="dmsDiv"></div>
<div class="dmsLegend" id = "dmsLegendDiv">
<h1>About the DMS plot</h1>
<p>
<ul>
<li style="color:rgb(0,0,0)">Black: no calculated relation</li>
<li style="color:rgb(0,0,204)">Blue: common n-digit set</li>
<li style="color:rgb(0,204,204)">Cyan: common root</li>
<li style="color:rgb(204,0,127)">Violet: common route</li>
<li style="color:rgb(153,153,0)">Camouflage green: common number</li>
</ul>
</p>
<p>
For the plot, gematria values of words
in the database are analyzed numerologically:
in addition to the gematria value,
the n-digit set,
the digital root
and the route to the root of the numbers are calculated.
</p>
<p>
The denominator of the distance measure is obtained by
giving points to a pair of numbers according to these properties.
The algorithm also calculates simple distance measures
(abs(x0-x1)) of these properties, giving the numerator.
</p>
<p>
The distance measure is calculated between
the gematria value of the search input word
and each gematria value of a word in the database.
</p>
<p>
In the plot, the gematria values are
plotted as points at their distance
from the origin with an angle relative
to the gematria value of a word in the database.
360 degrees represents the largest value in a search.
</p>
</div>
</body>
</html>