Akuko
Search…
Configuring your Data Source
Akuko makes it easy to create graphics and charts based on the results of a query. This page explains how to organize your source so it can be ready for use in your posts.

Dimensions, Measures, and Geometries

There are three main configuration parameters for an Akuko source: Dimensions, Measures, and Geometries.

Dimensions

Dimensions represent the attributes of the data. Think of a dimension as a column in your original tabular dataset. For example, if your data represents world cities , then the country, name, and population are all dimensions.
Not all dimensions are the same so it's important to understand the kind of data they represent. A text field is not the same as a numerical field or a geolocation because each can be aggregated in very different ways.
Akuko supports the following data types: string, number, boolean, geo, time.
    string. String is used to represent text data. Anything from names to paragraphs can be stored using this type. Strings can be of varying length and include capital letters and special characters
    number. Numbers are exactly as they sound. They can be both integers or floating-point numbers (think 5.6) and are interpreted by Akuko in a way that is distinct from text. This allows numbers to be used in aggregations, like sums and averages, which would result in errors with other data types.
    boolean. Booleans are true or false, binary representations of 1s and 0s with a very limited set of allowed values. They are useful for conditional logic and filtering.
    geo. Geolocation, or geo, is a spatial identifier used to display data on a map. Unlike other dimension types it requires to set two fields to be defined: latitude and longitude.
    time. In order to create time series charts, Akuko needs to identify the time dimension. Not all time data is extremely precise, you might only have the day of the year in one dataset while snapshots with minutes and seconds in another one. For ease of comparison, precise time values are inferred from all the data and stored as timestamp, with precision up to the millisecond.
When you create a source, Akuko automatically creates dimensions for you based on the data. Changing a dimension type to the appropriate one is a one-click process.

Measures

Measures are aggregations from your data, meaning they represent summary values that are not present in your original dataset but are the result of some calculation.
The simplest kinds of measures provide aggregations along a single dimension, and can be generated in the Measures tab of the Source panel, by clicking Add Measure and referencing the dimension name using a ${} notation.

Custom Measures

Behind the scenes, Akuko interacts with sources via SQL queries so the power of SQL is available to any analyst who's interested in using it. Beyond the standard Measure types, you can define your own custome measurre using the SQL parameter.

Geometries

Geometries are a specific way of interacting with the data that will be displayed on a map. We created a dedicated page explaining how to handle geometries here.

Formatting your data

Akuko needs to reference your data in a way that will allow the query engine to execute smoothly. For example, it pre-populates the dimensions panel using the colum names seen in the original dataset only after subsituting all uppercase letters with lowercase and replacing the spaces with underscores, so a field like Capital City will be loaded as capital_city.

Field labels

If you are not happy with the default naming, you can provide alternative labels that will be shown to the users in the posts. Labels are available both in the Dimensions and Measures pane and will propagate across all posts once you edit them.
See below how a field called average_population has been renamed Average Population and the total_population is renamed Total Population

Format

Showing data properly to a data consumer is also a challenge Akuko can help solve. Often data loaded as number is actually representing a currency or a percentage, or numbers too large may need appropriate definitions to be useful.
To aid in that challenge, you can style your data using the following style settings:
    Prefix . Characters displayed before your data.
    Format . A style definition to specify the number of floating points to be displayed if your data is not integer.
    Suffix. Characters displayed after your data.
In a real-life example, this is how a non-styled data might show in your table.
After some styling, we can remove the exponential notation, and add a $ and a k indicating that our GDP estimate is in thousands of US Dollars.

Query

You often will want to test if your data configuration is ready before using it in posts or making it available to other users of the platform. That's where the Query interface comes in.
To verify whether your setup is correct, select your dimension and measure of interest from the drop down on the left, then click Execute Query. You should see the result set of your query being returned on the right-hand pane as a JSON object.
Even though the text structure might seem arcane, you can still see if the data returned matches your expectations or not. Most importantly, a popup should come at the top of the screen confirming that your query was successful.

Labels and formatting

Last modified 6mo ago