Abstract
A histogram is a representation of the distribution of numerical data. To construct a histogram, the first step is to "bin" the range of numerical values, i.e., to divide the entire range of numerical values into a series of intervals, and then to assign each numerical value to an interval. The second step is to normalize the relative area of the rectangle that represents each bin such that said areas are proportional to the number of numerical values (viz., frequency) of each bin. Histograms may be constructed for data that is stored in a database. For relational databases, such as PostgreSQL, an SQL statement is formulated such that the result of executing said SQL statement is the numerical data to be binned. Histograms may also be constructed for web applications whose data is stored within a database. Many such web applications are developed using a software framework, such as Ruby on Rails (RoR) for the Ruby programming language. In this case, the SQL statement is formulated as a side-effect of using the "Active Relation" relational algebra component that is exposes an object-oriented API. The invention is as follows: A plugin for the RoR web application development framework that leverages the "Active Relation" relational algebra component to automatically formulate SQL statements for the construction of histograms. The inventive features are as follows: SQL statements can be formulated by the invention for *any* numerical data that is managed by RoR. The utility of this feature is that, unlike prior art, the SQL statements may leverage the data management capabilities of RoR, such as access control. With this invention, the numerical data of the histogram may be limited to only the data that is visible and/or accessible to the end-user, e.g., for security reasons. SQL statements, formulated by the invention, are correct by construction. The utility of this feature is that, unlike prior art, the software developer does not write any SQL statements (an error-prone process). Instead, the SQL statements are automatically formulated. Configurable parameters for histogram, including: bin span, user-specified maximum and minimum cut-off values. The utility of this feature is that, unlike prior art, the software developer may specify the aspects of the histogram as well as the aspects of the numerical values. In this way, the subset of numerical values to be considered part of the histogram are user-specifiable.
Exploratory License
Eligible for exploratory license
Market Sector
Energy Production and Efficiency