LP#1614237: Popularity badge seed data
authorKathy Lussier <klussier@masslnc.org>
Tue, 23 Aug 2016 20:01:35 +0000 (16:01 -0400)
committerMike Rylander <mrylander@gmail.com>
Wed, 24 Aug 2016 18:54:20 +0000 (14:54 -0400)
Adding popularity badge seed data for a badge based on Holds Requested over the
past 5 years.

Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/sql/Pg/950.data.seed-values.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.data.popularity-badge-seed-data.sql [new file with mode: 0644]
docs/RELEASE_NOTES_NEXT/OPAC/popularity-rating.txt

index b21fe2a..dbbbdde 100644 (file)
@@ -5129,6 +5129,10 @@ INSERT INTO actor.org_unit_setting (org_unit, name, value) VALUES (
     ,(1, 'circ.grace.extend', 'true')
 ;
 
+--220.schema.rating.sql (Default badge for popularity ranking)
+INSERT INTO rating.badge (name, description, scope, weight, horizon_age, importance_age, importance_interval, importance_scale, recalc_interval, popularity_parameter, percentile)
+  VALUES('Top Holds Over Last 5 Years', 'The top 97th percentile for holds requested over the past five years on all materials. More weight is given to holds requested over the last year, with importance decreasing for every year after that.', 1, 3, '5 years', '5 years', '1 year', 2, '1 day', 2, 97);
+
 
 -- Staged Search (for default matchpoints)
 INSERT INTO search.relevance_adjustment (field, bump_type, multiplier) VALUES(1, 'first_word', 1.5);
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.popularity-badge-seed-data.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.popularity-badge-seed-data.sql
new file mode 100644 (file)
index 0000000..61f9118
--- /dev/null
@@ -0,0 +1,8 @@
+BEGIN;
+
+-SELECT evergreen.upgrade_deps_block_check('xxxx', :eg_version);
+
+INSERT INTO rating.badge (name, description, scope, weight, horizon_age, importance_age, importance_interval, importance_scale, recalc_interval, popularity_parameter, percentile)
+   VALUES('Top Holds Over Last 5 Years', 'The top 97th percentile for holds requested over the past five years on all materials. More weight is given to holds requested over the last year, with importance decreasing for every year after that.', 1, 3, '5 years', '5 years', '1 year', 2, '1 day', 2, 97);
+
+COMMIT;
index 6383fd5..bd88ac8 100644 (file)
@@ -50,10 +50,13 @@ All popularity badge definitions will describe a set of configuration, populatio
 ** Bibliographic Record Age (days)
 ** Publication Age (days)
 ** Available On-Line (for e-books, etc)
+** Copy Count
 * *Fixed Rating:* An optional override supplying a fixed popularity value for all records earning this badge.  For some popularity types, such as "Available On-Line", it is preferable to specify, rather than calculate, the popularity value for a badge.  This is presented as a number spinner with a value ranging from 1 to 5.
 * *Inclusion Threshold Percentile:* Cumulative distribution percentile.  This is presented as a number spinner of "percentile" values ranging from 50 to 100, indicating the number of how much of the population a record's score must be better than in order to earn the badge.  Leaving this value unset will allow the entire population to earn the badge.
 * *Discard most common:* A value that, if greater than 0, will ignore records with extremely common values so that outliers are more readily identified, and the distribution of values can be assumed to be more normal.  Many popularity parameters, such as those for circulation counts, benefit from this input filter.  This is presented as a number spinner initially set to 0 that indicates the number of distinct, low values -- but not the values themselves -- to exclude from the population.
 
+This new feature comes with a starter badge based on the top 97th percentile of holds requested over the past five years.
+
 A word about Inclusion Threshold Percentile
 +++++++++++++++++++++++++++++++++++++++++++