Supported Data Formats

Many of the tasks that we want to achieve with Hupreter will naturally involve data. Currently, these are the formats in which you can input data to Hupreter:

List

A list is an ordered collection of values.

List of letters:

['Julia', 'Mike', 'Dan', 'Oliver', 'Eva']

List of numbers:

[1, 1, 2, 3, 5, 8, 13, 21, 34]

Example:

Select a random item from ['Julia', 'Mike', 'Dan', 'Oliver', 'Eva'].
Given the list [28, 27, 29, 19, 20, 21, 22, 23], calculate the median.

Dictionary or Map

A dictionary maps from keys to values. For example, the name of a person to their phone number, as show below:

{'Daniel': 7471564321, 'Monica': 7531243534, 'John': 555212212}

As you can see, it’s a collection of key-value pairs, separated by comma. The key comes first, then a colon, and then the value.

So ‘Daniel’ maps to 7471564321.

Set

Sets are similar to lists, but the values are not ordered and some operations are faster on sets. In terms of syntax, they are like lists but they use curly brackets, that is {…} instead of […].

Set of numbers:

{1, 1, 2, 3, 5, 8, 13, 21, 34}

Tables

You can upload .csv tables (.xslx coming soon) by using the upload-arrow button. The upload process stores the table as a variable which can be used as any other variable. Example:

Upload a table for Hupreter
Upload a table for Hupreter

As you can see, once the table is uploaded, Hupreter tells you the variable name with which you can use it. In the case, the name was ‘upl_nbaplayers21’. The prefix ‘upl_’ stands for uploaded. From that point on, you can visualize the data with charts or apply statistical functions to it.