Variables
Overview
Variables are present in all tables on Redivis. Conceptually, they represent something that is being measured in the data. When viewed in the table cells view, variables are represented by the table's columns.
In order to view variables, you must have metadata access the source dataset(s) for the given table.
Characteristics
The characteristics on a variable help researchers understand what that variable measures and how it was collected. All characteristics (except for variable type) are indexed by the Redivis search engine — better and accurate metadata will help researchers find your dataset!
These characteristics will only be considered in search results if the user has metadata access to the underlying dataset.
Field | Notes |
Name | The name of the variable, limited to 60 characters. Must be unique within the table. All variable names are case-insensitive, and can only use alpha-numeric characters and underscores, and cannot start with a number. |
Type | Required. The data type of the variable. Learn more about variable types. |
Label | Optional. A short, human-readable description of the variable name. Limited to 256 characters. |
Description | Optional. A longer space for notes about the variable's creation methods, coding, or supplementary information. Limited to 5000 characters. |
Value labels | Optional. A map of each value in the data to a longer string of information. For example, a variable with records |
Univariate statistics
Redivis automatically computes certain statistics for each variable, depending on that variable's type and number of distinct values. To view summary statistics, click on a variable in a table.
Statistic | Description |
Count | |
Distinct | The number of unique values in the table. Does not include null as a value. (For example, a variable with values 0, 1, and null will have a distinct of 2.) |
Non-null | The percentage of values in the table which are not null. Calculated by dividing the Count by the total number of records in the table. |
Min, max | For continuous variables (integer, float, date, dateTime, time): the minimum and maximum of this variable. For string variables: the minimum and maximum length of all values. |
Min lng, Min lat, Max lng, Max lat | For geography variables: the bounding box containing all geospatial data in a variable |
μ, σ | The mean and sample (unbiased) standard deviation of the variable. Only available for continuous variables (integer, float, date, dateTime, time). |
Univariate plots
Histogram
A frequency chart of observations, sorted into 64 buckets, clamped to three standard deviations of the mean on either side. To switch between a linear and logarithmic y-axis, click on the bottom left corner of the chart.
Only shown for continuous variables with more than 64 distinct values.
Box plot
A visual display of the distribution of values by frequency. Shown are the minimum, 25%, median, 75% and maximum value. To include or exclude outliers in the calculations, click on the label on the bottom left corner of the chart.
Only shown for continuous variables with a meaningful number of discrete values.
The box plot uses the APPROX_QUANTILES BigQuery method, which will estimate quantiles (±0.57%, 95% CI) for larger datasets. As such, the box plot values should only be used as an approximation.
Frequency table
A table showing the frequency of common values for that variable, limited to 10,000 values. If a variable's values are highly heterogenous, no frequency table will be displayed. You can right click on values to get a quick entry point to filter on that value in the query tab.
Map
A table with variable of type geography
shows a heatmap of the geospatial dispersion of that variable.
Editing metadata
To edit a variable's label, description, or value labels, click the Edit metadata button on the right of any table. This will allow you to any of the variables in this table, or you can navigate to the "All tables" tab to edit the same variable across multiple tables.
In the metadata editor, you can edit a variable's metadata fields as you would in any spreadsheet, and save changes when you're done.
When working in bulk, you can also upload metadata directly.
Exporting metadata
You can export your metadata at any time (in either of the above formats) by clicking Export file in the variable metadata editor. Variable metadata is also available in JSON format via the variables.list API endpoint.
Variable types
All variables in Redivis have a type associated with them. All types in Redivis support NULL
values; that is, an empty cell.
String
A string can be used to store any textual data (UTF-8 encoded). Moreover, a string is a "universal" data type — any other type can be converted to a string without error.
Size: 2 bytes + UTF-8 encoded string size (1 byte for ASCII characters).
Integer
A 64-bit signed integer. Supports any integer value between -9,223,372,036,854,775,808
and 9,223,372,036,854,775,807
.
Size: 8 bytes per cell.
Float
A 64-bit (double precision) floating point decimal value.
Size: 8 bytes per cell.
Boolean
A representation of either TRUE
or FALSE
Size: 1 byte per cell.
Date
Represents a calendar date independent of time zone. Supports any value between 0001-01-01
and 9999-12-31
Size: 8 bytes per cell
Format:
'YYYY-[M]M-[D]D'
YYYY
: Four digit year[M]M
: One or two digit month[D]D
: One or two digit day
All values in brackets are optional. If your Date is not in this format, you can convert it using format strings. Redivis will attempt to convert other common date formats on upload, when possible.
DateTime
Represents a year, month, day, hour, minute, second, and subsecond, independent of timezone. Supports any value between 0001-01-01 00:00:00
and 9999-12-31 23:59:59.999999
Size: 8 bytes per cell
Format:
YYYY
: Four digit year[M]M
: One or two digit month[D]D
: One or two digit day( |T)
: A space or aT
separator[H]H
: One or two digit hour (valid values from 00 to 23)[M]M
: One or two digit minutes (valid values from 00 to 59)[S]S
: One or two digit seconds (valid values from 00 to 59)[.DDDDDD]
: Up to six fractional digits (i.e. up to microsecond precision)
All values in brackets are optional. If your DateTime is not in this format, you can convert it using format strings. Redivis will attempt to convert other common datetime formats on upload, when possible.
Time
Represents a time, independent of a specific date. Supports values between 00:00:00
and 23:59:59.999999
Size: 8 bytes per cell
Format:
[H]H
: One or two digit hour (valid values from 00 to 23)[M]M
: One or two digit minutes (valid values from 00 to 59)[S]S
: One or two digit seconds (valid values from 00 to 59)[.DDDDDD]
: Up to six fractional digits (i.e. up to microsecond precision)
All values in brackets are optional. If your Time is not in this format, you can convert it using format strings. Redivis will attempt to convert other common time formats on upload, when possible.
Geography
Represents a Point, Multipoint, Linestring, MultiLinestring, Polygon, or MultiPolygon geometry, as specified by the GeoJSON standard.
You can create or manipulate geographic variables using various new variable methods.
Size: cell-content dependent
Format:
The WKT format is used to show cell values, though each geography cell can also be viewed on a map by clicking on that cell within a table.
Conversion rules
Some types can be implicitly converted within a query (e.g., 1 (integer) < 2.2 (float)
), in other circumstances, you will explicitly need to convert the type of a variable before performing certain operations (e.g., "1.0" (string) < 2.2 (float)
).
Variable types can be converted within the transform interface in a project. The following conversions are supported:
Integer | Float | Returns a close but potentially not exact FLOAT64 value. |
Integer | Boolean | Returns |
Float | Integer | Returns the closest INT64 value. Halfway cases such as 1.5 or -0.5 round away from zero. |
Float | String | Returns an approximate string representation. |
Date | DateTime | Returns a DateTime at midnight on the corresponding date. For example, if |
DateTime | Date | Returns the part of the DateTime which is the calendar date. Note that this will not round the DateTime to the nearest Date. E.g., if |
DateTime | Time | Returns the part of the DateTime which is the clock time. E.g., if |
Boolean | Integer | Returns |
Boolean | String | Returns |
String | Float | Returns |
String | Boolean | Returns |
String | Geography | Use |
Geography | String | Use |
Last updated