role.sql - create roles.
Returns more readable numbers.
pretty_numbers.sql - table with values required to execute the function.
get_pretty_number - function.
get_pretty_number_num_part - function that returns the numeric part of the result produced by the function get_pretty_number. Can be used to determine grammatical cases in Latvian.
Returns class breaks as intervals for choropleth maps, using the optimal number of classes (goodness of variance fit (GVF) value is at least the defined one (by default 0.95) or the specified maximum number of classes), computed using the R package classInt (fisher, maximum, equal, and quantile styles supported). By defining the threshold, it is possible to obtain class intervals for bipolar choropleth maps (below threshold, threshold, and above threshold returned).
getbreaks_classes.sql - function that returns class breaks as intervals. It uses helper function getbreaks_classes_vals.sql that transforms the class boundaries returned by the PL/R function depending on the classification style.
getbreaks.sql - PL/R function that returns class breaks. It is used by getbreaks_classes.sql.