toji 1.4.0 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/example/koji_making.ipynb +12 -12
- data/example/koji_making.yaml +8 -8
- data/example/koji_making_multi.ipynb +141 -0
- data/example/moromi.ipynb +19 -19
- data/example/shubo.yaml +9 -9
- data/example/three_step_mashing_recipe.rb +5 -5
- data/lib/toji/brew/base.rb +4 -2
- data/lib/toji/brew/graph.rb +1 -0
- data/lib/toji/brew/graph/multi_progress.rb +200 -0
- data/lib/toji/brew/graph/progress.rb +100 -29
- data/lib/toji/brew/koji.rb +2 -2
- data/lib/toji/brew/moromi.rb +2 -2
- data/lib/toji/brew/shubo.rb +2 -2
- data/lib/toji/brew/state.rb +3 -0
- data/lib/toji/recipe/step.rb +4 -2
- data/lib/toji/version.rb +1 -1
- data/toji.gemspec +1 -1
- metadata +9 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: babdb8cea1bd57660a6e5eb2652b1f6a99e45f8a10e4249ce7406db9195255da
|
4
|
+
data.tar.gz: 488d9490343ff3828b974c3cff9ec5784cd4cc7fb618e47420a2f1099eae47b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8fd8b2552331a81cb0c584b39a5f8f816f155e6d09d6bc28de30d55144631f6e451abbd4ecc49ba2a880a94e4db120106532f74dda7a8ae99e36ec1cc1e0935b
|
7
|
+
data.tar.gz: 85dab7b8fdf06c7a8fe31ac0b5c2643a5702530e37d477ebe56fd414c3329fd4141c2828151cecc166d76ae64c6cf8a1d3eaf817c2eaf7b6d5e4c6010757654e
|
data/example/koji_making.ipynb
CHANGED
@@ -14,25 +14,25 @@
|
|
14
14
|
" </script>\n",
|
15
15
|
"\n",
|
16
16
|
"\n",
|
17
|
-
"<div id=\"
|
17
|
+
"<div id=\"71caeb68-603a-41ab-bce2-202ce6fb3ede\" style=\"height: 100%; width: 100%;\"></div>\n",
|
18
18
|
"\n",
|
19
19
|
"<script>\n",
|
20
20
|
" require(['plotly'], function(Plotly) { \n",
|
21
21
|
"Plotly.newPlot(\n",
|
22
|
-
" '
|
23
|
-
" [{\"x\":[0,32400.0,36000.0,64800.0,64801.0,108000.0,108001.0,136800.0,136801.0,158400.0,158401.0,172800.0,190800.0],\"y\":[null,35.0,32.0,32.0,31.0,35.0,33.0,37.0,35.0,38.0,37.0,40.0,40.0],\"text\":[null,\"01/01 09:00\",\"01/01 10:00\",\"01/01 18:00\",\"01/01 18:00\",\"01/02 06:00\",\"01/02 06:00\",\"01/02 14:00\",\"01/02 14:00\",\"01/02 20:00\",\"01/02 20:00\",\"01/03 00:00\",\"01/03 05:00\"],\"name\":\"temps\",\"line\":{\"shape\":\"linear\"}},{\"x\":[0,32400.0,36000.0,64800.0,108000.0,136800.0,158400.0,172800.0,190800.0],\"y\":[null,28.0,28.0,28.0,28.0,28.0,28.0,28.0,28.0],\"text\":[null,\"01/01 09:00\",\"01/01 10:00\",\"01/01 18:00\",\"01/02 06:00\",\"01/02 14:00\",\"01/02 20:00\",\"01/03 00:00\",\"01/03 05:00\"],\"name\":\"room_temp\",\"line\":{\"shape\":\"linear\"}},{\"x\":[0,108000.0,136800.0,158400.0,172800.0,190800.0],\"y\":[null,4,4,5,5,5],\"text\":[null,\"01/02 06:00\",\"01/02 14:00\",\"01/02 20:00\",\"01/03 00:00\",\"01/03 05:00\"],\"name\":\"room_psychrometry\",\"line\":{\"shape\":\"linear\"}}],\n",
|
24
|
-
" {\"xaxis\":{\"dtick\":86400,\"tickvals\":[0,86400,172800],\"ticktext\":[1,2,3]},\"annotations\":[
|
22
|
+
" '71caeb68-603a-41ab-bce2-202ce6fb3ede',\n",
|
23
|
+
" [{\"x\":[0,32400.0,36000.0,64800.0,64801.0,108000.0,108001.0,136800.0,136801.0,158400.0,158401.0,172800.0,190800.0],\"y\":[null,35.0,32.0,32.0,31.0,35.0,33.0,37.0,35.0,38.0,37.0,40.0,40.0],\"text\":[null,\"01/01 09:00\",\"01/01 10:00\",\"01/01 18:00\",\"01/01 18:00\",\"01/02 06:00\",\"01/02 06:00\",\"01/02 14:00\",\"01/02 14:00\",\"01/02 20:00\",\"01/02 20:00\",\"01/03 00:00\",\"01/03 05:00\"],\"name\":\"temps\",\"line\":{\"dash\":\"solid\",\"shape\":\"linear\"},\"marker\":{\"color\":\"#1f77b4\"}},{\"x\":[0,32400.0,36000.0,64800.0,108000.0,136800.0,158400.0,172800.0,190800.0],\"y\":[null,28.0,28.0,28.0,28.0,28.0,28.0,28.0,28.0],\"text\":[null,\"01/01 09:00\",\"01/01 10:00\",\"01/01 18:00\",\"01/02 06:00\",\"01/02 14:00\",\"01/02 20:00\",\"01/03 00:00\",\"01/03 05:00\"],\"name\":\"room_temp\",\"line\":{\"dash\":\"solid\",\"shape\":\"linear\"},\"marker\":{\"color\":\"#2ca02c\"}},{\"x\":[0,108000.0,136800.0,158400.0,172800.0,190800.0],\"y\":[null,4,4,5,5,5],\"text\":[null,\"01/02 06:00\",\"01/02 14:00\",\"01/02 20:00\",\"01/03 00:00\",\"01/03 05:00\"],\"name\":\"room_psychrometry\",\"line\":{\"dash\":\"solid\",\"shape\":\"linear\"},\"marker\":{\"color\":\"#d62728\"}}],\n",
|
24
|
+
" {\"xaxis\":{\"dtick\":86400,\"tickvals\":[0,86400,172800],\"ticktext\":[1,2,3]},\"annotations\":[]},\n",
|
25
25
|
" {\"linkText\":\"Export to plot.ly\",\"showLink\":true}\n",
|
26
26
|
")\n",
|
27
27
|
"\n",
|
28
28
|
"window.addEventListener('resize', function() {\n",
|
29
|
-
" Plotly.Plots.resize(document.getElementById('
|
29
|
+
" Plotly.Plots.resize(document.getElementById('71caeb68-603a-41ab-bce2-202ce6fb3ede'))\n",
|
30
30
|
"})\n",
|
31
31
|
" }) \n",
|
32
32
|
"</script>"
|
33
33
|
],
|
34
34
|
"text/plain": [
|
35
|
-
"#<Plotly::Offline::HTML:
|
35
|
+
"#<Plotly::Offline::HTML:0x00007f9833475658 @id=\"71caeb68-603a-41ab-bce2-202ce6fb3ede\", @data=[{:x=>[0, 32400.0, 36000.0, 64800.0, 64801.0, 108000.0, 108001.0, 136800.0, 136801.0, 158400.0, 158401.0, 172800.0, 190800.0], :y=>[nil, 35.0, 32.0, 32.0, 31.0, 35.0, 33.0, 37.0, 35.0, 38.0, 37.0, 40.0, 40.0], :text=>[nil, \"01/01 09:00\", \"01/01 10:00\", \"01/01 18:00\", \"01/01 18:00\", \"01/02 06:00\", \"01/02 06:00\", \"01/02 14:00\", \"01/02 14:00\", \"01/02 20:00\", \"01/02 20:00\", \"01/03 00:00\", \"01/03 05:00\"], :name=>\"temps\", :line=>{:dash=>:solid, :shape=>:linear}, :marker=>{:color=>\"#1f77b4\"}}, {:x=>[0, 32400.0, 36000.0, 64800.0, 108000.0, 136800.0, 158400.0, 172800.0, 190800.0], :y=>[nil, 28.0, 28.0, 28.0, 28.0, 28.0, 28.0, 28.0, 28.0], :text=>[nil, \"01/01 09:00\", \"01/01 10:00\", \"01/01 18:00\", \"01/02 06:00\", \"01/02 14:00\", \"01/02 20:00\", \"01/03 00:00\", \"01/03 05:00\"], :name=>\"room_temp\", :line=>{:dash=>:solid, :shape=>:linear}, :marker=>{:color=>\"#2ca02c\"}}, {:x=>[0, 108000.0, 136800.0, 158400.0, 172800.0, 190800.0], :y=>[nil, 4, 4, 5, 5, 5], :text=>[nil, \"01/02 06:00\", \"01/02 14:00\", \"01/02 20:00\", \"01/03 00:00\", \"01/03 05:00\"], :name=>\"room_psychrometry\", :line=>{:dash=>:solid, :shape=>:linear}, :marker=>{:color=>\"#d62728\"}}], @layout={:xaxis=>{:dtick=>86400, :tickvals=>[0, 86400, 172800], :ticktext=>[1, 2, 3]}, :annotations=>[]}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
|
36
36
|
]
|
37
37
|
},
|
38
38
|
"metadata": {},
|
@@ -47,25 +47,25 @@
|
|
47
47
|
" </script>\n",
|
48
48
|
"\n",
|
49
49
|
"\n",
|
50
|
-
"<div id=\"
|
50
|
+
"<div id=\"76c15d36-0dc9-472d-a63b-ea2f7237ec91\" style=\"height: 100%; width: 100%;\"></div>\n",
|
51
51
|
"\n",
|
52
52
|
"<script>\n",
|
53
53
|
" require(['plotly'], function(Plotly) { \n",
|
54
54
|
"Plotly.newPlot(\n",
|
55
|
-
" '
|
55
|
+
" '76c15d36-0dc9-472d-a63b-ea2f7237ec91',\n",
|
56
56
|
" [{\"type\":\"table\",\"header\":{\"values\":[\"day_label\",\"display_time\",\"mark\",\"temps\",\"room_temp\",\"room_psychrometry\"]},\"cells\":{\"values\":[[1,1,1,2,2,2,3,3],[\"01/01 09:00\",\"01/01 10:00\",\"01/01 18:00\",\"01/02 06:00\",\"01/02 14:00\",\"01/02 20:00\",\"01/03 00:00\",\"01/03 05:00\"],[\"hikikomi\",\"tokomomi\",\"kirikaeshi\",\"mori\",\"naka_shigoto\",\"shimai_shigoto\",\"tsumikae\",\"dekoji\"],[\"35.0\",\"32.0\",\"32.0, 31.0\",\"35.0, 33.0\",\"37.0, 35.0\",\"38.0, 37.0\",\"40.0\",\"40.0\"],[28.0,28.0,28.0,28.0,28.0,28.0,28.0,28.0],[\"\",\"\",\"\",4,4,5,5,5]]}}],\n",
|
57
|
-
" {},\n",
|
57
|
+
" {\"grid\":{\"rows\":1,\"columns\":1,\"pattern\":\"independent\"}},\n",
|
58
58
|
" {\"linkText\":\"Export to plot.ly\",\"showLink\":true}\n",
|
59
59
|
")\n",
|
60
60
|
"\n",
|
61
61
|
"window.addEventListener('resize', function() {\n",
|
62
|
-
" Plotly.Plots.resize(document.getElementById('
|
62
|
+
" Plotly.Plots.resize(document.getElementById('76c15d36-0dc9-472d-a63b-ea2f7237ec91'))\n",
|
63
63
|
"})\n",
|
64
64
|
" }) \n",
|
65
65
|
"</script>"
|
66
66
|
],
|
67
67
|
"text/plain": [
|
68
|
-
"#<Plotly::Offline::HTML:
|
68
|
+
"#<Plotly::Offline::HTML:0x00007f9834815a28 @id=\"76c15d36-0dc9-472d-a63b-ea2f7237ec91\", @data=[{:type=>:table, :header=>{:values=>[:day_label, :display_time, :mark, :temps, :room_temp, :room_psychrometry]}, :cells=>{:values=>[[1, 1, 1, 2, 2, 2, 3, 3], [\"01/01 09:00\", \"01/01 10:00\", \"01/01 18:00\", \"01/02 06:00\", \"01/02 14:00\", \"01/02 20:00\", \"01/03 00:00\", \"01/03 05:00\"], [\"hikikomi\", \"tokomomi\", \"kirikaeshi\", \"mori\", \"naka_shigoto\", \"shimai_shigoto\", \"tsumikae\", \"dekoji\"], [\"35.0\", \"32.0\", \"32.0, 31.0\", \"35.0, 33.0\", \"37.0, 35.0\", \"38.0, 37.0\", \"40.0\", \"40.0\"], [28.0, 28.0, 28.0, 28.0, 28.0, 28.0, 28.0, 28.0], [\"\", \"\", \"\", 4, 4, 5, 5, 5]]}}], @layout={:grid=>{:rows=>1, :columns=>1, :pattern=>\"independent\"}}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
|
69
69
|
]
|
70
70
|
},
|
71
71
|
"metadata": {},
|
@@ -74,7 +74,7 @@
|
|
74
74
|
{
|
75
75
|
"data": {
|
76
76
|
"text/plain": [
|
77
|
-
"#<CZTop::Socket::PUB:
|
77
|
+
"#<CZTop::Socket::PUB:0x7f9835926690 last_endpoint=\"tcp://127.0.0.1:56761\">"
|
78
78
|
]
|
79
79
|
},
|
80
80
|
"execution_count": 1,
|
data/example/koji_making.yaml
CHANGED
@@ -1,50 +1,50 @@
|
|
1
1
|
date_line: 0
|
2
2
|
records:
|
3
3
|
- time: 2020-1-1 9:00
|
4
|
-
mark: hikikomi
|
4
|
+
mark: :hikikomi
|
5
5
|
temps: 35.0
|
6
6
|
room_temp: 28.0
|
7
7
|
room_psychrometry:
|
8
8
|
- elapsed_time: 3600
|
9
|
-
mark: tokomomi
|
9
|
+
mark: :tokomomi
|
10
10
|
temps: 32.0
|
11
11
|
room_temp: 28.0
|
12
12
|
room_psychrometry:
|
13
13
|
- elapsed_time: 32400
|
14
|
-
mark: kirikaeshi
|
14
|
+
mark: :kirikaeshi
|
15
15
|
temps:
|
16
16
|
- 32.0
|
17
17
|
- 31.0
|
18
18
|
room_temp: 28.0
|
19
19
|
room_psychrometry:
|
20
20
|
- elapsed_time: 75600
|
21
|
-
mark: mori
|
21
|
+
mark: :mori
|
22
22
|
temps:
|
23
23
|
- 35.0
|
24
24
|
- 33.0
|
25
25
|
room_temp: 28.0
|
26
26
|
room_psychrometry: 4
|
27
27
|
- elapsed_time: 104400
|
28
|
-
mark: naka_shigoto
|
28
|
+
mark: :naka_shigoto
|
29
29
|
temps:
|
30
30
|
- 37.0
|
31
31
|
- 35.0
|
32
32
|
room_temp: 28.0
|
33
33
|
room_psychrometry: 4
|
34
34
|
- elapsed_time: 126000
|
35
|
-
mark: shimai_shigoto
|
35
|
+
mark: :shimai_shigoto
|
36
36
|
temps:
|
37
37
|
- 38.0
|
38
38
|
- 37.0
|
39
39
|
room_temp: 28.0
|
40
40
|
room_psychrometry: 5
|
41
41
|
- elapsed_time: 140400
|
42
|
-
mark: tsumikae
|
42
|
+
mark: :tsumikae
|
43
43
|
temps: 40.0
|
44
44
|
room_temp: 28.0
|
45
45
|
room_psychrometry: 5
|
46
46
|
- elapsed_time: 158400
|
47
|
-
mark: dekoji
|
47
|
+
mark: :dekoji
|
48
48
|
temps: 40.0
|
49
49
|
room_temp: 28.0
|
50
50
|
room_psychrometry: 5
|
@@ -0,0 +1,141 @@
|
|
1
|
+
{
|
2
|
+
"cells": [
|
3
|
+
{
|
4
|
+
"cell_type": "code",
|
5
|
+
"execution_count": 1,
|
6
|
+
"metadata": {
|
7
|
+
"scrolled": false
|
8
|
+
},
|
9
|
+
"outputs": [
|
10
|
+
{
|
11
|
+
"data": {
|
12
|
+
"text/html": [
|
13
|
+
"\n",
|
14
|
+
" <script>\n",
|
15
|
+
" requirejs.config({paths: { 'plotly': ['https://cdn.plot.ly/plotly-latest.min'] }})\n",
|
16
|
+
" </script>\n",
|
17
|
+
"\n",
|
18
|
+
"\n",
|
19
|
+
"<div id=\"c1b8b6b9-7d4c-40a2-9882-6106b59bc406\" style=\"height: 100%; width: 100%;\"></div>\n",
|
20
|
+
"\n",
|
21
|
+
"<script>\n",
|
22
|
+
" require(['plotly'], function(Plotly) { \n",
|
23
|
+
"Plotly.newPlot(\n",
|
24
|
+
" 'c1b8b6b9-7d4c-40a2-9882-6106b59bc406',\n",
|
25
|
+
" [{\"x\":[0,32400.0,39600.0,64800.0,64801.0,97200.0,117900.0,117901.0,150300.0,150301.0,156600.0,189000.0,189001.0,201600.0,216000.0],\"y\":[null,27.3,27.2,31.2,30.1,30.7,32.7,31.2,35.6,33.5,34.8,36.2,34.7,38.9,41.6],\"text\":[null,\"03/28 15:30\",\"03/28 17:30\",\"03/29 00:30\",\"03/29 00:30\",\"03/29 09:30\",\"03/29 15:15\",\"03/29 15:15\",\"03/30 00:15\",\"03/30 00:15\",\"03/30 02:00\",\"03/30 11:00\",\"03/30 11:00\",\"03/30 14:30\",\"03/30 18:30\"],\"name\":\"actual temps\",\"line\":{\"dash\":\"solid\",\"shape\":\"linear\"},\"marker\":{\"color\":\"#1f77b4\"}},{\"x\":[0,32400.0,39600.0,64800.0,97200.0,117900.0,150300.0,156600.0,189000.0,201600.0,216000.0],\"y\":[null,30,33,33,35,35,37,40,45,50,50],\"text\":[null,\"03/28 15:30\",\"03/28 17:30\",\"03/29 00:30\",\"03/29 09:30\",\"03/29 15:15\",\"03/30 00:15\",\"03/30 02:00\",\"03/30 11:00\",\"03/30 14:30\",\"03/30 18:30\"],\"name\":\"actual preset_temp\",\"line\":{\"dash\":\"solid\",\"shape\":\"hv\"},\"marker\":{\"color\":\"#ff7f0e\"}},{\"x\":[0,32400.0,64800.0,97200.0,117900.0,150300.0,189000.0,201600.0,216000.0],\"y\":[null,29,28.5,27,28,28,30,31,36],\"text\":[null,\"03/28 15:30\",\"03/29 00:30\",\"03/29 09:30\",\"03/29 15:15\",\"03/30 00:15\",\"03/30 11:00\",\"03/30 14:30\",\"03/30 18:30\"],\"name\":\"actual room_temp\",\"line\":{\"dash\":\"solid\",\"shape\":\"linear\"},\"marker\":{\"color\":\"#2ca02c\"}},{\"x\":[0,32400.0,36000.0,64800.0,64801.0,108000.0,108001.0,136800.0,136801.0,158400.0,158401.0,172800.0,190800.0],\"y\":[null,35.0,32.0,32.0,31.0,35.0,33.0,37.0,35.0,38.0,37.0,40.0,40.0],\"text\":[null,\"01/01 09:00\",\"01/01 10:00\",\"01/01 18:00\",\"01/01 18:00\",\"01/02 06:00\",\"01/02 06:00\",\"01/02 14:00\",\"01/02 14:00\",\"01/02 20:00\",\"01/02 20:00\",\"01/03 00:00\",\"01/03 05:00\"],\"name\":\"expect temps\",\"line\":{\"dash\":\"dot\",\"shape\":\"linear\"},\"marker\":{\"color\":\"#1f77b4\"}},{\"x\":[0,32400.0,36000.0,64800.0,108000.0,136800.0,158400.0,172800.0,190800.0],\"y\":[null,28.0,28.0,28.0,28.0,28.0,28.0,28.0,28.0],\"text\":[null,\"01/01 09:00\",\"01/01 10:00\",\"01/01 18:00\",\"01/02 06:00\",\"01/02 14:00\",\"01/02 20:00\",\"01/03 00:00\",\"01/03 05:00\"],\"name\":\"expect room_temp\",\"line\":{\"dash\":\"dot\",\"shape\":\"linear\"},\"marker\":{\"color\":\"#2ca02c\"}},{\"x\":[0,108000.0,136800.0,158400.0,172800.0,190800.0],\"y\":[null,4,4,5,5,5],\"text\":[null,\"01/02 06:00\",\"01/02 14:00\",\"01/02 20:00\",\"01/03 00:00\",\"01/03 05:00\"],\"name\":\"expect room_psychrometry\",\"line\":{\"dash\":\"dot\",\"shape\":\"linear\"},\"marker\":{\"color\":\"#d62728\"}}],\n",
|
26
|
+
" {\"xaxis\":{\"dtick\":86400,\"tickvals\":[0,86400,172800],\"ticktext\":[1,2,3]},\"annotations\":[]},\n",
|
27
|
+
" {\"linkText\":\"Export to plot.ly\",\"showLink\":true}\n",
|
28
|
+
")\n",
|
29
|
+
"\n",
|
30
|
+
"window.addEventListener('resize', function() {\n",
|
31
|
+
" Plotly.Plots.resize(document.getElementById('c1b8b6b9-7d4c-40a2-9882-6106b59bc406'))\n",
|
32
|
+
"})\n",
|
33
|
+
" }) \n",
|
34
|
+
"</script>"
|
35
|
+
],
|
36
|
+
"text/plain": [
|
37
|
+
"#<Plotly::Offline::HTML:0x00007fe194b5ae78 @id=\"c1b8b6b9-7d4c-40a2-9882-6106b59bc406\", @data=[{:x=>[0, 32400.0, 39600.0, 64800.0, 64801.0, 97200.0, 117900.0, 117901.0, 150300.0, 150301.0, 156600.0, 189000.0, 189001.0, 201600.0, 216000.0], :y=>[nil, 27.3, 27.2, 31.2, 30.1, 30.7, 32.7, 31.2, 35.6, 33.5, 34.8, 36.2, 34.7, 38.9, 41.6], :text=>[nil, \"03/28 15:30\", \"03/28 17:30\", \"03/29 00:30\", \"03/29 00:30\", \"03/29 09:30\", \"03/29 15:15\", \"03/29 15:15\", \"03/30 00:15\", \"03/30 00:15\", \"03/30 02:00\", \"03/30 11:00\", \"03/30 11:00\", \"03/30 14:30\", \"03/30 18:30\"], :name=>\"actual temps\", :line=>{:dash=>:solid, :shape=>:linear}, :marker=>{:color=>\"#1f77b4\"}}, {:x=>[0, 32400.0, 39600.0, 64800.0, 97200.0, 117900.0, 150300.0, 156600.0, 189000.0, 201600.0, 216000.0], :y=>[nil, 30, 33, 33, 35, 35, 37, 40, 45, 50, 50], :text=>[nil, \"03/28 15:30\", \"03/28 17:30\", \"03/29 00:30\", \"03/29 09:30\", \"03/29 15:15\", \"03/30 00:15\", \"03/30 02:00\", \"03/30 11:00\", \"03/30 14:30\", \"03/30 18:30\"], :name=>\"actual preset_temp\", :line=>{:dash=>:solid, :shape=>:hv}, :marker=>{:color=>\"#ff7f0e\"}}, {:x=>[0, 32400.0, 64800.0, 97200.0, 117900.0, 150300.0, 189000.0, 201600.0, 216000.0], :y=>[nil, 29, 28.5, 27, 28, 28, 30, 31, 36], :text=>[nil, \"03/28 15:30\", \"03/29 00:30\", \"03/29 09:30\", \"03/29 15:15\", \"03/30 00:15\", \"03/30 11:00\", \"03/30 14:30\", \"03/30 18:30\"], :name=>\"actual room_temp\", :line=>{:dash=>:solid, :shape=>:linear}, :marker=>{:color=>\"#2ca02c\"}}, {:x=>[0, 32400.0, 36000.0, 64800.0, 64801.0, 108000.0, 108001.0, 136800.0, 136801.0, 158400.0, 158401.0, 172800.0, 190800.0], :y=>[nil, 35.0, 32.0, 32.0, 31.0, 35.0, 33.0, 37.0, 35.0, 38.0, 37.0, 40.0, 40.0], :text=>[nil, \"01/01 09:00\", \"01/01 10:00\", \"01/01 18:00\", \"01/01 18:00\", \"01/02 06:00\", \"01/02 06:00\", \"01/02 14:00\", \"01/02 14:00\", \"01/02 20:00\", \"01/02 20:00\", \"01/03 00:00\", \"01/03 05:00\"], :name=>\"expect temps\", :line=>{:dash=>:dot, :shape=>:linear}, :marker=>{:color=>\"#1f77b4\"}}, {:x=>[0, 32400.0, 36000.0, 64800.0, 108000.0, 136800.0, 158400.0, 172800.0, 190800.0], :y=>[nil, 28.0, 28.0, 28.0, 28.0, 28.0, 28.0, 28.0, 28.0], :text=>[nil, \"01/01 09:00\", \"01/01 10:00\", \"01/01 18:00\", \"01/02 06:00\", \"01/02 14:00\", \"01/02 20:00\", \"01/03 00:00\", \"01/03 05:00\"], :name=>\"expect room_temp\", :line=>{:dash=>:dot, :shape=>:linear}, :marker=>{:color=>\"#2ca02c\"}}, {:x=>[0, 108000.0, 136800.0, 158400.0, 172800.0, 190800.0], :y=>[nil, 4, 4, 5, 5, 5], :text=>[nil, \"01/02 06:00\", \"01/02 14:00\", \"01/02 20:00\", \"01/03 00:00\", \"01/03 05:00\"], :name=>\"expect room_psychrometry\", :line=>{:dash=>:dot, :shape=>:linear}, :marker=>{:color=>\"#d62728\"}}], @layout={:xaxis=>{:dtick=>86400, :tickvals=>[0, 86400, 172800], :ticktext=>[1, 2, 3]}, :annotations=>[]}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
|
38
|
+
]
|
39
|
+
},
|
40
|
+
"metadata": {},
|
41
|
+
"output_type": "display_data"
|
42
|
+
},
|
43
|
+
{
|
44
|
+
"data": {
|
45
|
+
"text/html": [
|
46
|
+
"\n",
|
47
|
+
" <script>\n",
|
48
|
+
" requirejs.config({paths: { 'plotly': ['https://cdn.plot.ly/plotly-latest.min'] }})\n",
|
49
|
+
" </script>\n",
|
50
|
+
"\n",
|
51
|
+
"\n",
|
52
|
+
"<div id=\"6e507de4-5545-45fa-a85c-4acb0904dafe\" style=\"height: 100%; width: 100%;\"></div>\n",
|
53
|
+
"\n",
|
54
|
+
"<script>\n",
|
55
|
+
" require(['plotly'], function(Plotly) { \n",
|
56
|
+
"Plotly.newPlot(\n",
|
57
|
+
" '6e507de4-5545-45fa-a85c-4acb0904dafe',\n",
|
58
|
+
" [{\"type\":\"table\",\"header\":{\"values\":[[\"\",\"day_label\"],[\"actual\",\"day_label\"],[\"\",\"display_time\"],[\"\",\"mark\"],[\"\",\"temps\"],[\"\",\"preset_temp\"],[\"\",\"room_temp\"],[\"expect\",\"day_label\"],[\"\",\"display_time\"],[\"\",\"mark\"],[\"\",\"temps\"],[\"\",\"room_temp\"],[\"\",\"room_psychrometry\"]]},\"cells\":{\"values\":[[1,\"\",\"\",2,\"\",\"\",\"\",3,\"\",\"\"],[1,1,1,2,2,2,2,3,3,3],[\"03/28 15:30\",\"03/28 17:30\",\"03/29 00:30\",\"03/29 09:30\",\"03/29 15:15\",\"03/30 00:15\",\"03/30 02:00\",\"03/30 11:00\",\"03/30 14:30\",\"03/30 18:30\"],[\"hikikomi\",\"\",\"kirikaeshi\",\"\",\"mori\",\"naka_shigoto\",\"\",\"shimai_shigoto\",\"\",\"dekoji\"],[\"27.3\",\"27.2\",\"31.2, 30.1\",\"30.7\",\"32.7, 31.2\",\"35.6, 33.5\",\"34.8\",\"36.2, 34.7\",\"38.9\",\"41.6\"],[30,33,33,35,35,37,40,45,50,50],[29,\"\",28.5,27,28,28,\"\",30,31,36],[1,1,1,2,2,2,\"\",3,3,\"\"],[\"01/01 09:00\",\"01/01 10:00\",\"01/01 18:00\",\"01/02 06:00\",\"01/02 14:00\",\"01/02 20:00\",\"\",\"01/03 00:00\",\"01/03 05:00\",\"\"],[\"hikikomi\",\"tokomomi\",\"kirikaeshi\",\"mori\",\"naka_shigoto\",\"shimai_shigoto\",\"\",\"tsumikae\",\"dekoji\",\"\"],[\"35.0\",\"32.0\",\"32.0, 31.0\",\"35.0, 33.0\",\"37.0, 35.0\",\"38.0, 37.0\",\"\",\"40.0\",\"40.0\",\"\"],[28.0,28.0,28.0,28.0,28.0,28.0,\"\",28.0,28.0,\"\"],[\"\",\"\",\"\",4,4,5,\"\",5,5,\"\"]]}}],\n",
|
59
|
+
" {\"height\":1000},\n",
|
60
|
+
" {\"linkText\":\"Export to plot.ly\",\"showLink\":true}\n",
|
61
|
+
")\n",
|
62
|
+
"\n",
|
63
|
+
"window.addEventListener('resize', function() {\n",
|
64
|
+
" Plotly.Plots.resize(document.getElementById('6e507de4-5545-45fa-a85c-4acb0904dafe'))\n",
|
65
|
+
"})\n",
|
66
|
+
" }) \n",
|
67
|
+
"</script>"
|
68
|
+
],
|
69
|
+
"text/plain": [
|
70
|
+
"#<Plotly::Offline::HTML:0x00007fe1949c24f8 @id=\"6e507de4-5545-45fa-a85c-4acb0904dafe\", @data=[{:type=>:table, :header=>{:values=>[[\"\", :day_label], [:actual, :day_label], [\"\", :display_time], [\"\", :mark], [\"\", :temps], [\"\", :preset_temp], [\"\", :room_temp], [:expect, :day_label], [\"\", :display_time], [\"\", :mark], [\"\", :temps], [\"\", :room_temp], [\"\", :room_psychrometry]]}, :cells=>{:values=>[[1, \"\", \"\", 2, \"\", \"\", \"\", 3, \"\", \"\"], [1, 1, 1, 2, 2, 2, 2, 3, 3, 3], [\"03/28 15:30\", \"03/28 17:30\", \"03/29 00:30\", \"03/29 09:30\", \"03/29 15:15\", \"03/30 00:15\", \"03/30 02:00\", \"03/30 11:00\", \"03/30 14:30\", \"03/30 18:30\"], [:hikikomi, \"\", :kirikaeshi, \"\", :mori, :naka_shigoto, \"\", :shimai_shigoto, \"\", :dekoji], [\"27.3\", \"27.2\", \"31.2, 30.1\", \"30.7\", \"32.7, 31.2\", \"35.6, 33.5\", \"34.8\", \"36.2, 34.7\", \"38.9\", \"41.6\"], [30, 33, 33, 35, 35, 37, 40, 45, 50, 50], [29, \"\", 28.5, 27, 28, 28, \"\", 30, 31, 36], [1, 1, 1, 2, 2, 2, \"\", 3, 3, \"\"], [\"01/01 09:00\", \"01/01 10:00\", \"01/01 18:00\", \"01/02 06:00\", \"01/02 14:00\", \"01/02 20:00\", \"\", \"01/03 00:00\", \"01/03 05:00\", \"\"], [:hikikomi, :tokomomi, :kirikaeshi, :mori, :naka_shigoto, :shimai_shigoto, \"\", :tsumikae, :dekoji, \"\"], [\"35.0\", \"32.0\", \"32.0, 31.0\", \"35.0, 33.0\", \"37.0, 35.0\", \"38.0, 37.0\", \"\", \"40.0\", \"40.0\", \"\"], [28.0, 28.0, 28.0, 28.0, 28.0, 28.0, \"\", 28.0, 28.0, \"\"], [\"\", \"\", \"\", 4, 4, 5, \"\", 5, 5, \"\"]]}}], @layout={:height=>1000}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
|
71
|
+
]
|
72
|
+
},
|
73
|
+
"metadata": {},
|
74
|
+
"output_type": "display_data"
|
75
|
+
},
|
76
|
+
{
|
77
|
+
"data": {
|
78
|
+
"text/plain": [
|
79
|
+
"#<CZTop::Socket::PUB:0x7fe197162b30 last_endpoint=\"tcp://127.0.0.1:56424\">"
|
80
|
+
]
|
81
|
+
},
|
82
|
+
"execution_count": 1,
|
83
|
+
"metadata": {},
|
84
|
+
"output_type": "execute_result"
|
85
|
+
}
|
86
|
+
],
|
87
|
+
"source": [
|
88
|
+
"$LOAD_PATH << File.dirname(__FILE__) + \"/../lib\"\n",
|
89
|
+
"require 'toji'\n",
|
90
|
+
"require 'rbplotly'\n",
|
91
|
+
"\n",
|
92
|
+
"expect_koji = Toji::Brew::Koji.load_yaml_file(\"koji_making.yaml\")\n",
|
93
|
+
"\n",
|
94
|
+
"actual_koji = Toji::Brew::Koji.builder\n",
|
95
|
+
" .date_line(6.5)\n",
|
96
|
+
" .add(time: Time.mktime(2020, 3, 28, 15, 30), mark: :hikikomi, temps: 27.3, preset_temp: 30, room_temp: 29)\n",
|
97
|
+
" .add(time: Time.mktime(2020, 3, 28, 17, 30), temps: 27.2, preset_temp: 33)\n",
|
98
|
+
" .add(time: Time.mktime(2020, 3, 29, 0, 30), mark: :kirikaeshi, temps: [31.2, 30.1], preset_temp: 33, room_temp: 28.5)\n",
|
99
|
+
" .add(time: Time.mktime(2020, 3, 29, 9, 30), temps: 30.7, preset_temp: 35, room_temp: 27)\n",
|
100
|
+
" .add(time: Time.mktime(2020, 3, 29, 15, 15), mark: :mori, temps: [32.7, 31.2], preset_temp: 35, room_temp: 28)\n",
|
101
|
+
" .add(time: Time.mktime(2020, 3, 30, 0, 15), mark: :naka_shigoto, temps: [35.6, 33.5], preset_temp: 37, room_temp: 28)\n",
|
102
|
+
" .add(time: Time.mktime(2020, 3, 30, 2, 0), temps: 34.8, preset_temp: 40)\n",
|
103
|
+
" .add(time: Time.mktime(2020, 3, 30, 11, 0), mark: :shimai_shigoto, temps: [36.2, 34.7], preset_temp: 45, room_temp: 30)\n",
|
104
|
+
" .add(time: Time.mktime(2020, 3, 30, 14, 30), temps: 38.9, preset_temp: 50, room_temp: 31)\n",
|
105
|
+
" .add(time: Time.mktime(2020, 3, 30, 18, 30), mark: :dekoji, temps: 41.6, preset_temp: 50, room_temp: 36)\n",
|
106
|
+
" .build\n",
|
107
|
+
"\n",
|
108
|
+
"progress = Toji::Brew::Graph::MultiProgress.new\n",
|
109
|
+
" .add(actual_koji, :actual)\n",
|
110
|
+
" .add(expect_koji, :expect)\n",
|
111
|
+
"\n",
|
112
|
+
"progress.plot.show\n",
|
113
|
+
"progress.table(:day_label).tap {|t|\n",
|
114
|
+
" t.layout.height = 1000\n",
|
115
|
+
"}.show"
|
116
|
+
]
|
117
|
+
},
|
118
|
+
{
|
119
|
+
"cell_type": "code",
|
120
|
+
"execution_count": null,
|
121
|
+
"metadata": {},
|
122
|
+
"outputs": [],
|
123
|
+
"source": []
|
124
|
+
}
|
125
|
+
],
|
126
|
+
"metadata": {
|
127
|
+
"kernelspec": {
|
128
|
+
"display_name": "Ruby 2.7.0",
|
129
|
+
"language": "ruby",
|
130
|
+
"name": "ruby"
|
131
|
+
},
|
132
|
+
"language_info": {
|
133
|
+
"file_extension": ".rb",
|
134
|
+
"mimetype": "application/x-ruby",
|
135
|
+
"name": "ruby",
|
136
|
+
"version": "2.6.3"
|
137
|
+
}
|
138
|
+
},
|
139
|
+
"nbformat": 4,
|
140
|
+
"nbformat_minor": 2
|
141
|
+
}
|
data/example/moromi.ipynb
CHANGED
@@ -16,25 +16,25 @@
|
|
16
16
|
" </script>\n",
|
17
17
|
"\n",
|
18
18
|
"\n",
|
19
|
-
"<div id=\"
|
19
|
+
"<div id=\"68768a62-2042-4fac-b085-3eb0f965f432\" style=\"height: 100%; width: 100%;\"></div>\n",
|
20
20
|
"\n",
|
21
21
|
"<script>\n",
|
22
22
|
" require(['plotly'], function(Plotly) { \n",
|
23
23
|
"Plotly.newPlot(\n",
|
24
|
-
" '
|
25
|
-
" [{\"x\":[0.0,1.0,86400.0,172800.0,259200.0,259201.0,345600.0,345601.0,432000.0,518400.0,604800.0,691200.0,777600.0,864000.0,950400.0,1036800.0,1123200.0,1209600.0,1296000.0,1382400.0,1468800.0,1555200.0,1641600.0,1728000.0,1814400.0,1900800.0,1987200.0,2073600.0],\"y\":[14.8,11.0,14.3,11.3,6.9,10.6,7.5,8.0,9.1,10.4,11.9,12.3,13.1,13.1,12.9,12.8,12.9,12.6,12.0,11.2,10.2,9.7,9.8,9.1,8.4,8.1,8.3,8.1],\"text\":[\"01/16 00:00\",\"01/16 00:00\",\"01/17 00:00\",\"01/18 00:00\",\"01/19 00:00\",\"01/19 00:00\",\"01/20 00:00\",\"01/20 00:00\",\"01/21 00:00\",\"01/22 00:00\",\"01/23 00:00\",\"01/24 00:00\",\"01/25 00:00\",\"01/26 00:00\",\"01/27 00:00\",\"01/28 00:00\",\"01/29 00:00\",\"01/30 00:00\",\"01/31 00:00\",\"02/01 00:00\",\"02/02 00:00\",\"02/03 00:00\",\"02/04 00:00\",\"02/05 00:00\",\"02/06 00:00\",\"02/07 00:00\",\"02/08 00:00\",\"02/09 00:00\"],\"name\":\"temps\",\"line\":{\"shape\":\"linear\"}},{\"x\":[0.0,86400.0,172800.0,259200.0,345600.0,432000.0,518400.0,604800.0,691200.0,777600.0,864000.0,950400.0,1036800.0,1123200.0,1209600.0,1296000.0,1382400.0,1468800.0,1555200.0,1641600.0,1728000.0,1814400.0,1900800.0,1987200.0,2073600.0],\"y\":[9,9,8.5,9,6,7,7,8,8,7.5,7.5,7.5,7.0,8.0,8.0,7.0,7.0,6.5,7.0,8.0,6.0,5.0,5.0,7.0,6.0],\"text\":[\"01/16 00:00\",\"01/17 00:00\",\"01/18 00:00\",\"01/19 00:00\",\"01/20 00:00\",\"01/21 00:00\",\"01/22 00:00\",\"01/23 00:00\",\"01/24 00:00\",\"01/25 00:00\",\"01/26 00:00\",\"01/27 00:00\",\"01/28 00:00\",\"01/29 00:00\",\"01/30 00:00\",\"01/31 00:00\",\"02/01 00:00\",\"02/02 00:00\",\"02/03 00:00\",\"02/04 00:00\",\"02/05 00:00\",\"02/06 00:00\",\"02/07 00:00\",\"02/08 00:00\",\"02/09 00:00\"],\"name\":\"room_temp\",\"line\":{\"shape\":\"linear\"}},{\"x\":[604800.0,691200.0,777600.0,864000.0,950400.0,1036800.0,1123200.0,1209600.0,1296000.0,1382400.0,1468800.0,1641600.0,1728000.0,1814400.0,1900800.0,1987200.0],\"y\":[8.6,8.0,7.2,5.8,4.8,4.0,3.4,2.7,2.1,1.7000000000000002,1.3,0.8,0.5,0.30000000000000004,0.2,-0.0],\"text\":[\"01/23 00:00\",\"01/24 00:00\",\"01/25 00:00\",\"01/26 00:00\",\"01/27 00:00\",\"01/28 00:00\",\"01/29 00:00\",\"01/30 00:00\",\"01/31 00:00\",\"02/01 00:00\",\"02/02 00:00\",\"02/04 00:00\",\"02/05 00:00\",\"02/06 00:00\",\"02/07 00:00\",\"02/08 00:00\"],\"name\":\"baume\",\"line\":{\"shape\":\"linear\"}},{\"x\":[691200.0,777600.0,864000.0,1036800.0,1123200.0,1209600.0,1296000.0,1641600.0,1814400.0],\"y\":[4.8,6.75,7.992,10.7,11.6,12.7,13.7,16.0,16.3],\"text\":[\"01/24 00:00\",\"01/25 00:00\",\"01/26 00:00\",\"01/28 00:00\",\"01/29 00:00\",\"01/30 00:00\",\"01/31 00:00\",\"02/04 00:00\",\"02/06 00:00\"],\"name\":\"alcohol\",\"line\":{\"shape\":\"linear\"}},{\"x\":[604800.0,691200.0,777600.0,864000.0,950400.0,1036800.0,1123200.0,1209600.0,1296000.0,1382400.0,1468800.0,1641600.0,1728000.0,1814400.0,1900800.0,1987200.0],\"y\":[34.4,40.0,43.2,40.6,38.4,36.0,34.0,29.700000000000003,25.200000000000003,22.1,18.2,12.8,8.5,5.4,3.8000000000000003,-0.0],\"text\":[\"01/23 00:00\",\"01/24 00:00\",\"01/25 00:00\",\"01/26 00:00\",\"01/27 00:00\",\"01/28 00:00\",\"01/29 00:00\",\"01/30 00:00\",\"01/31 00:00\",\"02/01 00:00\",\"02/02 00:00\",\"02/04 00:00\",\"02/05 00:00\",\"02/06 00:00\",\"02/07 00:00\",\"02/08 00:00\"],\"name\":\"bmd\",\"line\":{\"shape\":\"linear\"}}],\n",
|
26
|
-
" {\"xaxis\":{\"dtick\":86400,\"tickvals\":[0,86400,172800,259200,345600,432000,518400,604800,691200,777600,864000,950400,1036800,1123200,1209600,1296000,1382400,1468800,1555200,1641600,1728000,1814400,1900800,1987200,2073600],\"ticktext\":[\"soe\",\"odori\",\"odori\",\"naka\",\"tome\",2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22]},\"annotations\":[]},\n",
|
24
|
+
" '68768a62-2042-4fac-b085-3eb0f965f432',\n",
|
25
|
+
" [{\"x\":[0.0,1.0,86400.0,172800.0,259200.0,259201.0,345600.0,345601.0,432000.0,518400.0,604800.0,691200.0,777600.0,864000.0,950400.0,1036800.0,1123200.0,1209600.0,1296000.0,1382400.0,1468800.0,1555200.0,1641600.0,1728000.0,1814400.0,1900800.0,1987200.0,2073600.0],\"y\":[14.8,11.0,14.3,11.3,6.9,10.6,7.5,8.0,9.1,10.4,11.9,12.3,13.1,13.1,12.9,12.8,12.9,12.6,12.0,11.2,10.2,9.7,9.8,9.1,8.4,8.1,8.3,8.1],\"text\":[\"01/16 00:00\",\"01/16 00:00\",\"01/17 00:00\",\"01/18 00:00\",\"01/19 00:00\",\"01/19 00:00\",\"01/20 00:00\",\"01/20 00:00\",\"01/21 00:00\",\"01/22 00:00\",\"01/23 00:00\",\"01/24 00:00\",\"01/25 00:00\",\"01/26 00:00\",\"01/27 00:00\",\"01/28 00:00\",\"01/29 00:00\",\"01/30 00:00\",\"01/31 00:00\",\"02/01 00:00\",\"02/02 00:00\",\"02/03 00:00\",\"02/04 00:00\",\"02/05 00:00\",\"02/06 00:00\",\"02/07 00:00\",\"02/08 00:00\",\"02/09 00:00\"],\"name\":\"temps\",\"line\":{\"dash\":\"solid\",\"shape\":\"linear\"},\"marker\":{\"color\":\"#1f77b4\"}},{\"x\":[0.0,86400.0,172800.0,259200.0,345600.0,432000.0,518400.0,604800.0,691200.0,777600.0,864000.0,950400.0,1036800.0,1123200.0,1209600.0,1296000.0,1382400.0,1468800.0,1555200.0,1641600.0,1728000.0,1814400.0,1900800.0,1987200.0,2073600.0],\"y\":[9,9,8.5,9,6,7,7,8,8,7.5,7.5,7.5,7.0,8.0,8.0,7.0,7.0,6.5,7.0,8.0,6.0,5.0,5.0,7.0,6.0],\"text\":[\"01/16 00:00\",\"01/17 00:00\",\"01/18 00:00\",\"01/19 00:00\",\"01/20 00:00\",\"01/21 00:00\",\"01/22 00:00\",\"01/23 00:00\",\"01/24 00:00\",\"01/25 00:00\",\"01/26 00:00\",\"01/27 00:00\",\"01/28 00:00\",\"01/29 00:00\",\"01/30 00:00\",\"01/31 00:00\",\"02/01 00:00\",\"02/02 00:00\",\"02/03 00:00\",\"02/04 00:00\",\"02/05 00:00\",\"02/06 00:00\",\"02/07 00:00\",\"02/08 00:00\",\"02/09 00:00\"],\"name\":\"room_temp\",\"line\":{\"dash\":\"solid\",\"shape\":\"linear\"},\"marker\":{\"color\":\"#2ca02c\"}},{\"x\":[604800.0,691200.0,777600.0,864000.0,950400.0,1036800.0,1123200.0,1209600.0,1296000.0,1382400.0,1468800.0,1641600.0,1728000.0,1814400.0,1900800.0,1987200.0],\"y\":[8.6,8.0,7.2,5.8,4.8,4.0,3.4,2.7,2.1,1.7000000000000002,1.3,0.8,0.5,0.30000000000000004,0.2,-0.0],\"text\":[\"01/23 00:00\",\"01/24 00:00\",\"01/25 00:00\",\"01/26 00:00\",\"01/27 00:00\",\"01/28 00:00\",\"01/29 00:00\",\"01/30 00:00\",\"01/31 00:00\",\"02/01 00:00\",\"02/02 00:00\",\"02/04 00:00\",\"02/05 00:00\",\"02/06 00:00\",\"02/07 00:00\",\"02/08 00:00\"],\"name\":\"baume\",\"line\":{\"dash\":\"solid\",\"shape\":\"linear\"},\"marker\":{\"color\":\"#9467bd\"}},{\"x\":[691200.0,777600.0,864000.0,1036800.0,1123200.0,1209600.0,1296000.0,1641600.0,1814400.0],\"y\":[4.8,6.75,7.992,10.7,11.6,12.7,13.7,16.0,16.3],\"text\":[\"01/24 00:00\",\"01/25 00:00\",\"01/26 00:00\",\"01/28 00:00\",\"01/29 00:00\",\"01/30 00:00\",\"01/31 00:00\",\"02/04 00:00\",\"02/06 00:00\"],\"name\":\"alcohol\",\"line\":{\"dash\":\"solid\",\"shape\":\"linear\"},\"marker\":{\"color\":\"#7f7f7f\"}},{\"x\":[604800.0,691200.0,777600.0,864000.0,950400.0,1036800.0,1123200.0,1209600.0,1296000.0,1382400.0,1468800.0,1641600.0,1728000.0,1814400.0,1900800.0,1987200.0],\"y\":[34.4,40.0,43.2,40.6,38.4,36.0,34.0,29.700000000000003,25.200000000000003,22.1,18.2,12.8,8.5,5.4,3.8000000000000003,-0.0],\"text\":[\"01/23 00:00\",\"01/24 00:00\",\"01/25 00:00\",\"01/26 00:00\",\"01/27 00:00\",\"01/28 00:00\",\"01/29 00:00\",\"01/30 00:00\",\"01/31 00:00\",\"02/01 00:00\",\"02/02 00:00\",\"02/04 00:00\",\"02/05 00:00\",\"02/06 00:00\",\"02/07 00:00\",\"02/08 00:00\"],\"name\":\"bmd\",\"line\":{\"dash\":\"solid\",\"shape\":\"linear\"},\"marker\":{\"color\":\"#bcbd22\"}}],\n",
|
26
|
+
" {\"xaxis\":{\"dtick\":86400,\"tickvals\":[0,86400,172800,259200,345600,432000,518400,604800,691200,777600,864000,950400,1036800,1123200,1209600,1296000,1382400,1468800,1555200,1641600,1728000,1814400,1900800,1987200,2073600],\"ticktext\":[\"soe\",\"odori\",\"odori\",\"naka\",\"tome\",2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22]},\"annotations\":[{\"x\":0.0,\"y\":14.8,\"xref\":\"x\",\"yref\":\"y\",\"text\":\"soe\",\"showarrow\":true,\"arrowhead\":1,\"ax\":0,\"ay\":-40},{\"x\":259200.0,\"y\":6.9,\"xref\":\"x\",\"yref\":\"y\",\"text\":\"naka\",\"showarrow\":true,\"arrowhead\":1,\"ax\":0,\"ay\":-40},{\"x\":345600.0,\"y\":7.5,\"xref\":\"x\",\"yref\":\"y\",\"text\":\"tome\",\"showarrow\":true,\"arrowhead\":1,\"ax\":0,\"ay\":-40}]},\n",
|
27
27
|
" {\"linkText\":\"Export to plot.ly\",\"showLink\":true}\n",
|
28
28
|
")\n",
|
29
29
|
"\n",
|
30
30
|
"window.addEventListener('resize', function() {\n",
|
31
|
-
" Plotly.Plots.resize(document.getElementById('
|
31
|
+
" Plotly.Plots.resize(document.getElementById('68768a62-2042-4fac-b085-3eb0f965f432'))\n",
|
32
32
|
"})\n",
|
33
33
|
" }) \n",
|
34
34
|
"</script>"
|
35
35
|
],
|
36
36
|
"text/plain": [
|
37
|
-
"#<Plotly::Offline::HTML:
|
37
|
+
"#<Plotly::Offline::HTML:0x00007fea1e95c440 @id=\"68768a62-2042-4fac-b085-3eb0f965f432\", @data=[{:x=>[0.0, 1.0, 86400.0, 172800.0, 259200.0, 259201.0, 345600.0, 345601.0, 432000.0, 518400.0, 604800.0, 691200.0, 777600.0, 864000.0, 950400.0, 1036800.0, 1123200.0, 1209600.0, 1296000.0, 1382400.0, 1468800.0, 1555200.0, 1641600.0, 1728000.0, 1814400.0, 1900800.0, 1987200.0, 2073600.0], :y=>[14.8, 11.0, 14.3, 11.3, 6.9, 10.6, 7.5, 8.0, 9.1, 10.4, 11.9, 12.3, 13.1, 13.1, 12.9, 12.8, 12.9, 12.6, 12.0, 11.2, 10.2, 9.7, 9.8, 9.1, 8.4, 8.1, 8.3, 8.1], :text=>[\"01/16 00:00\", \"01/16 00:00\", \"01/17 00:00\", \"01/18 00:00\", \"01/19 00:00\", \"01/19 00:00\", \"01/20 00:00\", \"01/20 00:00\", \"01/21 00:00\", \"01/22 00:00\", \"01/23 00:00\", \"01/24 00:00\", \"01/25 00:00\", \"01/26 00:00\", \"01/27 00:00\", \"01/28 00:00\", \"01/29 00:00\", \"01/30 00:00\", \"01/31 00:00\", \"02/01 00:00\", \"02/02 00:00\", \"02/03 00:00\", \"02/04 00:00\", \"02/05 00:00\", \"02/06 00:00\", \"02/07 00:00\", \"02/08 00:00\", \"02/09 00:00\"], :name=>\"temps\", :line=>{:dash=>:solid, :shape=>:linear}, :marker=>{:color=>\"#1f77b4\"}}, {:x=>[0.0, 86400.0, 172800.0, 259200.0, 345600.0, 432000.0, 518400.0, 604800.0, 691200.0, 777600.0, 864000.0, 950400.0, 1036800.0, 1123200.0, 1209600.0, 1296000.0, 1382400.0, 1468800.0, 1555200.0, 1641600.0, 1728000.0, 1814400.0, 1900800.0, 1987200.0, 2073600.0], :y=>[9, 9, 8.5, 9, 6, 7, 7, 8, 8, 7.5, 7.5, 7.5, 7.0, 8.0, 8.0, 7.0, 7.0, 6.5, 7.0, 8.0, 6.0, 5.0, 5.0, 7.0, 6.0], :text=>[\"01/16 00:00\", \"01/17 00:00\", \"01/18 00:00\", \"01/19 00:00\", \"01/20 00:00\", \"01/21 00:00\", \"01/22 00:00\", \"01/23 00:00\", \"01/24 00:00\", \"01/25 00:00\", \"01/26 00:00\", \"01/27 00:00\", \"01/28 00:00\", \"01/29 00:00\", \"01/30 00:00\", \"01/31 00:00\", \"02/01 00:00\", \"02/02 00:00\", \"02/03 00:00\", \"02/04 00:00\", \"02/05 00:00\", \"02/06 00:00\", \"02/07 00:00\", \"02/08 00:00\", \"02/09 00:00\"], :name=>\"room_temp\", :line=>{:dash=>:solid, :shape=>:linear}, :marker=>{:color=>\"#2ca02c\"}}, {:x=>[604800.0, 691200.0, 777600.0, 864000.0, 950400.0, 1036800.0, 1123200.0, 1209600.0, 1296000.0, 1382400.0, 1468800.0, 1641600.0, 1728000.0, 1814400.0, 1900800.0, 1987200.0], :y=>[8.6, 8.0, 7.2, 5.8, 4.8, 4.0, 3.4, 2.7, 2.1, 1.7000000000000002, 1.3, 0.8, 0.5, 0.30000000000000004, 0.2, -0.0], :text=>[\"01/23 00:00\", \"01/24 00:00\", \"01/25 00:00\", \"01/26 00:00\", \"01/27 00:00\", \"01/28 00:00\", \"01/29 00:00\", \"01/30 00:00\", \"01/31 00:00\", \"02/01 00:00\", \"02/02 00:00\", \"02/04 00:00\", \"02/05 00:00\", \"02/06 00:00\", \"02/07 00:00\", \"02/08 00:00\"], :name=>\"baume\", :line=>{:dash=>:solid, :shape=>:linear}, :marker=>{:color=>\"#9467bd\"}}, {:x=>[691200.0, 777600.0, 864000.0, 1036800.0, 1123200.0, 1209600.0, 1296000.0, 1641600.0, 1814400.0], :y=>[4.8, 6.75, 7.992, 10.7, 11.6, 12.7, 13.7, 16.0, 16.3], :text=>[\"01/24 00:00\", \"01/25 00:00\", \"01/26 00:00\", \"01/28 00:00\", \"01/29 00:00\", \"01/30 00:00\", \"01/31 00:00\", \"02/04 00:00\", \"02/06 00:00\"], :name=>\"alcohol\", :line=>{:dash=>:solid, :shape=>:linear}, :marker=>{:color=>\"#7f7f7f\"}}, {:x=>[604800.0, 691200.0, 777600.0, 864000.0, 950400.0, 1036800.0, 1123200.0, 1209600.0, 1296000.0, 1382400.0, 1468800.0, 1641600.0, 1728000.0, 1814400.0, 1900800.0, 1987200.0], :y=>[34.4, 40.0, 43.2, 40.6, 38.4, 36.0, 34.0, 29.700000000000003, 25.200000000000003, 22.1, 18.2, 12.8, 8.5, 5.4, 3.8000000000000003, -0.0], :text=>[\"01/23 00:00\", \"01/24 00:00\", \"01/25 00:00\", \"01/26 00:00\", \"01/27 00:00\", \"01/28 00:00\", \"01/29 00:00\", \"01/30 00:00\", \"01/31 00:00\", \"02/01 00:00\", \"02/02 00:00\", \"02/04 00:00\", \"02/05 00:00\", \"02/06 00:00\", \"02/07 00:00\", \"02/08 00:00\"], :name=>\"bmd\", :line=>{:dash=>:solid, :shape=>:linear}, :marker=>{:color=>\"#bcbd22\"}}], @layout={:xaxis=>{:dtick=>86400, :tickvals=>[0, 86400, 172800, 259200, 345600, 432000, 518400, 604800, 691200, 777600, 864000, 950400, 1036800, 1123200, 1209600, 1296000, 1382400, 1468800, 1555200, 1641600, 1728000, 1814400, 1900800, 1987200, 2073600], :ticktext=>[:soe, :odori, :odori, :naka, :tome, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22]}, :annotations=>[{:x=>0.0, :y=>14.8, :xref=>\"x\", :yref=>\"y\", :text=>:soe, :showarrow=>true, :arrowhead=>1, :ax=>0, :ay=>-40}, {:x=>259200.0, :y=>6.9, :xref=>\"x\", :yref=>\"y\", :text=>:naka, :showarrow=>true, :arrowhead=>1, :ax=>0, :ay=>-40}, {:x=>345600.0, :y=>7.5, :xref=>\"x\", :yref=>\"y\", :text=>:tome, :showarrow=>true, :arrowhead=>1, :ax=>0, :ay=>-40}]}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
|
38
38
|
]
|
39
39
|
},
|
40
40
|
"metadata": {},
|
@@ -49,25 +49,25 @@
|
|
49
49
|
" </script>\n",
|
50
50
|
"\n",
|
51
51
|
"\n",
|
52
|
-
"<div id=\"
|
52
|
+
"<div id=\"62eb1355-f7ef-43b0-969b-94606d571203\" style=\"height: 100%; width: 100%;\"></div>\n",
|
53
53
|
"\n",
|
54
54
|
"<script>\n",
|
55
55
|
" require(['plotly'], function(Plotly) { \n",
|
56
56
|
"Plotly.newPlot(\n",
|
57
|
-
" '
|
57
|
+
" '62eb1355-f7ef-43b0-969b-94606d571203',\n",
|
58
58
|
" [{\"type\":\"table\",\"header\":{\"values\":[\"day_label\",\"display_time\",\"mark\",\"temps\",\"room_temp\",\"display_baume\",\"alcohol\",\"bmd\"]},\"cells\":{\"values\":[[\"soe\",\"odori\",\"odori\",\"naka\",\"tome\",2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21],[\"01/16 00:00\",\"01/17 00:00\",\"01/18 00:00\",\"01/19 00:00\",\"01/20 00:00\",\"01/21 00:00\",\"01/22 00:00\",\"01/23 00:00\",\"01/24 00:00\",\"01/25 00:00\",\"01/26 00:00\",\"01/27 00:00\",\"01/28 00:00\",\"01/29 00:00\",\"01/30 00:00\",\"01/31 00:00\",\"02/01 00:00\",\"02/02 00:00\",\"02/03 00:00\",\"02/04 00:00\",\"02/05 00:00\",\"02/06 00:00\",\"02/07 00:00\",\"02/08 00:00\",\"02/09 00:00\"],[\"soe\",\"\",\"\",\"naka\",\"tome\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"],[\"14.8, 11.0\",\"14.3\",\"11.3\",\"6.9, 10.6\",\"7.5, 8.0\",\"9.1\",\"10.4\",\"11.9\",\"12.3\",\"13.1\",\"13.1\",\"12.9\",\"12.8\",\"12.9\",\"12.6\",\"12.0\",\"11.2\",\"10.2\",\"9.7\",\"9.8\",\"9.1\",\"8.4\",\"8.1\",\"8.3\",\"8.1\"],[9,9,8.5,9,6,7,7,8,8,7.5,7.5,7.5,7.0,8.0,8.0,7.0,7.0,6.5,7.0,8.0,6.0,5.0,5.0,7.0,6.0],[\"\",\"\",\"\",\"\",\"\",\"\",\"\",8.6,8.0,7.2,5.8,4.8,4.0,3.4,-27,-21,-17,-13,\"\",-8,-5,-3,-2,0,\"\"],[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",4.8,6.75,7.992,\"\",10.7,11.6,12.7,13.7,\"\",\"\",\"\",16.0,\"\",16.3,\"\",\"\",\"\"],[\"\",\"\",\"\",\"\",\"\",\"\",\"\",34.4,40.0,43.2,40.6,38.4,36.0,34.0,29.7,25.2,22.1,18.2,\"\",12.8,8.5,5.4,3.8,-0.0,\"\"]]}}],\n",
|
59
59
|
" {\"height\":710},\n",
|
60
60
|
" {\"linkText\":\"Export to plot.ly\",\"showLink\":true}\n",
|
61
61
|
")\n",
|
62
62
|
"\n",
|
63
63
|
"window.addEventListener('resize', function() {\n",
|
64
|
-
" Plotly.Plots.resize(document.getElementById('
|
64
|
+
" Plotly.Plots.resize(document.getElementById('62eb1355-f7ef-43b0-969b-94606d571203'))\n",
|
65
65
|
"})\n",
|
66
66
|
" }) \n",
|
67
67
|
"</script>"
|
68
68
|
],
|
69
69
|
"text/plain": [
|
70
|
-
"#<Plotly::Offline::HTML:
|
70
|
+
"#<Plotly::Offline::HTML:0x00007fea1ea7d090 @id=\"62eb1355-f7ef-43b0-969b-94606d571203\", @data=[{:type=>:table, :header=>{:values=>[:day_label, :display_time, :mark, :temps, :room_temp, :display_baume, :alcohol, :bmd]}, :cells=>{:values=>[[:soe, :odori, :odori, :naka, :tome, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21], [\"01/16 00:00\", \"01/17 00:00\", \"01/18 00:00\", \"01/19 00:00\", \"01/20 00:00\", \"01/21 00:00\", \"01/22 00:00\", \"01/23 00:00\", \"01/24 00:00\", \"01/25 00:00\", \"01/26 00:00\", \"01/27 00:00\", \"01/28 00:00\", \"01/29 00:00\", \"01/30 00:00\", \"01/31 00:00\", \"02/01 00:00\", \"02/02 00:00\", \"02/03 00:00\", \"02/04 00:00\", \"02/05 00:00\", \"02/06 00:00\", \"02/07 00:00\", \"02/08 00:00\", \"02/09 00:00\"], [:soe, \"\", \"\", :naka, :tome, \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\"], [\"14.8, 11.0\", \"14.3\", \"11.3\", \"6.9, 10.6\", \"7.5, 8.0\", \"9.1\", \"10.4\", \"11.9\", \"12.3\", \"13.1\", \"13.1\", \"12.9\", \"12.8\", \"12.9\", \"12.6\", \"12.0\", \"11.2\", \"10.2\", \"9.7\", \"9.8\", \"9.1\", \"8.4\", \"8.1\", \"8.3\", \"8.1\"], [9, 9, 8.5, 9, 6, 7, 7, 8, 8, 7.5, 7.5, 7.5, 7.0, 8.0, 8.0, 7.0, 7.0, 6.5, 7.0, 8.0, 6.0, 5.0, 5.0, 7.0, 6.0], [\"\", \"\", \"\", \"\", \"\", \"\", \"\", 8.6, 8.0, 7.2, 5.8, 4.8, 4.0, 3.4, -27, -21, -17, -13, \"\", -8, -5, -3, -2, 0, \"\"], [\"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", 4.8, 6.75, 7.992, \"\", 10.7, 11.6, 12.7, 13.7, \"\", \"\", \"\", 16.0, \"\", 16.3, \"\", \"\", \"\"], [\"\", \"\", \"\", \"\", \"\", \"\", \"\", 34.4, 40.0, 43.2, 40.6, 38.4, 36.0, 34.0, 29.7, 25.2, 22.1, 18.2, \"\", 12.8, 8.5, 5.4, 3.8, -0.0, \"\"]]}}], @layout={:height=>710}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
|
71
71
|
]
|
72
72
|
},
|
73
73
|
"metadata": {},
|
@@ -82,25 +82,25 @@
|
|
82
82
|
" </script>\n",
|
83
83
|
"\n",
|
84
84
|
"\n",
|
85
|
-
"<div id=\"
|
85
|
+
"<div id=\"09870b04-0de9-4c4d-b976-90119111b20d\" style=\"height: 100%; width: 100%;\"></div>\n",
|
86
86
|
"\n",
|
87
87
|
"<script>\n",
|
88
88
|
" require(['plotly'], function(Plotly) { \n",
|
89
89
|
"Plotly.newPlot(\n",
|
90
|
-
" '
|
90
|
+
" '09870b04-0de9-4c4d-b976-90119111b20d',\n",
|
91
91
|
" [{\"x\":[345600,432000,518400,604800,691200,777600,864000,950400,1036800,1123200,1209600,1382400,1468800,1555200,1641600,1728000],\"y\":[34.4,40.0,43.2,40.6,38.4,36.0,34.0,29.700000000000003,25.200000000000003,22.1,18.2,12.8,8.5,5.4,3.8000000000000003,-0.0],\"text\":[\"01/23 00:00\\u003cbr /\\u003emoromi day=4, be=8.6, bmd=34.4\",\"01/24 00:00\\u003cbr /\\u003emoromi day=5, be=8.0, bmd=40.0\",\"01/25 00:00\\u003cbr /\\u003emoromi day=6, be=7.2, bmd=43.2\",\"01/26 00:00\\u003cbr /\\u003emoromi day=7, be=5.8, bmd=40.6\",\"01/27 00:00\\u003cbr /\\u003emoromi day=8, be=4.8, bmd=38.4\",\"01/28 00:00\\u003cbr /\\u003emoromi day=9, be=4.0, bmd=36.0\",\"01/29 00:00\\u003cbr /\\u003emoromi day=10, be=3.4, bmd=34.0\",\"01/30 00:00\\u003cbr /\\u003emoromi day=11, be=2.7, bmd=29.700000000000003\",\"01/31 00:00\\u003cbr /\\u003emoromi day=12, be=2.1, bmd=25.200000000000003\",\"02/01 00:00\\u003cbr /\\u003emoromi day=13, be=1.7000000000000002, bmd=22.1\",\"02/02 00:00\\u003cbr /\\u003emoromi day=14, be=1.3, bmd=18.2\",\"02/04 00:00\\u003cbr /\\u003emoromi day=16, be=0.8, bmd=12.8\",\"02/05 00:00\\u003cbr /\\u003emoromi day=17, be=0.5, bmd=8.5\",\"02/06 00:00\\u003cbr /\\u003emoromi day=18, be=0.30000000000000004, bmd=5.4\",\"02/07 00:00\\u003cbr /\\u003emoromi day=19, be=0.2, bmd=3.8000000000000003\",\"02/08 00:00\\u003cbr /\\u003emoromi day=20, be=-0.0, bmd=-0.0\"],\"name\":\"actual\"}],\n",
|
92
92
|
" {\"xaxis\":{\"title\":\"Moromi day\",\"dtick\":86400,\"range\":[86400,1814400],\"tickvals\":[0,86400,172800,259200,345600,432000,518400,604800,691200,777600,864000,950400,1036800,1123200,1209600,1296000,1382400,1468800,1555200,1641600,1728000],\"ticktext\":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]},\"yaxis\":{\"title\":\"BMD\"}},\n",
|
93
93
|
" {\"linkText\":\"Export to plot.ly\",\"showLink\":true}\n",
|
94
94
|
")\n",
|
95
95
|
"\n",
|
96
96
|
"window.addEventListener('resize', function() {\n",
|
97
|
-
" Plotly.Plots.resize(document.getElementById('
|
97
|
+
" Plotly.Plots.resize(document.getElementById('09870b04-0de9-4c4d-b976-90119111b20d'))\n",
|
98
98
|
"})\n",
|
99
99
|
" }) \n",
|
100
100
|
"</script>"
|
101
101
|
],
|
102
102
|
"text/plain": [
|
103
|
-
"#<Plotly::Offline::HTML:
|
103
|
+
"#<Plotly::Offline::HTML:0x00007fea1eb32d28 @id=\"09870b04-0de9-4c4d-b976-90119111b20d\", @data=[{:x=>[345600, 432000, 518400, 604800, 691200, 777600, 864000, 950400, 1036800, 1123200, 1209600, 1382400, 1468800, 1555200, 1641600, 1728000], :y=>[34.4, 40.0, 43.2, 40.6, 38.4, 36.0, 34.0, 29.700000000000003, 25.200000000000003, 22.1, 18.2, 12.8, 8.5, 5.4, 3.8000000000000003, -0.0], :text=>[\"01/23 00:00<br />moromi day=4, be=8.6, bmd=34.4\", \"01/24 00:00<br />moromi day=5, be=8.0, bmd=40.0\", \"01/25 00:00<br />moromi day=6, be=7.2, bmd=43.2\", \"01/26 00:00<br />moromi day=7, be=5.8, bmd=40.6\", \"01/27 00:00<br />moromi day=8, be=4.8, bmd=38.4\", \"01/28 00:00<br />moromi day=9, be=4.0, bmd=36.0\", \"01/29 00:00<br />moromi day=10, be=3.4, bmd=34.0\", \"01/30 00:00<br />moromi day=11, be=2.7, bmd=29.700000000000003\", \"01/31 00:00<br />moromi day=12, be=2.1, bmd=25.200000000000003\", \"02/01 00:00<br />moromi day=13, be=1.7000000000000002, bmd=22.1\", \"02/02 00:00<br />moromi day=14, be=1.3, bmd=18.2\", \"02/04 00:00<br />moromi day=16, be=0.8, bmd=12.8\", \"02/05 00:00<br />moromi day=17, be=0.5, bmd=8.5\", \"02/06 00:00<br />moromi day=18, be=0.30000000000000004, bmd=5.4\", \"02/07 00:00<br />moromi day=19, be=0.2, bmd=3.8000000000000003\", \"02/08 00:00<br />moromi day=20, be=-0.0, bmd=-0.0\"], :name=>:actual}], @layout={:xaxis=>{:title=>\"Moromi day\", :dtick=>86400, :range=>[86400, 1814400], :tickvals=>[0, 86400, 172800, 259200, 345600, 432000, 518400, 604800, 691200, 777600, 864000, 950400, 1036800, 1123200, 1209600, 1296000, 1382400, 1468800, 1555200, 1641600, 1728000], :ticktext=>[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21]}, :yaxis=>{:title=>\"BMD\"}}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
|
104
104
|
]
|
105
105
|
},
|
106
106
|
"metadata": {},
|
@@ -115,25 +115,25 @@
|
|
115
115
|
" </script>\n",
|
116
116
|
"\n",
|
117
117
|
"\n",
|
118
|
-
"<div id=\"
|
118
|
+
"<div id=\"59c4d124-b9a8-4cfb-abaf-90ab13c12729\" style=\"height: 100%; width: 100%;\"></div>\n",
|
119
119
|
"\n",
|
120
120
|
"<script>\n",
|
121
121
|
" require(['plotly'], function(Plotly) { \n",
|
122
122
|
"Plotly.newPlot(\n",
|
123
|
-
" '
|
123
|
+
" '59c4d124-b9a8-4cfb-abaf-90ab13c12729',\n",
|
124
124
|
" [{\"x\":[4.8,6.75,7.992,10.7,11.6,12.7,13.7,16.0,16.3],\"y\":[8.0,7.2,5.8,4.0,3.4,2.7,2.1,0.8,0.30000000000000004],\"text\":[\"01/24 00:00\\u003cbr /\\u003ealc=4.8, be=8.0\",\"01/25 00:00\\u003cbr /\\u003ealc=6.75, be=7.2\",\"01/26 00:00\\u003cbr /\\u003ealc=7.992, be=5.8\",\"01/28 00:00\\u003cbr /\\u003ealc=10.7, be=4.0\",\"01/29 00:00\\u003cbr /\\u003ealc=11.6, be=3.4\",\"01/30 00:00\\u003cbr /\\u003ealc=12.7, be=2.7\",\"01/31 00:00\\u003cbr /\\u003ealc=13.7, be=2.1\",\"02/04 00:00\\u003cbr /\\u003ealc=16.0, be=0.8\",\"02/06 00:00\\u003cbr /\\u003ealc=16.3, be=0.30000000000000004\"],\"name\":\"actual\"},{\"x\":[16.05,4.049999999999999],\"y\":[0.0,8.0],\"name\":\"+3.0 16.5\"},{\"x\":[16.55,4.549999999999999],\"y\":[0.0,8.0],\"name\":\"+3.0 17.0\"},{\"x\":[16.5,4.5],\"y\":[0.0,8.0],\"name\":\"+0.0 16.5\"}],\n",
|
125
125
|
" {\"xaxis\":{\"title\":\"Alcohol\",\"dtick\":2,\"range\":[0,20]},\"yaxis\":{\"title\":\"Baume\",\"dtick\":1,\"range\":[0,10]}},\n",
|
126
126
|
" {\"linkText\":\"Export to plot.ly\",\"showLink\":true}\n",
|
127
127
|
")\n",
|
128
128
|
"\n",
|
129
129
|
"window.addEventListener('resize', function() {\n",
|
130
|
-
" Plotly.Plots.resize(document.getElementById('
|
130
|
+
" Plotly.Plots.resize(document.getElementById('59c4d124-b9a8-4cfb-abaf-90ab13c12729'))\n",
|
131
131
|
"})\n",
|
132
132
|
" }) \n",
|
133
133
|
"</script>"
|
134
134
|
],
|
135
135
|
"text/plain": [
|
136
|
-
"#<Plotly::Offline::HTML:
|
136
|
+
"#<Plotly::Offline::HTML:0x00007fea1d931ef8 @id=\"59c4d124-b9a8-4cfb-abaf-90ab13c12729\", @data=[{:x=>[4.8, 6.75, 7.992, 10.7, 11.6, 12.7, 13.7, 16.0, 16.3], :y=>[8.0, 7.2, 5.8, 4.0, 3.4, 2.7, 2.1, 0.8, 0.30000000000000004], :text=>[\"01/24 00:00<br />alc=4.8, be=8.0\", \"01/25 00:00<br />alc=6.75, be=7.2\", \"01/26 00:00<br />alc=7.992, be=5.8\", \"01/28 00:00<br />alc=10.7, be=4.0\", \"01/29 00:00<br />alc=11.6, be=3.4\", \"01/30 00:00<br />alc=12.7, be=2.7\", \"01/31 00:00<br />alc=13.7, be=2.1\", \"02/04 00:00<br />alc=16.0, be=0.8\", \"02/06 00:00<br />alc=16.3, be=0.30000000000000004\"], :name=>:actual}, {:x=>[16.05, 4.049999999999999], :y=>[0.0, 8.0], :name=>\"+3.0 16.5\"}, {:x=>[16.55, 4.549999999999999], :y=>[0.0, 8.0], :name=>\"+3.0 17.0\"}, {:x=>[16.5, 4.5], :y=>[0.0, 8.0], :name=>\"+0.0 16.5\"}], @layout={:xaxis=>{:title=>\"Alcohol\", :dtick=>2, :range=>[0, 20]}, :yaxis=>{:title=>\"Baume\", :dtick=>1, :range=>[0, 10]}}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
|
137
137
|
]
|
138
138
|
},
|
139
139
|
"metadata": {},
|
@@ -142,7 +142,7 @@
|
|
142
142
|
{
|
143
143
|
"data": {
|
144
144
|
"text/plain": [
|
145
|
-
"#<CZTop::Socket::PUB:
|
145
|
+
"#<CZTop::Socket::PUB:0x7fea21b02f90 last_endpoint=\"tcp://127.0.0.1:52973\">"
|
146
146
|
]
|
147
147
|
},
|
148
148
|
"execution_count": 1,
|
data/example/shubo.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
date_line: 0
|
2
2
|
records:
|
3
3
|
- elapsed_time: 0
|
4
|
-
mark: mizukoji
|
4
|
+
mark: :mizukoji
|
5
5
|
temps: 12.0
|
6
6
|
acid: 13.0
|
7
7
|
- elapsed_time: 3600
|
8
|
-
mark: shikomi
|
8
|
+
mark: :shikomi
|
9
9
|
temps: 20.0
|
10
10
|
acid: 13.0
|
11
11
|
- elapsed_time: 86400
|
12
|
-
mark: utase
|
12
|
+
mark: :utase
|
13
13
|
temps: 14.0
|
14
14
|
baume: 15.0
|
15
15
|
acid: 13.0
|
@@ -19,31 +19,31 @@ records:
|
|
19
19
|
- 11.0
|
20
20
|
baume: 16.0
|
21
21
|
acid: 13.0
|
22
|
-
warmings: daki
|
22
|
+
warmings: :daki
|
23
23
|
- elapsed_time: 259200
|
24
24
|
temps:
|
25
25
|
- 10.0
|
26
26
|
- 13.0
|
27
27
|
baume: 16.5
|
28
28
|
acid: 13.5
|
29
|
-
warmings: daki
|
29
|
+
warmings: :daki
|
30
30
|
- elapsed_time: 345600
|
31
31
|
temps:
|
32
32
|
- 12.0
|
33
33
|
- 15.0
|
34
34
|
baume: 17.0
|
35
35
|
acid: 13.5
|
36
|
-
warmings: daki
|
36
|
+
warmings: :daki
|
37
37
|
- elapsed_time: 432000
|
38
38
|
temps: 14.0
|
39
39
|
baume: 17.0
|
40
40
|
acid: 14.0
|
41
|
-
warmings: anka
|
41
|
+
warmings: :anka
|
42
42
|
- elapsed_time: 518400
|
43
43
|
temps: 20.0
|
44
44
|
baume: 17.0
|
45
45
|
acid: 14.5
|
46
|
-
warmings: anka
|
46
|
+
warmings: :anka
|
47
47
|
- elapsed_time: 604800
|
48
48
|
temps: 20.0
|
49
49
|
baume: 14.0
|
@@ -53,7 +53,7 @@ records:
|
|
53
53
|
baume: 12.0
|
54
54
|
acid: 16.0
|
55
55
|
- elapsed_time: 777600
|
56
|
-
mark: wake
|
56
|
+
mark: :wake
|
57
57
|
temps: 20.0
|
58
58
|
baume: 9.0
|
59
59
|
acid: 16.0
|
@@ -1,12 +1,11 @@
|
|
1
1
|
require 'toji'
|
2
2
|
require 'terminal-table'
|
3
3
|
|
4
|
-
STEP_NAMES = ["酒母", "初添", "仲添", "留添"].freeze
|
5
|
-
|
6
4
|
recipe = Toji::Recipe::ThreeStepMashing::TEMPLATES[:sokujo_nada].scale(900)
|
5
|
+
step_names = recipe.steps.map(&:name)
|
7
6
|
|
8
7
|
table = Terminal::Table.new do |t|
|
9
|
-
t << [""] +
|
8
|
+
t << [""] + step_names
|
10
9
|
t << :separator
|
11
10
|
t << ["[原料]"]
|
12
11
|
t << ["酵母(g)", recipe.yeast.yeast&.round(2)]
|
@@ -15,6 +14,7 @@ table = Terminal::Table.new do |t|
|
|
15
14
|
t << ["掛米(g)"] + recipe.steps.map(&:rice).map(&:raw).map{|v| v&.round(2)}
|
16
15
|
t << ["麹米(g)"] + recipe.steps.map(&:koji).map(&:raw).map{|v| v&.round(2)}
|
17
16
|
t << ["汲水(ml)"] + recipe.steps.map(&:water).map{|v| v&.round(2)}
|
17
|
+
t << ["醸造アルコール(ml)"] + recipe.steps.map(&:alcohol).map{|v| v&.round(2)}
|
18
18
|
t << :separator
|
19
19
|
t << ["[合計]"]
|
20
20
|
t << ["総米(g)"] + recipe.steps.map(&:rice_total).map{|v| v&.round(2)}
|
@@ -33,7 +33,7 @@ puts
|
|
33
33
|
|
34
34
|
puts "掛米"
|
35
35
|
table = Terminal::Table.new do |t|
|
36
|
-
t << ["工程", "原料"] +
|
36
|
+
t << ["工程", "原料"] + step_names
|
37
37
|
t << :separator
|
38
38
|
t << ["洗米・浸漬", "白米(g)"] + recipe.steps.map(&:rice).map(&:raw).map{|v| v&.round(2)}
|
39
39
|
t << ["", "吸水増加量(ml)"] + recipe.steps.map(&:rice).map(&:soaking_water).map{|v| v&.round(2)}
|
@@ -48,7 +48,7 @@ puts
|
|
48
48
|
|
49
49
|
puts "麹"
|
50
50
|
table = Terminal::Table.new do |t|
|
51
|
-
t << ["工程", "原料"] +
|
51
|
+
t << ["工程", "原料"] + step_names
|
52
52
|
t << :separator
|
53
53
|
t << ["洗米・浸漬", "白米(g)"] + recipe.steps.map(&:koji).map(&:raw).map{|v| v&.round(2)}
|
54
54
|
t << ["", "吸水増加量(ml)"] + recipe.steps.map(&:koji).map(&:soaking_water).map{|v| v&.round(2)}
|
data/lib/toji/brew/base.rb
CHANGED
@@ -31,6 +31,7 @@ module Toji
|
|
31
31
|
].freeze
|
32
32
|
|
33
33
|
attr_reader :day_offset
|
34
|
+
attr_reader :min_time
|
34
35
|
|
35
36
|
def initialize(records, date_line)
|
36
37
|
@date_line = date_line
|
@@ -39,7 +40,7 @@ module Toji
|
|
39
40
|
|
40
41
|
def records=(records)
|
41
42
|
records = records.map{|r| StateRecord.create(r)}
|
42
|
-
min_time = records.
|
43
|
+
min_time = records.map(&:time).compact.sort.first
|
43
44
|
@states = records.map{|r| State.new(r.elapsed_time, r, self)}
|
44
45
|
|
45
46
|
# time
|
@@ -54,6 +55,7 @@ module Toji
|
|
54
55
|
end
|
55
56
|
}
|
56
57
|
end
|
58
|
+
@min_time = @states.first&.time
|
57
59
|
|
58
60
|
@states = @states.sort{|a,b| a.elapsed_time<=>b.elapsed_time}
|
59
61
|
|
@@ -63,7 +65,7 @@ module Toji
|
|
63
65
|
if t
|
64
66
|
@day_offset = t - Time.mktime(t.year, t.month, t.day)
|
65
67
|
end
|
66
|
-
@day_offset
|
68
|
+
@day_offset = (((24 - @date_line) * HOUR) + @day_offset) % DAY
|
67
69
|
|
68
70
|
# mark hash
|
69
71
|
@hash = {}
|
data/lib/toji/brew/graph.rb
CHANGED
@@ -0,0 +1,200 @@
|
|
1
|
+
module Toji
|
2
|
+
module Brew
|
3
|
+
module Graph
|
4
|
+
class MultiProgress
|
5
|
+
|
6
|
+
LINE_DASHES = [
|
7
|
+
:solid,
|
8
|
+
:dot,
|
9
|
+
:dashdot,
|
10
|
+
].freeze
|
11
|
+
|
12
|
+
def initialize
|
13
|
+
@progresses = []
|
14
|
+
end
|
15
|
+
|
16
|
+
def <<(source, name=nil, dash: nil, enable_annotations: true)
|
17
|
+
if !dash
|
18
|
+
dash = LINE_DASHES[@progresses.length % LINE_DASHES.length]
|
19
|
+
end
|
20
|
+
|
21
|
+
if !name
|
22
|
+
name = "Progress #{@progresses.length}"
|
23
|
+
end
|
24
|
+
|
25
|
+
case source
|
26
|
+
when Progress
|
27
|
+
progress = source.dup
|
28
|
+
progress.name = name
|
29
|
+
progress.dash = dash
|
30
|
+
progress.enable_annotations = enable_annotations
|
31
|
+
when Base
|
32
|
+
progress = source.progress(name: name, dash: dash, enable_annotations: enable_annotations)
|
33
|
+
else
|
34
|
+
raise Error, "ArgumentError: Progress or Base required"
|
35
|
+
end
|
36
|
+
|
37
|
+
@progresses << progress
|
38
|
+
self
|
39
|
+
end
|
40
|
+
alias_method :add, :<<
|
41
|
+
|
42
|
+
def plot_data(keys=nil)
|
43
|
+
use_name = 2<=@progresses.length
|
44
|
+
|
45
|
+
@progresses.map {|progress|
|
46
|
+
progress.plot_data(keys, use_name)
|
47
|
+
}.inject([], :+)
|
48
|
+
end
|
49
|
+
|
50
|
+
def annotations
|
51
|
+
use_name = 2<=@progresses.length
|
52
|
+
|
53
|
+
@progresses.map {|progress|
|
54
|
+
progress.annotations
|
55
|
+
}.inject([], :+)
|
56
|
+
end
|
57
|
+
|
58
|
+
def plot(keys=nil)
|
59
|
+
brews = @progresses.map(&:brew)
|
60
|
+
max_brew_days = brews.map(&:days).max
|
61
|
+
index = brews.index{|brew| brew.days==max_brew_days}
|
62
|
+
day_labels = brews[index].day_labels
|
63
|
+
|
64
|
+
Plotly::Plot.new(
|
65
|
+
data: plot_data(keys),
|
66
|
+
layout: {
|
67
|
+
xaxis: {
|
68
|
+
dtick: DAY,
|
69
|
+
tickvals: max_brew_days.times.map{|d| d*DAY},
|
70
|
+
ticktext: day_labels
|
71
|
+
},
|
72
|
+
annotations: annotations,
|
73
|
+
}
|
74
|
+
)
|
75
|
+
end
|
76
|
+
|
77
|
+
def state_group_order(group_by)
|
78
|
+
result = {}
|
79
|
+
|
80
|
+
@progresses.map{|progress|
|
81
|
+
progress.state_group_by(group_by)
|
82
|
+
}.map{|group|
|
83
|
+
group.map{|key,states|
|
84
|
+
[key, states.first.elapsed_time_with_offset]
|
85
|
+
}.to_h
|
86
|
+
}.each {|group|
|
87
|
+
result.merge!(group) {|key,self_val,other_val|
|
88
|
+
[self_val, other_val].min
|
89
|
+
}
|
90
|
+
}
|
91
|
+
|
92
|
+
result.sort_by(&:last).map(&:first)
|
93
|
+
end
|
94
|
+
|
95
|
+
def state_group_count(group_by)
|
96
|
+
result = {}
|
97
|
+
|
98
|
+
@progresses.map{|progress|
|
99
|
+
progress.state_group_count(group_by)
|
100
|
+
}.each {|group|
|
101
|
+
result.merge!(group) {|key,self_val,other_val|
|
102
|
+
[self_val, other_val].max
|
103
|
+
}
|
104
|
+
}
|
105
|
+
|
106
|
+
state_group_order(group_by).map {|val|
|
107
|
+
[val, result[val]]
|
108
|
+
}.to_h
|
109
|
+
end
|
110
|
+
|
111
|
+
def table_data(group_by=nil, keys=nil)
|
112
|
+
case group_by
|
113
|
+
when :elapsed_time, :elapsed_time_with_offset, nil
|
114
|
+
table_data_group_by_elapsed_time(keys)
|
115
|
+
else
|
116
|
+
table_data_group_by(group_by, keys)
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
def table_data_group_by(group_by, keys=nil)
|
121
|
+
header = []
|
122
|
+
cells = []
|
123
|
+
|
124
|
+
group_count = state_group_count(group_by)
|
125
|
+
|
126
|
+
header << ["", group_by]
|
127
|
+
cells << group_count.inject([]) {|result,(group,num)|
|
128
|
+
if 0<num
|
129
|
+
result << group
|
130
|
+
(num-1).times {
|
131
|
+
result << ""
|
132
|
+
}
|
133
|
+
end
|
134
|
+
result
|
135
|
+
}
|
136
|
+
|
137
|
+
@progresses.each {|progress|
|
138
|
+
data = progress.table_data(keys, group_by, group_count)
|
139
|
+
header += data[:header].map.with_index{|h,i|
|
140
|
+
name = i==0 ? progress.name : ""
|
141
|
+
[name, h]
|
142
|
+
}
|
143
|
+
cells += data[:cells]
|
144
|
+
}
|
145
|
+
|
146
|
+
{header: header, cells: cells}
|
147
|
+
end
|
148
|
+
|
149
|
+
def table_data_group_by_elapsed_time(keys=nil, date_format="%m/%d %H:%M")
|
150
|
+
header = []
|
151
|
+
cells = []
|
152
|
+
|
153
|
+
elapsed_times = state_group_count(:elapsed_time_with_offset)
|
154
|
+
|
155
|
+
header << ["", :elapsed_time]
|
156
|
+
utc_offset = Time.at(0).utc_offset
|
157
|
+
|
158
|
+
cells << elapsed_times.inject([]) {|result,(elapsed_time,num)|
|
159
|
+
if 0<num
|
160
|
+
result << Time.at(elapsed_time - utc_offset).strftime(date_format)
|
161
|
+
(num-1).times {
|
162
|
+
result << ""
|
163
|
+
}
|
164
|
+
end
|
165
|
+
result
|
166
|
+
}
|
167
|
+
|
168
|
+
@progresses.each {|progress|
|
169
|
+
data = progress.table_data(keys, :elapsed_time_with_offset, elapsed_times)
|
170
|
+
header += data[:header].map.with_index{|h,i|
|
171
|
+
name = i==0 ? progress.name : ""
|
172
|
+
[name, h]
|
173
|
+
}
|
174
|
+
cells += data[:cells]
|
175
|
+
}
|
176
|
+
|
177
|
+
{header: header, cells: cells}
|
178
|
+
end
|
179
|
+
|
180
|
+
def table(group_by=nil, keys=nil)
|
181
|
+
data = table_data(group_by, keys)
|
182
|
+
|
183
|
+
Plotly::Plot.new(
|
184
|
+
data: [{
|
185
|
+
type: :table,
|
186
|
+
header: {
|
187
|
+
values: data[:header]
|
188
|
+
},
|
189
|
+
cells: {
|
190
|
+
values: data[:cells]
|
191
|
+
},
|
192
|
+
}],
|
193
|
+
layout: {
|
194
|
+
}
|
195
|
+
)
|
196
|
+
end
|
197
|
+
end
|
198
|
+
end
|
199
|
+
end
|
200
|
+
end
|
@@ -3,27 +3,60 @@ module Toji
|
|
3
3
|
module Graph
|
4
4
|
class Progress
|
5
5
|
|
6
|
+
PLOT_KEYS = [:temps, :preset_temp, :room_temp, :room_psychrometry, :baume, :acid, :amino_acid, :alcohol, :bmd].freeze
|
7
|
+
|
8
|
+
COLORS = [
|
9
|
+
'#1f77b4', # muted blue
|
10
|
+
'#ff7f0e', # safety orange
|
11
|
+
'#2ca02c', # cooked asparagus green
|
12
|
+
'#d62728', # brick red
|
13
|
+
'#9467bd', # muted purple
|
14
|
+
'#8c564b', # chestnut brown
|
15
|
+
'#e377c2', # raspberry yogurt pink
|
16
|
+
'#7f7f7f', # middle gray
|
17
|
+
'#bcbd22', # curry yellow-green
|
18
|
+
'#17becf' # blue-teal
|
19
|
+
].freeze
|
20
|
+
|
21
|
+
PLOT_COLORS = Hash[PLOT_KEYS.zip(COLORS)].freeze
|
22
|
+
|
23
|
+
LINE_DASHES = [
|
24
|
+
:solid,
|
25
|
+
:dot,
|
26
|
+
:dashdot,
|
27
|
+
].freeze
|
28
|
+
|
29
|
+
attr_reader :brew
|
30
|
+
attr_accessor :name
|
31
|
+
attr_accessor :dash
|
6
32
|
attr_accessor :enable_annotations
|
7
33
|
|
8
|
-
def initialize(
|
9
|
-
@
|
34
|
+
def initialize(brew, name: nil, dash: :solid, enable_annotations: true)
|
35
|
+
@brew = brew
|
36
|
+
@name = name
|
37
|
+
@dash = dash
|
10
38
|
@enable_annotations = enable_annotations
|
11
39
|
end
|
12
40
|
|
13
|
-
def plot_data(keys=nil)
|
41
|
+
def plot_data(keys=nil, use_name=false)
|
14
42
|
if !keys
|
15
|
-
keys = @
|
43
|
+
keys = @brew.has_keys
|
44
|
+
end
|
45
|
+
|
46
|
+
name = ""
|
47
|
+
if @name
|
48
|
+
name = "#{@name} "
|
16
49
|
end
|
17
50
|
|
18
51
|
result = []
|
19
52
|
|
20
|
-
keys &=
|
53
|
+
keys &= PLOT_KEYS
|
21
54
|
|
22
55
|
keys.each {|key|
|
23
56
|
xs = []
|
24
57
|
ys = []
|
25
58
|
text = []
|
26
|
-
@
|
59
|
+
@brew.each {|r|
|
27
60
|
val = r.send(key)
|
28
61
|
if val
|
29
62
|
[val].flatten.each_with_index {|v,i|
|
@@ -39,10 +72,10 @@ module Toji
|
|
39
72
|
line_shape = :hv
|
40
73
|
end
|
41
74
|
|
42
|
-
result << {x: xs, y: ys, text: text, name: key, line: {shape: line_shape}}
|
75
|
+
result << {x: xs, y: ys, text: text, name: "#{name}#{key}", line: {dash: @dash, shape: line_shape}, marker: {color: PLOT_COLORS[key]}}
|
43
76
|
}
|
44
77
|
|
45
|
-
if 0<@
|
78
|
+
if 0<@brew.states.length && 0<@brew.day_offset
|
46
79
|
result = result.map{|h|
|
47
80
|
h[:x].unshift(0)
|
48
81
|
h[:y].unshift(nil)
|
@@ -51,8 +84,8 @@ module Toji
|
|
51
84
|
}
|
52
85
|
end
|
53
86
|
|
54
|
-
#if 0<@
|
55
|
-
# t = @
|
87
|
+
#if 0<@brew.states.length && @brew.states.last.time.strftime("%T")!="00:00:00"
|
88
|
+
# t = @brew.states.last.elapsed_time_with_offset
|
56
89
|
# t -= (t % DAY) - DAY
|
57
90
|
#
|
58
91
|
# result = result.map{|h|
|
@@ -67,7 +100,9 @@ module Toji
|
|
67
100
|
end
|
68
101
|
|
69
102
|
def annotations
|
70
|
-
|
103
|
+
return [] if @enable_annotations
|
104
|
+
|
105
|
+
@brew.select{|s| s.mark}.map {|s|
|
71
106
|
{
|
72
107
|
x: s.elapsed_time_with_offset,
|
73
108
|
y: s.temps.first || 0,
|
@@ -82,9 +117,30 @@ module Toji
|
|
82
117
|
}
|
83
118
|
end
|
84
119
|
|
85
|
-
def
|
120
|
+
def state_group_by(group_by)
|
121
|
+
group = {}
|
122
|
+
prev = nil
|
123
|
+
|
124
|
+
@brew.each {|state|
|
125
|
+
val = state.send(group_by) || prev
|
126
|
+
prev = val
|
127
|
+
|
128
|
+
group[val] ||= []
|
129
|
+
group[val] << state
|
130
|
+
}
|
131
|
+
|
132
|
+
group
|
133
|
+
end
|
134
|
+
|
135
|
+
def state_group_count(group_by)
|
136
|
+
state_group_by(group_by).map{|val,states|
|
137
|
+
[val, states.length]
|
138
|
+
}.to_h
|
139
|
+
end
|
140
|
+
|
141
|
+
def table_data(keys=nil, group_by=nil, group_count=nil)
|
86
142
|
if !keys
|
87
|
-
keys = @
|
143
|
+
keys = @brew.has_keys
|
88
144
|
keys.delete(:elapsed_time)
|
89
145
|
keys.delete(:time)
|
90
146
|
keys.delete(:day)
|
@@ -92,21 +148,36 @@ module Toji
|
|
92
148
|
keys.delete(:baume)
|
93
149
|
keys.delete(:nihonshudo)
|
94
150
|
else
|
95
|
-
keys &= @
|
151
|
+
keys &= @brew.has_keys
|
96
152
|
end
|
97
153
|
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
154
|
+
if group_by && group_count
|
155
|
+
brew_hash = state_group_by(group_by)
|
156
|
+
else
|
157
|
+
group_count = state_group_count(:itself)
|
158
|
+
brew_hash = state_group_by(:itself)
|
159
|
+
end
|
160
|
+
|
161
|
+
cells = []
|
162
|
+
group_count.each {|group_value,num|
|
163
|
+
states = brew_hash[group_value] || []
|
164
|
+
num ||= states.length
|
165
|
+
|
166
|
+
num.times {|i|
|
167
|
+
state = states[i]
|
168
|
+
|
169
|
+
cells << keys.map {|k|
|
170
|
+
v = state&.send(k)
|
171
|
+
if Array===v
|
172
|
+
v.map(&:to_s).join(", ")
|
173
|
+
elsif Float===v
|
174
|
+
v.round(3)
|
175
|
+
elsif v
|
176
|
+
v
|
177
|
+
else
|
178
|
+
""
|
179
|
+
end
|
180
|
+
}
|
110
181
|
}
|
111
182
|
}
|
112
183
|
|
@@ -119,10 +190,10 @@ module Toji
|
|
119
190
|
layout: {
|
120
191
|
xaxis: {
|
121
192
|
dtick: DAY,
|
122
|
-
tickvals: @
|
123
|
-
ticktext: @
|
193
|
+
tickvals: @brew.days.times.map{|d| d*DAY},
|
194
|
+
ticktext: @brew.day_labels
|
124
195
|
},
|
125
|
-
annotations:
|
196
|
+
annotations: annotations,
|
126
197
|
}
|
127
198
|
)
|
128
199
|
end
|
data/lib/toji/brew/koji.rb
CHANGED
@@ -12,8 +12,8 @@ module Toji
|
|
12
12
|
state_reader :dekoji
|
13
13
|
|
14
14
|
|
15
|
-
def progress(enable_annotations: true)
|
16
|
-
Graph::Progress.new(self, enable_annotations: enable_annotations)
|
15
|
+
def progress(name: nil, dash: :solid, enable_annotations: true)
|
16
|
+
Graph::Progress.new(self, name: name, dash: dash, enable_annotations: enable_annotations)
|
17
17
|
end
|
18
18
|
end
|
19
19
|
end
|
data/lib/toji/brew/moromi.rb
CHANGED
@@ -61,8 +61,8 @@ module Toji
|
|
61
61
|
end
|
62
62
|
end
|
63
63
|
|
64
|
-
def progress(enable_annotations: true)
|
65
|
-
Graph::Progress.new(self, enable_annotations: enable_annotations)
|
64
|
+
def progress(name: nil, dash: :solid, enable_annotations: true)
|
65
|
+
Graph::Progress.new(self, name: name, dash: dash, enable_annotations: enable_annotations)
|
66
66
|
end
|
67
67
|
|
68
68
|
def bmd
|
data/lib/toji/brew/shubo.rb
CHANGED
@@ -7,8 +7,8 @@ module Toji
|
|
7
7
|
state_reader :utase
|
8
8
|
state_reader :wake
|
9
9
|
|
10
|
-
def progress(enable_annotations: true)
|
11
|
-
Graph::Progress.new(self, enable_annotations: enable_annotations)
|
10
|
+
def progress(name: nil, dash: :solid, enable_annotations: true)
|
11
|
+
Graph::Progress.new(self, name: name, dash: dash, enable_annotations: enable_annotations)
|
12
12
|
end
|
13
13
|
end
|
14
14
|
end
|
data/lib/toji/brew/state.rb
CHANGED
@@ -69,6 +69,9 @@ module Toji
|
|
69
69
|
def display_time(format="%m/%d %H:%M")
|
70
70
|
if @time
|
71
71
|
@time.strftime(format)
|
72
|
+
elsif @brew.min_time
|
73
|
+
time = @brew.min_time + @elapsed_time
|
74
|
+
time.strftime(format)
|
72
75
|
else
|
73
76
|
utc_offset = Time.at(0).utc_offset
|
74
77
|
Time.at(@elapsed_time - utc_offset).strftime(format)
|
data/lib/toji/recipe/step.rb
CHANGED
@@ -33,7 +33,8 @@ module Toji
|
|
33
33
|
# なお、留め仕込みまでの麹歩合が20%を下回ると蒸米の溶解糖化に影響が出るので注意がいる
|
34
34
|
# 出典: 酒造教本 P95
|
35
35
|
def koji_rate
|
36
|
-
@koji.raw / rice_total
|
36
|
+
ret = @koji.raw / rice_total
|
37
|
+
ret.nan? ? 0.0 : ret
|
37
38
|
end
|
38
39
|
|
39
40
|
# 汲水歩合
|
@@ -46,7 +47,8 @@ module Toji
|
|
46
47
|
#
|
47
48
|
# 出典: 酒造教本 P96
|
48
49
|
def water_rate
|
49
|
-
@water / rice_total
|
50
|
+
ret = @water / rice_total
|
51
|
+
ret.nan? ? 0.0 : ret
|
50
52
|
end
|
51
53
|
|
52
54
|
def round(ndigit=0, acid_ndigit=nil, half: :up)
|
data/lib/toji/version.rb
CHANGED
data/toji.gemspec
CHANGED
@@ -31,6 +31,6 @@ Gem::Specification.new do |spec|
|
|
31
31
|
spec.add_dependency "rbplotly", ">= 0.1.2"
|
32
32
|
|
33
33
|
spec.add_development_dependency "bundler", "~> 2.0"
|
34
|
-
spec.add_development_dependency "rake", "
|
34
|
+
spec.add_development_dependency "rake", ">= 12.3.3"
|
35
35
|
spec.add_development_dependency "minitest", "~> 5.0"
|
36
36
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: toji
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yoshida Tetsuya
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-05-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -70,16 +70,16 @@ dependencies:
|
|
70
70
|
name: rake
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 12.3.3
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: 12.3.3
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: minitest
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -112,6 +112,7 @@ files:
|
|
112
112
|
- example/koji_making.ipynb
|
113
113
|
- example/koji_making.rb
|
114
114
|
- example/koji_making.yaml
|
115
|
+
- example/koji_making_multi.ipynb
|
115
116
|
- example/koji_recipe.rb
|
116
117
|
- example/moromi.ipynb
|
117
118
|
- example/moromi.rb
|
@@ -131,6 +132,7 @@ files:
|
|
131
132
|
- lib/toji/brew/graph.rb
|
132
133
|
- lib/toji/brew/graph/ab.rb
|
133
134
|
- lib/toji/brew/graph/bmd.rb
|
135
|
+
- lib/toji/brew/graph/multi_progress.rb
|
134
136
|
- lib/toji/brew/graph/progress.rb
|
135
137
|
- lib/toji/brew/koji.rb
|
136
138
|
- lib/toji/brew/moromi.rb
|
@@ -192,7 +194,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
192
194
|
- !ruby/object:Gem::Version
|
193
195
|
version: '0'
|
194
196
|
requirements: []
|
195
|
-
rubygems_version: 3.
|
197
|
+
rubygems_version: 3.1.2
|
196
198
|
signing_key:
|
197
199
|
specification_version: 4
|
198
200
|
summary: Management tools for brewing japanese sake.
|