Creating & editing datasets

Entries & fields

Datasets in Lively Logic are made up of a list of entries and a collection of fields.

Entries are like rows in a spreadsheet. If your dataset holds information about employees, then each entry represents a different employee; if it holds information about financial transactions, then each entry represents a different transaction.

Dataset fields, then, are like a spreadsheet’s columns. Each field represents a specific attribute of the entries. For example, in a dataset about employees, there may be fields for the employees’ first and last names, for their salaries or hourly wages, for the number of hours they’ve worked in the current pay period, and so on.

Viewing & editing datasets

If you have data in a CSV file, you can add it to your document by dragging the file into the window or by choosing File ▸ Import Dataset. Or you can create a dataset from scratch by clicking the + button in the dataset bar at the bottom of the window.

The dataset bar lists all the datasets in a document.

The dataset bar lists all the datasets in a document. You can view or edit a dataset by clicking its name in the dataset bar.

The dataset editor

The dataset editor has four panes: Properties, Fields, Entries, and Calculator.

Properties

The Properties pane

In the Properties pane, you can set the name of the dataset. Since your document might contain several datasets, it can help to give each one a short but descriptive title.

You can also make a note of the person, publication, or website from which you obtained the data. This can be useful if you want to cite the data’s source, or if you want to check the source again later to see if the data has been updated.

Fields

The Fields pane

In the Fields pane, you can modify the dataset’s fields. Click the + button to add a new field. Click the button and choose an existing field to delete it. You can rename a field by double-clicking the field’s name.

You can also enter “model” formulas that will be used to calculate data values in the field. For more about formulas, see the Formulas guide.

Entries

The Entries pane

The Entries pane displays all the dataset’s entries’ values in a table. Click the + or buttons to create a new entry or delete the selected entry or entries. To edit a value, double-click it and enter the new value. (You can use the Tab key to move the cursor to the next field.)

Any values that have been calculated from fields’ model formulas are shown in gray; values that have been entered directly are shown in black. Note that even if a field model is present, you can still enter your own values to override the calculated ones.

Calculator

The Calculator pane

In the Calculator pane, you can enter formulas to test field models or do one-off calculations like sums or averages. Enter a formula in the field at the bottom and press Return: the result is computed and added to the results list. Whenever the values in the dataset change, the calculations are automatically updated to show the new results.

Graphing the data

To learn how to create & customize charts, see the Charts guide.