Skip to content

PostgreSQL objects shared across the repositories of Central Statistical Bureau of Latvia.

Notifications You must be signed in to change notification settings

CSBLatvia/postgresql-common

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PostgreSQL objects shared across the repositories of Central Statistical Bureau of Latvia

role.sql - create roles.

Functions

get_pretty_number

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.

getbreaks_classes

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.

About

PostgreSQL objects shared across the repositories of Central Statistical Bureau of Latvia.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published