daru 0.1.5 → 0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (106) hide show
  1. checksums.yaml +5 -5
  2. data/.github/ISSUE_TEMPLATE.md +18 -0
  3. data/.gitignore +1 -0
  4. data/.rubocop.yml +21 -7
  5. data/.travis.yml +10 -5
  6. data/CONTRIBUTING.md +15 -10
  7. data/History.md +124 -2
  8. data/README.md +37 -9
  9. data/ReleasePolicy.md +20 -0
  10. data/benchmarks/db_loading.rb +34 -0
  11. data/benchmarks/statistics.rb +6 -6
  12. data/benchmarks/where_clause.rb +1 -1
  13. data/benchmarks/where_vs_filter.rb +1 -1
  14. data/daru.gemspec +17 -41
  15. data/lib/daru.rb +10 -13
  16. data/lib/daru/accessors/gsl_wrapper.rb +1 -1
  17. data/lib/daru/accessors/nmatrix_wrapper.rb +2 -0
  18. data/lib/daru/category.rb +29 -15
  19. data/lib/daru/configuration.rb +34 -0
  20. data/lib/daru/core/group_by.rb +158 -77
  21. data/lib/daru/core/merge.rb +12 -3
  22. data/lib/daru/core/query.rb +20 -4
  23. data/lib/daru/dataframe.rb +692 -118
  24. data/lib/daru/date_time/index.rb +14 -11
  25. data/lib/daru/date_time/offsets.rb +9 -1
  26. data/lib/daru/extensions/which_dsl.rb +55 -0
  27. data/lib/daru/formatters/table.rb +3 -5
  28. data/lib/daru/index/categorical_index.rb +4 -4
  29. data/lib/daru/index/index.rb +131 -42
  30. data/lib/daru/index/multi_index.rb +118 -10
  31. data/lib/daru/io/csv/converters.rb +21 -0
  32. data/lib/daru/io/io.rb +105 -33
  33. data/lib/daru/io/sql_data_source.rb +10 -0
  34. data/lib/daru/iruby/templates/dataframe.html.erb +4 -51
  35. data/lib/daru/iruby/templates/dataframe_mi.html.erb +3 -56
  36. data/lib/daru/iruby/templates/dataframe_mi_tbody.html.erb +35 -0
  37. data/lib/daru/iruby/templates/dataframe_mi_thead.html.erb +21 -0
  38. data/lib/daru/iruby/templates/dataframe_tbody.html.erb +28 -0
  39. data/lib/daru/iruby/templates/dataframe_thead.html.erb +21 -0
  40. data/lib/daru/iruby/templates/vector.html.erb +3 -25
  41. data/lib/daru/iruby/templates/vector_mi.html.erb +3 -34
  42. data/lib/daru/iruby/templates/vector_mi_tbody.html.erb +26 -0
  43. data/lib/daru/iruby/templates/vector_mi_thead.html.erb +8 -0
  44. data/lib/daru/iruby/templates/vector_tbody.html.erb +17 -0
  45. data/lib/daru/iruby/templates/vector_thead.html.erb +8 -0
  46. data/lib/daru/maths/arithmetic/vector.rb +38 -2
  47. data/lib/daru/maths/statistics/dataframe.rb +28 -30
  48. data/lib/daru/maths/statistics/vector.rb +295 -41
  49. data/lib/daru/plotting/gruff/dataframe.rb +13 -15
  50. data/lib/daru/plotting/nyaplot/category.rb +1 -1
  51. data/lib/daru/plotting/nyaplot/dataframe.rb +15 -4
  52. data/lib/daru/plotting/nyaplot/vector.rb +1 -2
  53. data/lib/daru/vector.rb +308 -96
  54. data/lib/daru/version.rb +1 -1
  55. data/profile/vector_new.rb +9 -0
  56. data/spec/accessors/gsl_wrapper_spec.rb +38 -35
  57. data/spec/accessors/nmatrix_wrapper_spec.rb +25 -22
  58. data/spec/category_spec.rb +24 -20
  59. data/spec/core/group_by_spec.rb +238 -4
  60. data/spec/core/merge_spec.rb +1 -1
  61. data/spec/core/query_spec.rb +65 -50
  62. data/spec/daru_spec.rb +22 -0
  63. data/spec/dataframe_spec.rb +473 -16
  64. data/spec/date_time/date_time_index_helper_spec.rb +72 -0
  65. data/spec/date_time/index_spec.rb +34 -16
  66. data/spec/date_time/offsets_spec.rb +14 -0
  67. data/spec/extensions/rserve_spec.rb +1 -1
  68. data/spec/extensions/which_dsl_spec.rb +38 -0
  69. data/spec/fixtures/boolean_converter_test.csv +5 -0
  70. data/spec/fixtures/duplicates.csv +32 -0
  71. data/spec/fixtures/eciresults.html +394 -0
  72. data/spec/fixtures/empty_rows_test.csv +17 -0
  73. data/spec/fixtures/macau.html +3691 -0
  74. data/spec/fixtures/macd_data.csv +150 -0
  75. data/spec/fixtures/matrix_test.csv +55 -55
  76. data/spec/fixtures/moneycontrol.html +6812 -0
  77. data/spec/fixtures/string_converter_test.csv +5 -0
  78. data/spec/fixtures/test_xls.xls +0 -0
  79. data/spec/fixtures/test_xls_2.xls +0 -0
  80. data/spec/fixtures/url_test.txt~ +0 -0
  81. data/spec/fixtures/valid_markup.html +62 -0
  82. data/spec/fixtures/wiki_climate.html +1243 -0
  83. data/spec/fixtures/wiki_table_info.html +631 -0
  84. data/spec/formatters/table_formatter_spec.rb +29 -0
  85. data/spec/index/categorical_index_spec.rb +33 -33
  86. data/spec/index/index_spec.rb +160 -41
  87. data/spec/index/multi_index_spec.rb +143 -33
  88. data/spec/io/io_spec.rb +246 -2
  89. data/spec/io/sql_data_source_spec.rb +31 -41
  90. data/spec/iruby/dataframe_spec.rb +17 -19
  91. data/spec/iruby/vector_spec.rb +26 -28
  92. data/spec/maths/arithmetic/dataframe_spec.rb +1 -1
  93. data/spec/maths/arithmetic/vector_spec.rb +18 -0
  94. data/spec/maths/statistics/vector_spec.rb +153 -15
  95. data/spec/plotting/gruff/category_spec.rb +3 -3
  96. data/spec/plotting/gruff/dataframe_spec.rb +14 -4
  97. data/spec/plotting/gruff/vector_spec.rb +9 -9
  98. data/spec/plotting/nyaplot/category_spec.rb +5 -9
  99. data/spec/plotting/nyaplot/dataframe_spec.rb +95 -47
  100. data/spec/plotting/nyaplot/vector_spec.rb +5 -11
  101. data/spec/shared/vector_display_spec.rb +12 -14
  102. data/spec/spec_helper.rb +30 -7
  103. data/spec/support/matchers.rb +5 -0
  104. data/spec/vector_spec.rb +306 -72
  105. metadata +96 -55
  106. data/spec/fixtures/stock_data.csv +0 -500
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: b584977ade16d5cfbd3bdd9da7202bbc2adae894
4
- data.tar.gz: 3de8ef80fc55c91c0f504543fda1f23b40b4db6b
2
+ SHA256:
3
+ metadata.gz: 264a0549062a2c6b062f8c031b4e03524fd1bd852d59927a54722e8b8e68a2e8
4
+ data.tar.gz: 2dee6ded3fb009045a6ef13203c8ebe4251458e64b3e41a737b8bc04d4d0b91f
5
5
  SHA512:
6
- metadata.gz: 3f498f5caa4dbc14c2ca884c45492e474442d3f067ecf673a0235f01ec1781bb96c6f6e764006dcbf349a68ea011ccd977d69fdeb324a202ffa4fc5351a3a7b9
7
- data.tar.gz: d209e60b566e0e900d9c62fca6a1fb9023cd09cd81194e9b331c59682f557d8917ca347978bd4ed9b614c8d1ba441126211f3dc15a691752733f5dca0200be5d
6
+ metadata.gz: 1cb5cf9a2aa1660e9cd0d0a286af6d3dcbe987b5001f15a90e5b89394c36fdaedd8e29e742f591c36de64e61363ba66ceff8ae9f075c2ce1a4352a56584b4c24
7
+ data.tar.gz: 8e3d5843f871c0fba685430e27ff91090db4873da8edbfe2d1095b12a24a06dcda7ae1b198b9a3f7fcc013aeb757560088bcbb507a70ece4a4976eda63094cd8
@@ -0,0 +1,18 @@
1
+ Heya! We are glad you are going to contribute to Daru by creating an issue, and kindly ask you to
2
+ follow the simple rules:
3
+
4
+ 1. If it is a bug report, please provide a **self-containing** Ruby code for reproducing the bug.
5
+ This means if Daru contributors just copy-paste the code from issue into `this-is-bug.rb` and run
6
+ `ruby this-is-bug.rb`, it will be reproduced. If the bug is hard to spot (e.g. it is not some
7
+ `NoMethodError`, but the differences in data structure), please show it with comment in code or
8
+ plain text in the issue.
9
+ 2. If it is a feature request, try to do the following (if possible):
10
+ * show how new feature will work with small code example;
11
+ * explain the use case (if it is not 200% obvious);
12
+ * if you are aware of it, show how it works in pandas and/or R.
13
+ 3. If it is just a question ("how to do this or that" or "why Daru does this or that") feel free to
14
+ write it in any form that is convenient to you, but remember code examples and use cases are always
15
+ welcome.
16
+
17
+ Thanks! And please remove this text when finished with your issue description :)
18
+
data/.gitignore CHANGED
@@ -6,3 +6,4 @@ doc/
6
6
  vendor/
7
7
  profile/out/
8
8
  coverage/
9
+ .ruby-version
@@ -2,17 +2,22 @@ AllCops:
2
2
  Include:
3
3
  - 'lib/**/*'
4
4
  Exclude:
5
+ - 'daru.gemspec'
6
+ - 'Rakefile'
7
+ - 'Gemfile'
8
+ - 'Guardfile'
5
9
  - '**/*.erb'
6
10
  - 'spec/*'
7
11
  - 'spec/**/*'
8
12
  - 'vendor/**/*'
9
13
  - 'benchmarks/*'
10
14
  - 'profile/*'
15
+ - 'tmp/*'
11
16
  DisplayCopNames: true
12
17
  TargetRubyVersion: 2.0
13
18
 
14
19
  # Preferred codebase style ---------------------------------------------
15
- Style/ExtraSpacing:
20
+ Layout/ExtraSpacing:
16
21
  AllowForAlignment: true
17
22
 
18
23
  Style/FormatString:
@@ -21,16 +26,16 @@ Style/FormatString:
21
26
  Style/AndOr:
22
27
  EnforcedStyle: conditionals
23
28
 
24
- Style/SpaceAroundEqualsInParameterDefault:
29
+ Layout/SpaceAroundEqualsInParameterDefault:
25
30
  EnforcedStyle: no_space
26
31
 
27
- Style/SpaceInsideBlockBraces:
32
+ Layout/SpaceInsideBlockBraces:
28
33
  EnforcedStyle: space
29
34
 
30
- Style/SpaceInsideHashLiteralBraces:
35
+ Layout/SpaceInsideHashLiteralBraces:
31
36
  EnforcedStyle: no_space
32
37
 
33
- Style/AlignParameters:
38
+ Layout/AlignParameters:
34
39
  EnforcedStyle: with_fixed_indentation
35
40
 
36
41
  Style/EmptyElse:
@@ -57,10 +62,10 @@ Style/SingleLineBlockParams:
57
62
  Style/PerlBackrefs:
58
63
  Enabled: false
59
64
 
60
- Style/SpaceAfterComma:
65
+ Layout/SpaceAfterComma:
61
66
  Enabled: false
62
67
 
63
- Style/SpaceAroundOperators:
68
+ Layout/SpaceAroundOperators:
64
69
  Enabled: false
65
70
 
66
71
  Style/EmptyCaseCondition:
@@ -69,6 +74,15 @@ Style/EmptyCaseCondition:
69
74
  Style/MultilineBlockChain:
70
75
  Enabled: false
71
76
 
77
+ # See https://github.com/bbatsov/rubocop/issues/4429
78
+ Style/YodaCondition:
79
+ Enabled: false
80
+
81
+ Style/PercentLiteralDelimiters:
82
+ PreferredDelimiters:
83
+ '%i': '[]'
84
+ '%w': '[]'
85
+
72
86
  # Neither of prefered styles are good enough :(
73
87
  Style/BlockDelimiters:
74
88
  Enabled: false
@@ -2,19 +2,24 @@ language:
2
2
  ruby
3
3
 
4
4
  rvm:
5
- - '2.0'
6
- - '2.1'
7
- - '2.2'
8
- - '2.3.0'
9
- - '2.4.0'
5
+ - '2.5.1'
6
+ - '2.7.1'
10
7
 
11
8
  matrix:
9
+ allow_failures:
10
+ - rvm: '2.0'
12
11
  fast_finish:
13
12
  true
14
13
 
14
+ env:
15
+ - DARU_TEST_NMATRIX=1 DARU_TEST_GSL=1
16
+
15
17
  script:
18
+ - bundle add yard-junk
19
+ - bundle install
16
20
  - bundle exec rspec
17
21
  - bundle exec rubocop
22
+ - bundle exec yard-junk
18
23
 
19
24
  install:
20
25
  - gem install bundler
@@ -6,15 +6,18 @@ Either nmatrix or rb-gsl are NOT NECESSARY for using daru. They are just require
6
6
 
7
7
  To install dependencies, execute the following commands:
8
8
 
9
- * `sudo apt-get update -qq`
10
- * `sudo apt-get install -y libgsl0-dev r-base r-base-dev`
11
- * `sudo Rscript -e "install.packages(c('Rserve','irr'),,'http://cran.us.r-project.org')"`
12
- * `sudo apt-get install libmagickwand-dev imagemagick`
13
-
14
-
15
- Then install remaining dependencies:
16
-
17
- `bundle install`
9
+ ``` bash
10
+ sudo apt-get update -qq
11
+ sudo apt-get install -y libgsl0-dev r-base r-base-dev
12
+ sudo Rscript -e "install.packages(c('Rserve','irr'),,'http://cran.us.r-project.org')"
13
+ sudo apt-get install libmagickwand-dev imagemagick
14
+ export DARU_TEST_NMATRIX=1 # for running nmatrix tests.
15
+ export DARU_TEST_GSL=1 # for running rb-GSL tests.
16
+ bundle install
17
+ ```
18
+ You don't need `DARU_TEST_NMATRIX` or `DARU_TEST_GSL` if you don't want to make changes
19
+ to those parts of the code. However, they will be set in CI and will raise a test failure
20
+ if something goes wrong.
18
21
 
19
22
  And run the test suite (should be all green with pending tests):
20
23
 
@@ -22,16 +25,18 @@ And run the test suite (should be all green with pending tests):
22
25
 
23
26
  If you have problems installing nmatrix, please consult the [nmatrix installation wiki](https://github.com/SciRuby/nmatrix/wiki/Installation) or the [mailing list](https://groups.google.com/forum/#!forum/sciruby-dev).
24
27
 
28
+
25
29
  While preparing your pull requests, don't forget to check your code with Rubocop:
26
30
 
27
31
  `bundle exec rubocop`
28
32
 
29
33
  [Optional] Install all Ruby versions which Daru currently supports with `rake spec setup`.
30
34
 
35
+
31
36
  ## Basic Development Flow
32
37
 
33
38
  1. Create a new branch with `git checkout -b <branch_name>`.
34
- 2. Make your changes.
39
+ 2. Make your changes. Write tests covering every case how your feature will be used. If creating new files for tests, refer to the 'Testing' section [below](#Testing).
35
40
  3. Try out these changes with `rake pry`.
36
41
  4. Run the test suite with `rake spec`. (Alternatively you can use `guard` as described [here](https://github.com/SciRuby/daru/blob/master/CONTRIBUTING.md#testing). Also run Rubocop coding style guidelines with `rake cop`.
37
42
  5. Commit the changes with `git commit -am "briefly describe what you did"` and submit pull request.
data/History.md CHANGED
@@ -1,3 +1,125 @@
1
+ # 0.3 (30 May 2020)
2
+ * Major Enhacements
3
+ - Remove official support for Ruby < 2.5.1. Now we only test with 2.5.1 and 2.7.1. (@v0dro)
4
+ - Make nmatrix and gsl optional dependencies for testing. (@v0dro)
5
+ - Update sqlite, activerecord, nokogiri, packable, rake dependencies. (@v0dro)
6
+ - Remove runtime dependency on backports. (@v0dro)
7
+ - Add `Daru::Vector#match and Daru::Vector#apply_where` methods (@athityakumar).
8
+ - Add support for options to the `Daru` module. Adds a separate module `Daru::Configuration` that
9
+ can hold data for overall configuration of daru's execution. (@kojix2)
10
+ * Minor Enhancements
11
+ - Add new `DataFrame#insert_vector` method. (@cyrillefr)
12
+ - Add `Vector#last`. (@kojix2)
13
+ - Add `DataFrame#rename_vectors!`. (@neumanrq)
14
+ - Refactor `GroupBy#apply_method`. (@paisible-wanderer)
15
+ - Auto-adjust header parameters when printing to terminal. (@ncs1)
16
+ - Infer offsets of timeseries automatically when they are a natural number multiple of seconds. (@jpaulgs)
17
+
18
+ # 0.2.2 (8 August 2019)
19
+
20
+ * Minor Enhancements
21
+ - DataFrame#set_index can take column name array, which results in multi-index https://github.com/SciRuby/daru/pull/471 (by @Yuki-Inoue)
22
+ - implements DataFrame#reset_index https://github.com/SciRuby/daru/pull/473 (by @Yuki-Inoue)
23
+ - Make DataFrame.from_activerecord faster https://github.com/SciRuby/daru/pull/464 (by @paisible-wanderer )
24
+ - Added access_row_tuples_by_indexs method https://github.com/SciRuby/daru/pull/463 (by @Prakriti-nith )
25
+
26
+ * Fixes
27
+ - Fix reindex vector on argument error https://github.com/SciRuby/daru/pull/470 (by @Yuki-Inoue)
28
+ - Optimize aggregation https://github.com/SciRuby/daru/pull/464 (by @paisible-wanderer)
29
+ - Index#dup should copy reference to name too https://github.com/SciRuby/daru/pull/477 (by @Yuki-Inoue)
30
+ - Should support bundler version 2.x.x https://github.com/SciRuby/daru/pull/483/ (by @Shekharrajak )
31
+ - fix table style https://github.com/SciRuby/daru/pull/489 (by @kojix2 )
32
+
33
+ # 0.2.1 (02 July 2018)
34
+
35
+ * Minor Enhancements
36
+ - Allow pasing singular Symbol to CSV converters option (@takkanm)
37
+ - Support calling GroupBy#each_group w/o blocks (@hibariya)
38
+ - Refactor grouping and aggregation (@paisible-wanderer)
39
+ - Add String Converter to Daru::IO::CSV::CONVERTERS (@takkanm)
40
+ - Fix annoying missing libraries warning
41
+ - Remove post-install message (nice yet useless)
42
+
43
+ * Fixes
44
+ - Fix group_by for DataFrame with single row (@baarkerlounger)
45
+ - `#rolling_fillna!` bugfixes on `Daru::Vector` and `Daru::DataFrame` (@mhammiche)
46
+ - Fixes `#include?` on multiindex (@rohitner)
47
+
48
+ # 0.2.0 (31 October 2017)
49
+ * Major Enhancements
50
+ - Add `DataFrame#which` query DSL (experimental! @rainchen)
51
+ - Add `DataFrame/Vector#rolling_fillna` (@baarkerlounger)
52
+ - Add `GroupBy#aggregate` (@shekharrajak)
53
+ - Add `DataFrame#uniq` (@baarkerlounger)
54
+
55
+ * Minor Enhancements
56
+ - Allow `Vector#count` to be called without param for category type Vector (@rainchen)
57
+ - Add option to `DataFrame#vector_sum` to skip nils (@parthm)
58
+ - Add installation instructions to README.md (@koishimasato)
59
+ - Add release policy documentation (@baarkerlounger)
60
+ - Set index as DataFrame's default x axis for nyaplot (@matugm)
61
+
62
+ * Fixes
63
+ - Fix `DataFrame/Vector#to_s` when name is a symbol (@baarkerlounger)
64
+ - Force `Vector#proportions` to return float (@rainchen)
65
+ - `DataFrame#new` creates empty DataFrame when given empty hash (@parthm)
66
+ - Remove unnecessary backports dependencies (@zverok)
67
+ - Specify minimum packable dependency (@zverok)
68
+ - Preserve key/column order when creating DataFrame from hash (@baarkerlounger)
69
+ - Fix `DataFrame#add_row` for DF with multi-index (@zverok)
70
+ - Fix `Vector#min, `#max`, `#index_of_min`, `#index_of_max` (0.1.6 regression) (@athityakumar)
71
+ - Integrate yard-junk into CI (@rohitner)
72
+ - Remove Travis spec restriction (@zverok)
73
+ - Fix tuple sorting for DataFrames with nils (@baarkerlounger)
74
+ - Fix merge on index dropping default index (@rohitner)
75
+
76
+ # 0.1.6 (04 August 2017)
77
+ * Major Enhancements
78
+ - Add support for reading HTML tables into DataFrames (@athityakumar)
79
+ - Add support for importing remote CSVs (@athityakumar, @anshuman23)
80
+ - Allow named indexes (@Shekharrajak)
81
+ - DataFrame GroupBy returns MultiIndex DataFrame (@Shekharrajak)
82
+ - Add new functions to Vector: max, min, index_of_max, index_of_min, max_by, min_by, index_of_max_by, index_of_min_by (@athityakumar)
83
+ - Add summary to DataFrame and Vector without reportbuilder (@ananyo2012)
84
+ - Add support for missing data for where clause (@athityakumar)
85
+
86
+ * Minor Enhancements
87
+ - Allow inserting or updating DataFrame vectors with single values (@baarkerlounger)
88
+ - Add a boolean converter to the CSV importer (@baarkerlounger)
89
+ - Fix documentation of replace_values method (@kojix2)
90
+ - Improve HTML table code of DataFrame and Vector (@Shekharrajak )
91
+ - Support CSV files with empty rows (@baarkerlounger)
92
+ - Better DataFrame and Vector to_s methods (@baarkerlounger)
93
+ - Add support for histogram to Vector moving average convergence-divergence (@parthm)
94
+ - Add support for negative arguments to Vector.lag (@parthm)
95
+ - Return Nyaplot instance instead of nil for Nyaplot Vector, Category and DataFrame (@Shekharrajak)
96
+ - Add global configurable error stream which allows error stream to be silenced (@sivagollapalli)
97
+ - Rubocop update and cleanup (@zverok)
98
+ - Improve performance of DataFrame covariance (@genya0407)
99
+ - Index [] to only take index value as argument (@ananyo2012)
100
+ - Better error raised when Vector is missing from DataFrame (@sivagollapalli)
101
+ - Add default order for DataFrame (@athityakumar)
102
+ - Add is_values to Index (@Shekharrajak)
103
+ - Improve spec style in IO/SQL data source spec (@dshvimer)
104
+ - Open SQLite databases by bath (@dshvimer)
105
+ - Remove unnecessary whitespace (@Shekharrajak)
106
+ - Remove the .svg from Travis CI build link (@athityakumar)
107
+ - Fix Travis CI icon in README (@athityakumar)
108
+ - Replace is_nil?, not_nil? with is_values (@lokeshh)
109
+ - Update contributing documentation (@v0dro)
110
+
111
+ * Fixes
112
+ - Fix missing axis labels for categorized scatter plot with Gruff (@xprazak2)
113
+ - Fix NMatrix Vector initialization when Vector has nils and no nm_type is given (@baarkerlounger)
114
+ - Fix head/tail methods on DataFrames with DateTime indexes and on Vector_at splat calls (@baarkerlounger)
115
+ - Fix empty DateTime Index (@zverok)
116
+ - Fix where clause when data contains missing/undefined values (@Shekharrajak)
117
+ - Fix apply_scalar_operator spec (@athityakumar)
118
+ - Change nil check to respond_to operator check for apply_scalar_operator (@athityakumar)
119
+ - Make where compatible with is_values (@athityakumar)
120
+ - Fix vector is_values method (@athityakumar)
121
+
122
+
1
123
  # 0.1.5 (30 January 2017)
2
124
  * Major Enhancements
3
125
  - Add Daru::Vector#group_by (@lokeshh).
@@ -19,14 +141,14 @@
19
141
  - `DataFrame#access_row` with integer index. (Yusuke Sangenya)
20
142
  - Add method alias for comparison operator. (Yusuke Sangenya)
21
143
  - Update Nokogiri version. (Yusuke Sangenya)
22
- - Return `Daru::Vector` for multiple modal values for `Daru::Vector#mode`. (baarkerlounger)
144
+ - Return `Daru::Vector` for multiple modal values for `Daru::Vector#mode`. (@baarkerlounger)
23
145
 
24
146
  * Fixes
25
147
  - Fix many to one joins. The prior version was shifting values in the left dataframe before checking whether values in the right dataframe should be shifted. They both need to be checked at the same time before shifting either. (@gnilrets)
26
148
  - Support formatting empty dataframes. They were returning an error before. (@gnilrets)
27
149
  - method_missing in Daru::DataFrame would not detect the correct vector if it was a String. Fixed that. (@lokeshh)
28
150
  - Fix docs of contrast_code to specify that the default value is false. (@v0dro)
29
- - Fix occurence of SystemStackError due to faulty arguement passing to Array#values_at. (@v0dro)
151
+ - Fix occurence of SystemStackError due to faulty argument passing to Array#values_at. (@v0dro)
30
152
  - Fix `DataFrame#pivot_table` regression that raised an ArgumentError if the `:index` option was not specified. (@zverok)
31
153
  - Fix `DateFrame.rows` to accept empty argument. (@zverok)
32
154
  - Fix bug with false values on dataframe create. DataFrame from an Array of hashes wasn't being created properly when some of the values were `false`. (@gnilrets)
data/README.md CHANGED
@@ -1,14 +1,35 @@
1
1
  # daru - Data Analysis in RUby
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/daru.svg)](http://badge.fury.io/rb/daru)
4
- [![Build Status](https://travis-ci.org/v0dro/daru.svg)](https://travis-ci.org/v0dro/daru)
4
+ [![Build Status](https://travis-ci.org/SciRuby/daru.svg?branch=master)](https://travis-ci.org/SciRuby/daru)
5
5
  [![Gitter](https://badges.gitter.im/v0dro/daru.svg)](https://gitter.im/v0dro/daru?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
6
+ [![Open Source Helpers](https://www.codetriage.com/sciruby/daru/badges/users.svg)](https://www.codetriage.com/sciruby/daru)
6
7
 
7
8
  ## Introduction
8
9
 
9
10
  daru (Data Analysis in RUby) is a library for storage, analysis, manipulation and visualization of data in Ruby.
10
11
 
11
- daru makes it easy and intuitive to process data predominantly through 2 data structures: `Daru::DataFrame` and `Daru::Vector`. Written in pure Ruby works with all ruby implementations. Tested with MRI 2.0, 2.1, 2.2 and 2.3.
12
+ daru makes it easy and intuitive to process data predominantly through 2 data structures:
13
+ `Daru::DataFrame` and `Daru::Vector`. Written in pure Ruby works with all ruby implementations.
14
+ Tested with MRI 2.5.1 and 2.7.1.
15
+
16
+ ## daru plugin gems
17
+
18
+ - **[daru-view](https://github.com/SciRuby/daru-view)**
19
+
20
+ daru-view is for easy and interactive plotting in web application & IRuby
21
+ notebook. It can work in any Ruby web application frameworks like Rails, Sinatra, Nanoc and hopefully in others too.
22
+
23
+ Articles/Blogs, that summarize powerful features of daru-view:
24
+
25
+ * [GSoC 2017 daru-view](http://sciruby.com/blog/2017/09/01/gsoc-2017-data-visualization-using-daru-view/)
26
+ * [GSoC 2018 Progress Report](https://github.com/SciRuby/daru-view/wiki/GSoC-2018---Progress-Report)
27
+ * [HighCharts Official blog post regarding daru-view](https://www.highcharts.com/blog/post/i-am-ruby-developer-how-can-i-use-highcharts/)
28
+
29
+ - **[daru-io](https://github.com/SciRuby/daru-io)**
30
+
31
+ This gem extends support for many Import and Export methods of `Daru::DataFrame`. This gem is intended to help Rubyists who are into Data Analysis or Web Development, by serving as a general purpose conversion library that takes input in one format (say, JSON) and converts it another format (say, Avro) while also making it incredibly easy to getting started on analyzing data with daru. One can read more in [SciRuby/blog/daru-io](http://sciruby.com/blog/2017/08/29/gsoc-2017-support-to-import-export-of-more-formats/).
32
+
12
33
 
13
34
  ## Features
14
35
 
@@ -26,6 +47,12 @@ daru makes it easy and intuitive to process data predominantly through 2 data st
26
47
  * Quickly reducing data with pivot tables for quick data summary.
27
48
  * Import and export data from and to Excel, CSV, SQL Databases, ActiveRecord and plain text files.
28
49
 
50
+ ## Installation
51
+
52
+ ```console
53
+ $ gem install daru
54
+ ```
55
+
29
56
  ## Notebooks
30
57
 
31
58
  #### Notebooks on most use cases
@@ -67,6 +94,7 @@ daru makes it easy and intuitive to process data predominantly through 2 data st
67
94
  * [Data Analysis in RUby: Basic data manipulation and plotting](http://v0dro.github.io/blog/2014/11/25/data-analysis-in-ruby-basic-data-manipulation-and-plotting/)
68
95
  * [Data Analysis in RUby: Splitting, sorting, aggregating data and data types](http://v0dro.github.io/blog/2015/02/24/data-analysis-in-ruby-part-2/)
69
96
  * [Finding and Combining data in daru](http://v0dro.github.io/blog/2015/08/03/finding-and-combining-data-in-daru/)
97
+ * [Introduction to analyzing datasets with daru library](http://gafur.me/2018/02/05/analysing-datasets-with-daru-library.html)
70
98
 
71
99
  ### Time series
72
100
 
@@ -75,9 +103,9 @@ daru makes it easy and intuitive to process data predominantly through 2 data st
75
103
 
76
104
  ### Categorical Data
77
105
 
78
- * [Categorical Index](http://lokeshh.github.io/blog/2016/06/14/categorical-index/)
79
- * [Categorical Data](http://lokeshh.github.io/blog/2016/06/21/categorical-data/)
80
- * [Visualization with Categorical Data](http://lokeshh.github.io/blog/2016/07/02/visualization/)
106
+ * [Categorical Index](http://lokeshh.github.io/gsoc2016/blog/2016/06/14/categorical-index/)
107
+ * [Categorical Data](http://lokeshh.github.io/gsoc2016/blog/2016/06/21/categorical-data/)
108
+ * [Visualization with Categorical Data](http://lokeshh.github.io/gsoc2016/blog/2016/07/02/visualization/)
81
109
 
82
110
  ## Basic Usage
83
111
 
@@ -168,7 +196,7 @@ data_frame.where(
168
196
  ```
169
197
  ![con1](images/con1.png)
170
198
 
171
- *Plotting*
199
+ *Plotting*
172
200
 
173
201
  Daru supports plotting of interactive graphs with [nyaplot](https://github.com/domitry/nyaplot). You can easily create a plot with the `#plot` method. Here we plot the gallons sold on the Y axis and name of the brand on the X axis in a bar graph.
174
202
  ``` ruby
@@ -186,17 +214,17 @@ In addition to nyaplot, daru also supports plotting out of the box with [gnuplot
186
214
 
187
215
  ## Documentation
188
216
 
189
- Docs can be found [here](https://rubygems.org/gems/daru).
217
+ Docs can be found [here](http://www.rubydoc.info/gems/daru).
190
218
 
191
219
  ## Contributing
192
220
 
193
221
  Pick a feature from the Roadmap or the issue tracker or think of your own and send me a Pull Request!
194
222
 
195
- For details see [CONTRIBUTING](https://github.com/v0dro/daru/blob/master/CONTRIBUTING.md).
223
+ For details see [CONTRIBUTING](https://github.com/SciRuby/daru/blob/master/CONTRIBUTING.md).
196
224
 
197
225
  ## Acknowledgements
198
226
 
199
- * Google and the Ruby Science Foundation for the Google Summer of Code 2016 grant for speed enhancements and implementation of support for categorical data. Special thanks to [@lokeshh](https://github.com/lokeshh), [@zverok](https://github.com/zverok) and [@agisga](https://github.com/agisga) for their efforts.
227
+ * Google and the Ruby Science Foundation for the Google Summer of Code 2016 grant for speed enhancements and implementation of support for categorical data. Special thanks to [@lokeshh](https://github.com/lokeshh), [@zverok](https://github.com/zverok) and [@agisga](https://github.com/agisga) for their efforts.
200
228
  * Google and the Ruby Science Foundation for the Google Summer of Code 2015 grant for further developing daru and integrating it with other ruby gems.
201
229
  * Thank you [last.fm](http://www.last.fm/) for making user data accessible to the public.
202
230
 
@@ -0,0 +1,20 @@
1
+ # Gem Release Policy
2
+
3
+ Applicable to Daru > 0.1.6
4
+
5
+ ## Versioning
6
+
7
+ Daru follows semantic versioning whereby the version number is always in the form MAJOR.MINOR.PATCH
8
+
9
+ * Patch bump = Bug fixes
10
+ * Minor bump = New features but backwards compatible
11
+ * Major bump = API breaking changes
12
+
13
+ For Major and Minor bumps release candidates should be released around 2 weeks prior to the bump and are indicated by MAJOR.MINOR.0.rc.
14
+
15
+ For more information see the full semantic versioning specification at http://semver.org/.
16
+
17
+ ## Release Timing
18
+
19
+ Patch releases should be done after every fix of a major bug (as tagged in the github issue tracker).
20
+ Major releases should be kept to the minimum.