toji 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/example/koji_making.ipynb +7 -7
  3. data/example/koji_making.rb +5 -5
  4. data/example/koji_recipe.rb +1 -1
  5. data/example/moromi.ipynb +55 -21
  6. data/example/moromi.rb +5 -5
  7. data/example/rice_recipe.rb +2 -2
  8. data/example/shubo.ipynb +6 -6
  9. data/example/shubo.rb +5 -5
  10. data/example/three_step_mashing_recipe.rb +2 -2
  11. data/lib/toji/brew/base.rb +88 -0
  12. data/lib/toji/brew/builder.rb +27 -0
  13. data/lib/toji/brew/graph/ab.rb +85 -0
  14. data/lib/toji/brew/graph/bmd.rb +58 -0
  15. data/lib/toji/brew/graph/progress.rb +142 -0
  16. data/lib/toji/brew/graph.rb +10 -0
  17. data/lib/toji/{product/koji_making.rb → brew/koji.rb} +35 -43
  18. data/lib/toji/{product → brew}/moromi.rb +105 -96
  19. data/lib/toji/brew/shubo.rb +122 -0
  20. data/lib/toji/brew/state.rb +117 -0
  21. data/lib/toji/{product/job_accessor.rb → brew/state_accessor.rb} +4 -4
  22. data/lib/toji/brew/state_record.rb +82 -0
  23. data/lib/toji/brew.rb +21 -0
  24. data/lib/toji/recipe/ingredient/koji/actual.rb +23 -0
  25. data/lib/toji/recipe/ingredient/koji/actual_fermentable.rb +17 -0
  26. data/lib/toji/recipe/ingredient/koji/base.rb +28 -0
  27. data/lib/toji/recipe/ingredient/koji/expected.rb +53 -0
  28. data/lib/toji/recipe/ingredient/koji/expected_fermentable.rb +17 -0
  29. data/lib/toji/recipe/ingredient/koji.rb +21 -0
  30. data/lib/toji/recipe/ingredient/lactic_acid.rb +21 -0
  31. data/lib/toji/recipe/ingredient/rice/actual.rb +20 -0
  32. data/lib/toji/recipe/ingredient/rice/actual_steamable.rb +29 -0
  33. data/lib/toji/recipe/ingredient/rice/base.rb +42 -0
  34. data/lib/toji/recipe/ingredient/rice/expected.rb +48 -0
  35. data/lib/toji/recipe/ingredient/rice/expected_steamable.rb +31 -0
  36. data/lib/toji/recipe/ingredient/rice.rb +21 -0
  37. data/lib/toji/recipe/ingredient/yeast.rb +21 -0
  38. data/lib/toji/recipe/ingredient.rb +11 -0
  39. data/lib/toji/recipe/lactic_acid_rate.rb +17 -0
  40. data/lib/toji/recipe/three_step_mashing.rb +4 -2
  41. data/lib/toji/recipe/yeast_rate.rb +41 -0
  42. data/lib/toji/recipe.rb +3 -0
  43. data/lib/toji/version.rb +1 -1
  44. data/lib/toji.rb +1 -3
  45. metadata +32 -29
  46. data/lib/toji/graph/ab.rb +0 -79
  47. data/lib/toji/graph/bmd.rb +0 -56
  48. data/lib/toji/graph/progress.rb +0 -87
  49. data/lib/toji/graph.rb +0 -8
  50. data/lib/toji/ingredient/koji/actual.rb +0 -21
  51. data/lib/toji/ingredient/koji/actual_fermentable.rb +0 -15
  52. data/lib/toji/ingredient/koji/base.rb +0 -26
  53. data/lib/toji/ingredient/koji/expected.rb +0 -51
  54. data/lib/toji/ingredient/koji/expected_fermentable.rb +0 -15
  55. data/lib/toji/ingredient/koji.rb +0 -19
  56. data/lib/toji/ingredient/rice/actual.rb +0 -18
  57. data/lib/toji/ingredient/rice/actual_steamable.rb +0 -27
  58. data/lib/toji/ingredient/rice/base.rb +0 -40
  59. data/lib/toji/ingredient/rice/expected.rb +0 -46
  60. data/lib/toji/ingredient/rice/expected_steamable.rb +0 -29
  61. data/lib/toji/ingredient/rice.rb +0 -19
  62. data/lib/toji/ingredient/yeast/base.rb +0 -21
  63. data/lib/toji/ingredient/yeast/red_star.rb +0 -30
  64. data/lib/toji/ingredient/yeast.rb +0 -9
  65. data/lib/toji/ingredient.rb +0 -8
  66. data/lib/toji/product/base.rb +0 -74
  67. data/lib/toji/product/job.rb +0 -176
  68. data/lib/toji/product/shubo.rb +0 -130
  69. data/lib/toji/product.rb +0 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 49e614ba76556c1a4bca653e4653f683aad26d13b44ca2e2fcd112671c556104
4
- data.tar.gz: 7eb635c7a7f566e85b1144c63ddb725b8bb7d103482efd7b73dd79ae6ab6fbb7
3
+ metadata.gz: cf143c7bfd6130351acfed9aef179dd3175b61a63dd35cad3b47dbc147e2ff2b
4
+ data.tar.gz: c7ca12d831bc4c5c60378a64c4474f6ec42c557af2edeafcd010f17b39b59659
5
5
  SHA512:
6
- metadata.gz: 0e375faf007e1eb65146a575321b82ced96b917399cec703e96d0c563a27c9af4ffffc18d5cbfd3e792ff6b31c72ab3077c0d0924124e6f3842c449c742339b5
7
- data.tar.gz: c43f3becbb5e7e45bb25a3da75c478911aea408c0003a19bbfa4ed09552269bfd4df0a807f3d86b34496bde2ea0a083dce33520320bd31227316bde7baaf4e0e
6
+ metadata.gz: 000b389871a9353492a48542746b48655cd5bcaf6a96afddc9063d01d1a97fd8da9c19434d4d1565450b210206e14d200bd64b0fc52e0a0799011dd69cce3bc3
7
+ data.tar.gz: 80c81e225f20e9eda0a383e74c4188d7787bad476ab4de697a1fff3bfebb4a4f4a0699ad3c13b57c11993b6d0b965246f902acd3ffd7e7bd6229e76db20ce62c
@@ -14,25 +14,25 @@
14
14
  " </script>\n",
15
15
  "\n",
16
16
  "\n",
17
- "<div id=\"fbd8af84-03f9-4489-ba76-90ddd95508fc\" style=\"height: 100%; width: 100%;\"></div>\n",
17
+ "<div id=\"3856c612-90ef-46ed-8975-15359315c82a\" 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
- " 'fbd8af84-03f9-4489-ba76-90ddd95508fc',\n",
22
+ " '3856c612-90ef-46ed-8975-15359315c82a',\n",
23
23
  " [{\"x\":[0,3600,32400,32401,75600,75601,104400,104401,126000,126001,140400,158400],\"y\":[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\":[\"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,3600,32400,75600,104400,126000,140400,158400],\"y\":[28.0,28.0,28.0,28.0,28.0,28.0,28.0,28.0],\"text\":[\"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\":[75600,104400,126000,140400,158400],\"y\":[4,4,5,5,5],\"text\":[\"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\":[{\"x\":0,\"y\":35.0,\"xref\":\"x\",\"yref\":\"y\",\"text\":\"hikikomi\",\"showarrow\":true,\"arrowhead\":1,\"ax\":0,\"ay\":-40},{\"x\":3600,\"y\":32.0,\"xref\":\"x\",\"yref\":\"y\",\"text\":\"tokomomi\",\"showarrow\":true,\"arrowhead\":1,\"ax\":0,\"ay\":-40},{\"x\":32400,\"y\":32.0,\"xref\":\"x\",\"yref\":\"y\",\"text\":\"kirikaeshi\",\"showarrow\":true,\"arrowhead\":1,\"ax\":0,\"ay\":-40},{\"x\":75600,\"y\":35.0,\"xref\":\"x\",\"yref\":\"y\",\"text\":\"mori\",\"showarrow\":true,\"arrowhead\":1,\"ax\":0,\"ay\":-40},{\"x\":104400,\"y\":37.0,\"xref\":\"x\",\"yref\":\"y\",\"text\":\"naka_shigoto\",\"showarrow\":true,\"arrowhead\":1,\"ax\":0,\"ay\":-40},{\"x\":126000,\"y\":38.0,\"xref\":\"x\",\"yref\":\"y\",\"text\":\"shimai_shigoto\",\"showarrow\":true,\"arrowhead\":1,\"ax\":0,\"ay\":-40},{\"x\":140400,\"y\":40.0,\"xref\":\"x\",\"yref\":\"y\",\"text\":\"tsumikae\",\"showarrow\":true,\"arrowhead\":1,\"ax\":0,\"ay\":-40},{\"x\":158400,\"y\":40.0,\"xref\":\"x\",\"yref\":\"y\",\"text\":\"dekoji\",\"showarrow\":true,\"arrowhead\":1,\"ax\":0,\"ay\":-40}]},\n",
24
+ " {\"xaxis\":{\"dtick\":86400,\"tickvals\":[0,86400],\"ticktext\":[1,2]},\"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('fbd8af84-03f9-4489-ba76-90ddd95508fc'))\n",
29
+ " Plotly.Plots.resize(document.getElementById('3856c612-90ef-46ed-8975-15359315c82a'))\n",
30
30
  "})\n",
31
31
  " }) \n",
32
32
  "</script>"
33
33
  ],
34
34
  "text/plain": [
35
- "#<Plotly::Offline::HTML:0x00007f934f02ae88 @id=\"fbd8af84-03f9-4489-ba76-90ddd95508fc\", @data=[{:x=>[0, 3600, 32400, 32401, 75600, 75601, 104400, 104401, 126000, 126001, 140400, 158400], :y=>[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=>[\"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, 3600, 32400, 75600, 104400, 126000, 140400, 158400], :y=>[28.0, 28.0, 28.0, 28.0, 28.0, 28.0, 28.0, 28.0], :text=>[\"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=>[75600, 104400, 126000, 140400, 158400], :y=>[4, 4, 5, 5, 5], :text=>[\"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}}], @layout={:xaxis=>{:dtick=>86400, :tickvals=>[0, 86400, 172800], :ticktext=>[1, 2, 3]}, :annotations=>[{:x=>0, :y=>35.0, :xref=>\"x\", :yref=>\"y\", :text=>:hikikomi, :showarrow=>true, :arrowhead=>1, :ax=>0, :ay=>-40}, {:x=>3600, :y=>32.0, :xref=>\"x\", :yref=>\"y\", :text=>:tokomomi, :showarrow=>true, :arrowhead=>1, :ax=>0, :ay=>-40}, {:x=>32400, :y=>32.0, :xref=>\"x\", :yref=>\"y\", :text=>:kirikaeshi, :showarrow=>true, :arrowhead=>1, :ax=>0, :ay=>-40}, {:x=>75600, :y=>35.0, :xref=>\"x\", :yref=>\"y\", :text=>:mori, :showarrow=>true, :arrowhead=>1, :ax=>0, :ay=>-40}, {:x=>104400, :y=>37.0, :xref=>\"x\", :yref=>\"y\", :text=>:naka_shigoto, :showarrow=>true, :arrowhead=>1, :ax=>0, :ay=>-40}, {:x=>126000, :y=>38.0, :xref=>\"x\", :yref=>\"y\", :text=>:shimai_shigoto, :showarrow=>true, :arrowhead=>1, :ax=>0, :ay=>-40}, {:x=>140400, :y=>40.0, :xref=>\"x\", :yref=>\"y\", :text=>:tsumikae, :showarrow=>true, :arrowhead=>1, :ax=>0, :ay=>-40}, {:x=>158400, :y=>40.0, :xref=>\"x\", :yref=>\"y\", :text=>:dekoji, :showarrow=>true, :arrowhead=>1, :ax=>0, :ay=>-40}]}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
35
+ "#<Plotly::Offline::HTML:0x00007ff96317b2b8 @id=\"3856c612-90ef-46ed-8975-15359315c82a\", @data=[{:x=>[0, 3600, 32400, 32401, 75600, 75601, 104400, 104401, 126000, 126001, 140400, 158400], :y=>[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=>[\"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, 3600, 32400, 75600, 104400, 126000, 140400, 158400], :y=>[28.0, 28.0, 28.0, 28.0, 28.0, 28.0, 28.0, 28.0], :text=>[\"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=>[75600, 104400, 126000, 140400, 158400], :y=>[4, 4, 5, 5, 5], :text=>[\"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}}], @layout={:xaxis=>{:dtick=>86400, :tickvals=>[0, 86400], :ticktext=>[1, 2]}, :annotations=>[]}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
36
36
  ]
37
37
  },
38
38
  "metadata": {},
@@ -41,7 +41,7 @@
41
41
  {
42
42
  "data": {
43
43
  "text/plain": [
44
- "#<CZTop::Socket::PUB:0x7f934dd9a3d0 last_endpoint=\"tcp://127.0.0.1:57436\">"
44
+ "#<CZTop::Socket::PUB:0x7ff96619f110 last_endpoint=\"tcp://127.0.0.1:55232\">"
45
45
  ]
46
46
  },
47
47
  "execution_count": 1,
@@ -54,7 +54,7 @@
54
54
  "require 'toji'\n",
55
55
  "require 'rbplotly'\n",
56
56
  "\n",
57
- "koji = Toji::Product::KojiMaking.template\n",
57
+ "koji = Toji::Brew::Koji.template\n",
58
58
  "koji.progress.plot.show"
59
59
  ]
60
60
  },
@@ -1,14 +1,14 @@
1
1
  require 'toji'
2
2
  require 'terminal-table'
3
3
 
4
- koji_making = Toji::Product::KojiMaking.template
4
+ koji = Toji::Brew::Koji.template
5
5
 
6
6
  table = Terminal::Table.new do |t|
7
- t << ["作業", "品温(度)", "操作室温", "乾湿差(度)", "経過時間", "日時"]
7
+ t << ["作業", "日数", "品温(度)", "操作室温", "乾湿差(度)", "経過時間", "日時"]
8
8
  t << :separator
9
- koji_making.each {|j|
10
- temp = j.temps.map(&:to_s).join(" / ")
11
- t << [j.id, temp, j.room_temp, j.room_psychrometry, j.elapsed_time, j.display_time]
9
+ koji.each {|s|
10
+ temp = s.temps.map(&:to_s).join(" / ")
11
+ t << [s.mark, s.day_label, temp, s.room_temp, s.room_psychrometry, s.elapsed_time, s.display_time]
12
12
  }
13
13
  end
14
14
  puts table
@@ -1,7 +1,7 @@
1
1
  require 'toji'
2
2
  require 'terminal-table'
3
3
 
4
- koji = Toji::Ingredient::Koji.expected(100, rice_rate: Toji::Recipe::RiceRate::Steamed::DEFAULT, koji_rate: Toji::Recipe::KojiRate::DEFAULT)
4
+ koji = Toji::Recipe::Ingredient::Koji.expected(100, rice_rate: Toji::Recipe::RiceRate::Steamed::DEFAULT, koji_rate: Toji::Recipe::KojiRate::DEFAULT)
5
5
 
6
6
  table = Terminal::Table.new do |t|
7
7
  t << ["", "分量", "白米を基準とした歩合"]
data/example/moromi.ipynb CHANGED
@@ -2,7 +2,7 @@
2
2
  "cells": [
3
3
  {
4
4
  "cell_type": "code",
5
- "execution_count": 2,
5
+ "execution_count": 6,
6
6
  "metadata": {
7
7
  "scrolled": false
8
8
  },
@@ -16,25 +16,25 @@
16
16
  " </script>\n",
17
17
  "\n",
18
18
  "\n",
19
- "<div id=\"c10430b3-2705-4de4-9852-7c5c48ca3285\" style=\"height: 100%; width: 100%;\"></div>\n",
19
+ "<div id=\"49bb7a63-b0b3-4742-9ddd-f9dd57c7365e\" 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
- " 'c10430b3-2705-4de4-9852-7c5c48ca3285',\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\":{\"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\"}}],\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]},\"annotations\":[]},\n",
24
+ " '49bb7a63-b0b3-4742-9ddd-f9dd57c7365e',\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\":{\"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\":[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\"}},{\"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\"}}],\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",
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('c10430b3-2705-4de4-9852-7c5c48ca3285'))\n",
31
+ " Plotly.Plots.resize(document.getElementById('49bb7a63-b0b3-4742-9ddd-f9dd57c7365e'))\n",
32
32
  "})\n",
33
33
  " }) \n",
34
34
  "</script>"
35
35
  ],
36
36
  "text/plain": [
37
- "#<Plotly::Offline::HTML:0x00007fdaf30c3c50 @id=\"c10430b3-2705-4de4-9852-7c5c48ca3285\", @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=>{: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}}], @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]}, :annotations=>[]}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
37
+ "#<Plotly::Offline::HTML:0x00007ffa9a1bb1c8 @id=\"49bb7a63-b0b3-4742-9ddd-f9dd57c7365e\", @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=>{: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=>[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}}, {: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}}], @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=>[]}, @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=\"afa53933-7db0-4dab-a85d-ebe4a405c08b\" style=\"height: 100%; width: 100%;\"></div>\n",
52
+ "<div id=\"9c678def-9376-4505-86c5-3761b04efc2e\" 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
- " 'afa53933-7db0-4dab-a85d-ebe4a405c08b',\n",
58
- " [{\"x\":[259200,345600,432000,518400,604800,691200,777600,864000,950400,1036800,1123200,1296000,1382400,1468800,1555200,1641600],\"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\":[\"2019-01-23 00:00:00 +0900\\u003cbr /\\u003emoromi day=4, be=8.6, bmd=34.4\",\"2019-01-24 00:00:00 +0900\\u003cbr /\\u003emoromi day=5, be=8.0, bmd=40.0\",\"2019-01-25 00:00:00 +0900\\u003cbr /\\u003emoromi day=6, be=7.2, bmd=43.2\",\"2019-01-26 00:00:00 +0900\\u003cbr /\\u003emoromi day=7, be=5.8, bmd=40.6\",\"2019-01-27 00:00:00 +0900\\u003cbr /\\u003emoromi day=8, be=4.8, bmd=38.4\",\"2019-01-28 00:00:00 +0900\\u003cbr /\\u003emoromi day=9, be=4.0, bmd=36.0\",\"2019-01-29 00:00:00 +0900\\u003cbr /\\u003emoromi day=10, be=3.4, bmd=34.0\",\"2019-01-30 00:00:00 +0900\\u003cbr /\\u003emoromi day=11, be=2.7, bmd=29.700000000000003\",\"2019-01-31 00:00:00 +0900\\u003cbr /\\u003emoromi day=12, be=2.1, bmd=25.200000000000003\",\"2019-02-01 00:00:00 +0900\\u003cbr /\\u003emoromi day=13, be=1.7000000000000002, bmd=22.1\",\"2019-02-02 00:00:00 +0900\\u003cbr /\\u003emoromi day=14, be=1.3, bmd=18.2\",\"2019-02-04 00:00:00 +0900\\u003cbr /\\u003emoromi day=16, be=0.8, bmd=12.8\",\"2019-02-05 00:00:00 +0900\\u003cbr /\\u003emoromi day=17, be=0.5, bmd=8.5\",\"2019-02-06 00:00:00 +0900\\u003cbr /\\u003emoromi day=18, be=0.30000000000000004, bmd=5.4\",\"2019-02-07 00:00:00 +0900\\u003cbr /\\u003emoromi day=19, be=0.2, bmd=3.8000000000000003\",\"2019-02-08 00:00:00 +0900\\u003cbr /\\u003emoromi day=20, be=-0.0, bmd=-0.0\"],\"name\":\"actual\"}],\n",
59
- " {\"xaxis\":{\"title\":\"Moromi day\",\"dtick\":86400,\"range\":[86400,1728000],\"tickvals\":[0,86400,172800,259200,345600,432000,518400,604800,691200,777600,864000,950400,1036800,1123200,1209600,1296000,1382400,1468800,1555200,1641600],\"ticktext\":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]},\"yaxis\":{\"title\":\"BMD\"}},\n",
57
+ " '9c678def-9376-4505-86c5-3761b04efc2e',\n",
58
+ " [{\"type\":\"table\",\"header\":{\"values\":[\"day_label\",\"display_time\",\"mark\",\"temps\",\"room_temp\",\"display_baume\",\"bmd\",\"alcohol\"]},\"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,\"\"],[\"\",\"\",\"\",\"\",\"\",\"\",\"\",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,\"\"],[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",4.8,6.75,7.992,\"\",10.7,11.6,12.7,13.7,\"\",\"\",\"\",16.0,\"\",16.3,\"\",\"\",\"\"]]}}],\n",
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('afa53933-7db0-4dab-a85d-ebe4a405c08b'))\n",
64
+ " Plotly.Plots.resize(document.getElementById('9c678def-9376-4505-86c5-3761b04efc2e'))\n",
65
65
  "})\n",
66
66
  " }) \n",
67
67
  "</script>"
68
68
  ],
69
69
  "text/plain": [
70
- "#<Plotly::Offline::HTML:0x00007fdaf4506370 @id=\"afa53933-7db0-4dab-a85d-ebe4a405c08b\", @data=[{:x=>[259200, 345600, 432000, 518400, 604800, 691200, 777600, 864000, 950400, 1036800, 1123200, 1296000, 1382400, 1468800, 1555200, 1641600], :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=>[\"2019-01-23 00:00:00 +0900<br />moromi day=4, be=8.6, bmd=34.4\", \"2019-01-24 00:00:00 +0900<br />moromi day=5, be=8.0, bmd=40.0\", \"2019-01-25 00:00:00 +0900<br />moromi day=6, be=7.2, bmd=43.2\", \"2019-01-26 00:00:00 +0900<br />moromi day=7, be=5.8, bmd=40.6\", \"2019-01-27 00:00:00 +0900<br />moromi day=8, be=4.8, bmd=38.4\", \"2019-01-28 00:00:00 +0900<br />moromi day=9, be=4.0, bmd=36.0\", \"2019-01-29 00:00:00 +0900<br />moromi day=10, be=3.4, bmd=34.0\", \"2019-01-30 00:00:00 +0900<br />moromi day=11, be=2.7, bmd=29.700000000000003\", \"2019-01-31 00:00:00 +0900<br />moromi day=12, be=2.1, bmd=25.200000000000003\", \"2019-02-01 00:00:00 +0900<br />moromi day=13, be=1.7000000000000002, bmd=22.1\", \"2019-02-02 00:00:00 +0900<br />moromi day=14, be=1.3, bmd=18.2\", \"2019-02-04 00:00:00 +0900<br />moromi day=16, be=0.8, bmd=12.8\", \"2019-02-05 00:00:00 +0900<br />moromi day=17, be=0.5, bmd=8.5\", \"2019-02-06 00:00:00 +0900<br />moromi day=18, be=0.30000000000000004, bmd=5.4\", \"2019-02-07 00:00:00 +0900<br />moromi day=19, be=0.2, bmd=3.8000000000000003\", \"2019-02-08 00:00:00 +0900<br />moromi day=20, be=-0.0, bmd=-0.0\"], :name=>:actual}], @layout={:xaxis=>{:title=>\"Moromi day\", :dtick=>86400, :range=>[86400, 1728000], :tickvals=>[0, 86400, 172800, 259200, 345600, 432000, 518400, 604800, 691200, 777600, 864000, 950400, 1036800, 1123200, 1209600, 1296000, 1382400, 1468800, 1555200, 1641600], :ticktext=>[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]}, :yaxis=>{:title=>\"BMD\"}}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
70
+ "#<Plotly::Offline::HTML:0x00007ffa9aa48430 @id=\"9c678def-9376-4505-86c5-3761b04efc2e\", @data=[{:type=>:table, :header=>{:values=>[:day_label, :display_time, :mark, :temps, :room_temp, :display_baume, :bmd, :alcohol]}, :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, \"\"], [\"\", \"\", \"\", \"\", \"\", \"\", \"\", 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, \"\"], [\"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", 4.8, 6.75, 7.992, \"\", 10.7, 11.6, 12.7, 13.7, \"\", \"\", \"\", 16.0, \"\", 16.3, \"\", \"\", \"\"]]}}], @layout={:height=>710}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
71
71
  ]
72
72
  },
73
73
  "metadata": {},
@@ -82,25 +82,58 @@
82
82
  " </script>\n",
83
83
  "\n",
84
84
  "\n",
85
- "<div id=\"26a57095-09b3-4249-9eb3-3b3901d31e36\" style=\"height: 100%; width: 100%;\"></div>\n",
85
+ "<div id=\"54f415be-f81c-44f0-b4ec-f7339b44169c\" 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
- " '26a57095-09b3-4249-9eb3-3b3901d31e36',\n",
91
- " [{\"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\":[\"2019-01-24 00:00:00 +0900\\u003cbr /\\u003ealc=4.8, be=8.0\",\"2019-01-25 00:00:00 +0900\\u003cbr /\\u003ealc=6.75, be=7.2\",\"2019-01-26 00:00:00 +0900\\u003cbr /\\u003ealc=7.992, be=5.8\",\"2019-01-28 00:00:00 +0900\\u003cbr /\\u003ealc=10.7, be=4.0\",\"2019-01-29 00:00:00 +0900\\u003cbr /\\u003ealc=11.6, be=3.4\",\"2019-01-30 00:00:00 +0900\\u003cbr /\\u003ealc=12.7, be=2.7\",\"2019-01-31 00:00:00 +0900\\u003cbr /\\u003ealc=13.7, be=2.1\",\"2019-02-04 00:00:00 +0900\\u003cbr /\\u003ealc=16.0, be=0.8\",\"2019-02-06 00:00:00 +0900\\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",
90
+ " '54f415be-f81c-44f0-b4ec-f7339b44169c',\n",
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
+ " {\"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
+ " {\"linkText\":\"Export to plot.ly\",\"showLink\":true}\n",
94
+ ")\n",
95
+ "\n",
96
+ "window.addEventListener('resize', function() {\n",
97
+ " Plotly.Plots.resize(document.getElementById('54f415be-f81c-44f0-b4ec-f7339b44169c'))\n",
98
+ "})\n",
99
+ " }) \n",
100
+ "</script>"
101
+ ],
102
+ "text/plain": [
103
+ "#<Plotly::Offline::HTML:0x00007ffa9ba1a958 @id=\"54f415be-f81c-44f0-b4ec-f7339b44169c\", @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
+ ]
105
+ },
106
+ "metadata": {},
107
+ "output_type": "display_data"
108
+ },
109
+ {
110
+ "data": {
111
+ "text/html": [
112
+ "\n",
113
+ " <script>\n",
114
+ " requirejs.config({paths: { 'plotly': ['https://cdn.plot.ly/plotly-latest.min'] }})\n",
115
+ " </script>\n",
116
+ "\n",
117
+ "\n",
118
+ "<div id=\"2da6423a-cc78-4937-aab9-54b0c1ad9b0a\" style=\"height: 100%; width: 100%;\"></div>\n",
119
+ "\n",
120
+ "<script>\n",
121
+ " require(['plotly'], function(Plotly) { \n",
122
+ "Plotly.newPlot(\n",
123
+ " '2da6423a-cc78-4937-aab9-54b0c1ad9b0a',\n",
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",
92
125
  " {\"xaxis\":{\"title\":\"Alcohol\",\"dtick\":2,\"range\":[0,20]},\"yaxis\":{\"title\":\"Baume\",\"dtick\":1,\"range\":[0,10]}},\n",
93
126
  " {\"linkText\":\"Export to plot.ly\",\"showLink\":true}\n",
94
127
  ")\n",
95
128
  "\n",
96
129
  "window.addEventListener('resize', function() {\n",
97
- " Plotly.Plots.resize(document.getElementById('26a57095-09b3-4249-9eb3-3b3901d31e36'))\n",
130
+ " Plotly.Plots.resize(document.getElementById('2da6423a-cc78-4937-aab9-54b0c1ad9b0a'))\n",
98
131
  "})\n",
99
132
  " }) \n",
100
133
  "</script>"
101
134
  ],
102
135
  "text/plain": [
103
- "#<Plotly::Offline::HTML:0x00007fdaf452f590 @id=\"26a57095-09b3-4249-9eb3-3b3901d31e36\", @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=>[\"2019-01-24 00:00:00 +0900<br />alc=4.8, be=8.0\", \"2019-01-25 00:00:00 +0900<br />alc=6.75, be=7.2\", \"2019-01-26 00:00:00 +0900<br />alc=7.992, be=5.8\", \"2019-01-28 00:00:00 +0900<br />alc=10.7, be=4.0\", \"2019-01-29 00:00:00 +0900<br />alc=11.6, be=3.4\", \"2019-01-30 00:00:00 +0900<br />alc=12.7, be=2.7\", \"2019-01-31 00:00:00 +0900<br />alc=13.7, be=2.1\", \"2019-02-04 00:00:00 +0900<br />alc=16.0, be=0.8\", \"2019-02-06 00:00:00 +0900<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>"
136
+ "#<Plotly::Offline::HTML:0x00007ffa9c1b0e38 @id=\"2da6423a-cc78-4937-aab9-54b0c1ad9b0a\", @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>"
104
137
  ]
105
138
  },
106
139
  "metadata": {},
@@ -109,10 +142,10 @@
109
142
  {
110
143
  "data": {
111
144
  "text/plain": [
112
- "#<CZTop::Socket::PUB:0x7fdaf259d730 last_endpoint=\"tcp://127.0.0.1:62137\">"
145
+ "#<CZTop::Socket::PUB:0x7ffa9e326000 last_endpoint=\"tcp://127.0.0.1:49758\">"
113
146
  ]
114
147
  },
115
- "execution_count": 2,
148
+ "execution_count": 6,
116
149
  "metadata": {},
117
150
  "output_type": "execute_result"
118
151
  }
@@ -122,8 +155,9 @@
122
155
  "require 'toji'\n",
123
156
  "require 'rbplotly'\n",
124
157
  "\n",
125
- "moromi = Toji::Product::Moromi.template\n",
158
+ "moromi = Toji::Brew::Moromi.template\n",
126
159
  "moromi.progress(enable_annotations: false).plot.show\n",
160
+ "moromi.progress.table.tap{|t| t.layout.height=710}.show\n",
127
161
  "moromi.bmd.plot.show\n",
128
162
  "\n",
129
163
  "moromi.ab(1.5)\n",
data/example/moromi.rb CHANGED
@@ -2,14 +2,14 @@ require 'toji'
2
2
  require 'terminal-table'
3
3
 
4
4
 
5
- moromi = Toji::Product::Moromi.template
5
+ moromi = Toji::Brew::Moromi.template
6
6
 
7
7
  table = Terminal::Table.new do |t|
8
- t << ["作業", "品温(度)", "操作室温", "ボーメ及び日本酒度", "アルコール度数", "BMD", "AB 16.5 +3", "経過時間", "日時"]
8
+ t << ["作業", "日数", "品温(度)", "操作室温", "ボーメ及び日本酒度", "アルコール度数", "BMD", "AB 16.5 +3", "経過時間", "日時"]
9
9
  t << :separator
10
- moromi.each {|j|
11
- temp = j.temps.map(&:to_s).join(" / ")
12
- t << [j.id, temp, j.room_temp, j.display_baume, j.alcohol, j.bmd&.round(2), j.expected_alcohol(16.5, +3, 1.5)&.round(2), j.elapsed_time, j.time]
10
+ moromi.each {|s|
11
+ temp = s.temps.map(&:to_s).join(" / ")
12
+ t << [s.mark, s.day_label, temp, s.room_temp, s.display_baume, s.alcohol, s.bmd&.round(2), s.expected_alcohol(16.5, +3, 1.5)&.round(2), s.elapsed_time, s.display_time]
13
13
  }
14
14
  end
15
15
  puts table
@@ -1,8 +1,8 @@
1
1
  require 'toji'
2
2
  require 'terminal-table'
3
3
 
4
- #rice = Toji::Ingredient::Rice.expected(100, rice_rate: Toji::Recipe::RiceRate::Steamed::DEFAULT)
5
- rice = Toji::Ingredient::Rice.expected(100, rice_rate: Toji::Recipe::RiceRate::Cooked::DEFAULT)
4
+ rice = Toji::Recipe::Ingredient::Rice.expected(100, rice_rate: Toji::Recipe::RiceRate::Steamed::DEFAULT)
5
+ #rice = Toji::Recipe::Ingredient::Rice.expected(100, rice_rate: Toji::Recipe::RiceRate::Cooked::DEFAULT)
6
6
 
7
7
  table = Terminal::Table.new do |t|
8
8
  t << ["", "分量", "白米を基準とした歩合"]
data/example/shubo.ipynb CHANGED
@@ -14,25 +14,25 @@
14
14
  " </script>\n",
15
15
  "\n",
16
16
  "\n",
17
- "<div id=\"54033831-3193-4266-bac7-eabe6fa8807f\" style=\"height: 100%; width: 100%;\"></div>\n",
17
+ "<div id=\"62207c87-53f8-411b-a9c4-86ea7f307b1b\" 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
- " '54033831-3193-4266-bac7-eabe6fa8807f',\n",
22
+ " '62207c87-53f8-411b-a9c4-86ea7f307b1b',\n",
23
23
  " [{\"x\":[0,3600,86400,172800,172801,259200,259201,345600,345601,432000,518400,604800,691200,777600,864000,950400,1036800,1123200],\"y\":[12.0,20.0,14.0,8.0,11.0,10.0,13.0,12.0,15.0,14.0,20.0,20.0,20.0,20.0,15.0,12.0,10.0,9.0],\"text\":[\"01/01 09:00\",\"01/01 10:00\",\"01/02 09:00\",\"01/03 09:00\",\"01/03 09:00\",\"01/04 09:00\",\"01/04 09:00\",\"01/05 09:00\",\"01/05 09:00\",\"01/06 09:00\",\"01/07 09:00\",\"01/08 09:00\",\"01/09 09:00\",\"01/10 09:00\",\"01/11 09:00\",\"01/12 09:00\",\"01/13 09:00\",\"01/14 09:00\"],\"name\":\"temps\",\"line\":{\"shape\":\"linear\"}},{\"x\":[0,3600,86400,172800,259200,345600,432000,518400,604800,691200,777600,864000,950400,1036800,1123200],\"y\":[13.0,13.0,13.0,13.0,13.5,13.5,14.0,14.5,15.5,16.0,16.0,16.5,17.0,17.5,17.5],\"text\":[\"01/01 09:00\",\"01/01 10:00\",\"01/02 09:00\",\"01/03 09:00\",\"01/04 09:00\",\"01/05 09:00\",\"01/06 09:00\",\"01/07 09:00\",\"01/08 09:00\",\"01/09 09:00\",\"01/10 09:00\",\"01/11 09:00\",\"01/12 09:00\",\"01/13 09:00\",\"01/14 09:00\"],\"name\":\"acid\",\"line\":{\"shape\":\"linear\"}},{\"x\":[86400,172800,259200,345600,432000,518400,604800,691200,777600,864000,950400,1036800,1123200],\"y\":[15.0,16.0,16.5,17.0,17.0,17.0,14.0,12.0,9.0,8.0,7.0,6.0,5.0],\"text\":[\"01/02 09:00\",\"01/03 09:00\",\"01/04 09:00\",\"01/05 09:00\",\"01/06 09:00\",\"01/07 09:00\",\"01/08 09:00\",\"01/09 09:00\",\"01/10 09:00\",\"01/11 09:00\",\"01/12 09:00\",\"01/13 09:00\",\"01/14 09:00\"],\"name\":\"baume\",\"line\":{\"shape\":\"linear\"}}],\n",
24
24
  " {\"xaxis\":{\"dtick\":86400,\"tickvals\":[0,86400,172800,259200,345600,432000,518400,604800,691200,777600,864000,950400,1036800,1123200],\"ticktext\":[1,2,3,4,5,6,7,8,9,10,11,12,13,14]},\"annotations\":[{\"x\":0,\"y\":12.0,\"xref\":\"x\",\"yref\":\"y\",\"text\":\"mizukoji\",\"showarrow\":true,\"arrowhead\":1,\"ax\":0,\"ay\":-40},{\"x\":3600,\"y\":20.0,\"xref\":\"x\",\"yref\":\"y\",\"text\":\"shikomi\",\"showarrow\":true,\"arrowhead\":1,\"ax\":0,\"ay\":-40},{\"x\":86400,\"y\":14.0,\"xref\":\"x\",\"yref\":\"y\",\"text\":\"utase\",\"showarrow\":true,\"arrowhead\":1,\"ax\":0,\"ay\":-40},{\"x\":777600,\"y\":20.0,\"xref\":\"x\",\"yref\":\"y\",\"text\":\"wake\",\"showarrow\":true,\"arrowhead\":1,\"ax\":0,\"ay\":-40}]},\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('54033831-3193-4266-bac7-eabe6fa8807f'))\n",
29
+ " Plotly.Plots.resize(document.getElementById('62207c87-53f8-411b-a9c4-86ea7f307b1b'))\n",
30
30
  "})\n",
31
31
  " }) \n",
32
32
  "</script>"
33
33
  ],
34
34
  "text/plain": [
35
- "#<Plotly::Offline::HTML:0x00007f7ff5a47848 @id=\"54033831-3193-4266-bac7-eabe6fa8807f\", @data=[{:x=>[0, 3600, 86400, 172800, 172801, 259200, 259201, 345600, 345601, 432000, 518400, 604800, 691200, 777600, 864000, 950400, 1036800, 1123200], :y=>[12.0, 20.0, 14.0, 8.0, 11.0, 10.0, 13.0, 12.0, 15.0, 14.0, 20.0, 20.0, 20.0, 20.0, 15.0, 12.0, 10.0, 9.0], :text=>[\"01/01 09:00\", \"01/01 10:00\", \"01/02 09:00\", \"01/03 09:00\", \"01/03 09:00\", \"01/04 09:00\", \"01/04 09:00\", \"01/05 09:00\", \"01/05 09:00\", \"01/06 09:00\", \"01/07 09:00\", \"01/08 09:00\", \"01/09 09:00\", \"01/10 09:00\", \"01/11 09:00\", \"01/12 09:00\", \"01/13 09:00\", \"01/14 09:00\"], :name=>:temps, :line=>{:shape=>:linear}}, {:x=>[0, 3600, 86400, 172800, 259200, 345600, 432000, 518400, 604800, 691200, 777600, 864000, 950400, 1036800, 1123200], :y=>[13.0, 13.0, 13.0, 13.0, 13.5, 13.5, 14.0, 14.5, 15.5, 16.0, 16.0, 16.5, 17.0, 17.5, 17.5], :text=>[\"01/01 09:00\", \"01/01 10:00\", \"01/02 09:00\", \"01/03 09:00\", \"01/04 09:00\", \"01/05 09:00\", \"01/06 09:00\", \"01/07 09:00\", \"01/08 09:00\", \"01/09 09:00\", \"01/10 09:00\", \"01/11 09:00\", \"01/12 09:00\", \"01/13 09:00\", \"01/14 09:00\"], :name=>:acid, :line=>{:shape=>:linear}}, {:x=>[86400, 172800, 259200, 345600, 432000, 518400, 604800, 691200, 777600, 864000, 950400, 1036800, 1123200], :y=>[15.0, 16.0, 16.5, 17.0, 17.0, 17.0, 14.0, 12.0, 9.0, 8.0, 7.0, 6.0, 5.0], :text=>[\"01/02 09:00\", \"01/03 09:00\", \"01/04 09:00\", \"01/05 09:00\", \"01/06 09:00\", \"01/07 09:00\", \"01/08 09:00\", \"01/09 09:00\", \"01/10 09:00\", \"01/11 09:00\", \"01/12 09:00\", \"01/13 09:00\", \"01/14 09:00\"], :name=>:baume, :line=>{:shape=>:linear}}], @layout={:xaxis=>{:dtick=>86400, :tickvals=>[0, 86400, 172800, 259200, 345600, 432000, 518400, 604800, 691200, 777600, 864000, 950400, 1036800, 1123200], :ticktext=>[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]}, :annotations=>[{:x=>0, :y=>12.0, :xref=>\"x\", :yref=>\"y\", :text=>:mizukoji, :showarrow=>true, :arrowhead=>1, :ax=>0, :ay=>-40}, {:x=>3600, :y=>20.0, :xref=>\"x\", :yref=>\"y\", :text=>:shikomi, :showarrow=>true, :arrowhead=>1, :ax=>0, :ay=>-40}, {:x=>86400, :y=>14.0, :xref=>\"x\", :yref=>\"y\", :text=>:utase, :showarrow=>true, :arrowhead=>1, :ax=>0, :ay=>-40}, {:x=>777600, :y=>20.0, :xref=>\"x\", :yref=>\"y\", :text=>:wake, :showarrow=>true, :arrowhead=>1, :ax=>0, :ay=>-40}]}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
35
+ "#<Plotly::Offline::HTML:0x00007f8c398d8f20 @id=\"62207c87-53f8-411b-a9c4-86ea7f307b1b\", @data=[{:x=>[0, 3600, 86400, 172800, 172801, 259200, 259201, 345600, 345601, 432000, 518400, 604800, 691200, 777600, 864000, 950400, 1036800, 1123200], :y=>[12.0, 20.0, 14.0, 8.0, 11.0, 10.0, 13.0, 12.0, 15.0, 14.0, 20.0, 20.0, 20.0, 20.0, 15.0, 12.0, 10.0, 9.0], :text=>[\"01/01 09:00\", \"01/01 10:00\", \"01/02 09:00\", \"01/03 09:00\", \"01/03 09:00\", \"01/04 09:00\", \"01/04 09:00\", \"01/05 09:00\", \"01/05 09:00\", \"01/06 09:00\", \"01/07 09:00\", \"01/08 09:00\", \"01/09 09:00\", \"01/10 09:00\", \"01/11 09:00\", \"01/12 09:00\", \"01/13 09:00\", \"01/14 09:00\"], :name=>:temps, :line=>{:shape=>:linear}}, {:x=>[0, 3600, 86400, 172800, 259200, 345600, 432000, 518400, 604800, 691200, 777600, 864000, 950400, 1036800, 1123200], :y=>[13.0, 13.0, 13.0, 13.0, 13.5, 13.5, 14.0, 14.5, 15.5, 16.0, 16.0, 16.5, 17.0, 17.5, 17.5], :text=>[\"01/01 09:00\", \"01/01 10:00\", \"01/02 09:00\", \"01/03 09:00\", \"01/04 09:00\", \"01/05 09:00\", \"01/06 09:00\", \"01/07 09:00\", \"01/08 09:00\", \"01/09 09:00\", \"01/10 09:00\", \"01/11 09:00\", \"01/12 09:00\", \"01/13 09:00\", \"01/14 09:00\"], :name=>:acid, :line=>{:shape=>:linear}}, {:x=>[86400, 172800, 259200, 345600, 432000, 518400, 604800, 691200, 777600, 864000, 950400, 1036800, 1123200], :y=>[15.0, 16.0, 16.5, 17.0, 17.0, 17.0, 14.0, 12.0, 9.0, 8.0, 7.0, 6.0, 5.0], :text=>[\"01/02 09:00\", \"01/03 09:00\", \"01/04 09:00\", \"01/05 09:00\", \"01/06 09:00\", \"01/07 09:00\", \"01/08 09:00\", \"01/09 09:00\", \"01/10 09:00\", \"01/11 09:00\", \"01/12 09:00\", \"01/13 09:00\", \"01/14 09:00\"], :name=>:baume, :line=>{:shape=>:linear}}], @layout={:xaxis=>{:dtick=>86400, :tickvals=>[0, 86400, 172800, 259200, 345600, 432000, 518400, 604800, 691200, 777600, 864000, 950400, 1036800, 1123200], :ticktext=>[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]}, :annotations=>[{:x=>0, :y=>12.0, :xref=>\"x\", :yref=>\"y\", :text=>:mizukoji, :showarrow=>true, :arrowhead=>1, :ax=>0, :ay=>-40}, {:x=>3600, :y=>20.0, :xref=>\"x\", :yref=>\"y\", :text=>:shikomi, :showarrow=>true, :arrowhead=>1, :ax=>0, :ay=>-40}, {:x=>86400, :y=>14.0, :xref=>\"x\", :yref=>\"y\", :text=>:utase, :showarrow=>true, :arrowhead=>1, :ax=>0, :ay=>-40}, {:x=>777600, :y=>20.0, :xref=>\"x\", :yref=>\"y\", :text=>:wake, :showarrow=>true, :arrowhead=>1, :ax=>0, :ay=>-40}]}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
36
36
  ]
37
37
  },
38
38
  "metadata": {},
@@ -41,7 +41,7 @@
41
41
  {
42
42
  "data": {
43
43
  "text/plain": [
44
- "#<CZTop::Socket::PUB:0x7f7ff6d8c2a0 last_endpoint=\"tcp://127.0.0.1:59277\">"
44
+ "#<CZTop::Socket::PUB:0x7f8c3b0c4690 last_endpoint=\"tcp://127.0.0.1:55975\">"
45
45
  ]
46
46
  },
47
47
  "execution_count": 1,
@@ -54,7 +54,7 @@
54
54
  "require 'toji'\n",
55
55
  "require 'rbplotly'\n",
56
56
  "\n",
57
- "shubo = Toji::Product::Shubo.template\n",
57
+ "shubo = Toji::Brew::Shubo.template\n",
58
58
  "shubo.progress.plot.show"
59
59
  ]
60
60
  },
data/example/shubo.rb CHANGED
@@ -1,14 +1,14 @@
1
1
  require 'toji'
2
2
  require 'terminal-table'
3
3
 
4
- shubo = Toji::Product::Shubo.template
4
+ shubo = Toji::Brew::Shubo.template
5
5
 
6
6
  table = Terminal::Table.new do |t|
7
- t << ["作業", "品温(度)", "ボーメ", "酸度", "経過時間", "日時"]
7
+ t << ["作業", "日数", "品温(度)", "ボーメ", "酸度", "経過時間", "日時"]
8
8
  t << :separator
9
- shubo.each {|j|
10
- temp = j.temps.map(&:to_s).join(" / ")
11
- t << [j.id, temp, j.baume, j.acid, j.elapsed_time, j.display_time]
9
+ shubo.each {|s|
10
+ temp = s.temps.map(&:to_s).join(" / ")
11
+ t << [s.mark, s.day_label, temp, s.baume, s.acid, s.elapsed_time, s.display_time]
12
12
  }
13
13
  end
14
14
  puts table
@@ -1,7 +1,7 @@
1
1
  require 'toji'
2
2
  require 'terminal-table'
3
3
 
4
- recipe = Toji::Recipe::ThreeStepMashing.new(Toji::Ingredient::Yeast::RedStar, 2000)
4
+ recipe = Toji::Recipe::ThreeStepMashing.new(Toji::Recipe::YeastRate::SAKE_LEES, Toji::Recipe::LacticAcidRate::SIMPLE_SOKUJO, 2000)
5
5
 
6
6
  table = Terminal::Table.new do |t|
7
7
  t << [""] + recipe.class::STEP_NAMES
@@ -9,7 +9,7 @@ table = Terminal::Table.new do |t|
9
9
  t << ["[原料]"]
10
10
  t << ["酵母(g)", recipe.yeast.yeast&.round(2)]
11
11
  t << ["酵母吸水", recipe.yeast.water&.round(2)]
12
- t << ["乳酸(ml)"]
12
+ t << ["乳酸(ml)", recipe.lactic_acid.moto, recipe.lactic_acid.soe]
13
13
  t << ["掛米(g)"] + recipe.steps.map(&:rice).map(&:raw).map{|v| v&.round(2)}
14
14
  t << ["麹米(g)"] + recipe.steps.map(&:koji).map(&:raw).map{|v| v&.round(2)}
15
15
  t << ["汲水(ml)"] + recipe.steps.map(&:water).map{|v| v&.round(2)}
@@ -0,0 +1,88 @@
1
+ module Toji
2
+ module Brew
3
+ class Base
4
+ include Enumerable
5
+ extend StateAccessor
6
+
7
+ attr_reader :day_offset
8
+ attr_accessor :day_labels
9
+
10
+ def initialize(records, date_line)
11
+ @date_line = date_line
12
+ self.records = records
13
+ end
14
+
15
+ def records=(records)
16
+ records = records.map{|r| StateRecord.create(r)}
17
+ min_time = records.select{|j| j.time}.map(&:time).sort.first
18
+ @states = records.map{|j| State.new(j.elapsed_time, j, self)}
19
+
20
+ # time
21
+ if min_time
22
+ @states.each {|s|
23
+ if s.record.time
24
+ s.elapsed_time = (s.record.time - min_time).to_i
25
+ s.time = s.record.time
26
+ else
27
+ #s.elapsed_time = s.record.elapsed_time
28
+ s.time = min_time + s.record.elapsed_time
29
+ end
30
+ }
31
+ end
32
+
33
+ @states = @states.sort{|a,b| a.elapsed_time<=>b.elapsed_time}
34
+
35
+ # day_offset
36
+ t = @states.first&.time
37
+ @day_offset = 0
38
+ if t
39
+ @day_offset = t - Time.mktime(t.year, t.month, t.day)
40
+ end
41
+ @day_offset += ((24 - @date_line) % 24) * HOUR
42
+
43
+ # day_label
44
+ @states.each {|s|
45
+ s.day_label = s.day + 1
46
+ }
47
+
48
+ # mark hash
49
+ @hash = {}
50
+ @states.select{|s| s.record.mark}.each {|s|
51
+ @hash[s.record.mark] = s
52
+ }
53
+ end
54
+
55
+ def days
56
+ ((@states.last.elapsed_time_with_offset.to_f + 1) / DAY).ceil
57
+ end
58
+
59
+ def day_labels
60
+ days.times.map(&:succ)
61
+ end
62
+
63
+ def [](mark)
64
+ @hash[mark]
65
+ end
66
+
67
+ def states
68
+ @states.clone.freeze
69
+ end
70
+
71
+ def each(&block)
72
+ @states.each(&block)
73
+ end
74
+
75
+ def self.create(records, date_line: 0)
76
+ if Base===records
77
+ records
78
+ else
79
+ builder.add(records).date_line(date_line).build
80
+ end
81
+ end
82
+
83
+ def self.builder
84
+ Builder.new(self)
85
+ end
86
+ end
87
+ end
88
+ end