You can go to the Data tab to manage which event form data can be used by your dashboard’s widgets. You can add new data sources, remove data sources or edit the properties of existing data sources. Data sources can also be filtered by fields within the form - for example, the screenshot below shows a data source for all historical Daily Diary event records where Day Type is equal to Training.
Data sources are filtered the same way as in the Reports tool- that is, records which meet the field filter(s) will be loaded in the dashboard. Note that this is different to how widgets are filtered; for more information, refer to our article on Creating widget filters.
Adding a data source
You need to add an initial data source to get started on a new dashboard, but to add subsequent data sources, you can follow these steps.
- Click the Data tab.
- Use the + button in the sidebar to create a new data source.
- Choose the event form that will act as the data source.
- Select Continue. The dashboard will display the progress and success of the creation of the data source.
- Now you can view your data source and update its settings.
- The data source name will default to the same as the event form name that you’re sourcing the data from. You can adjust the name of the data source if needed. This has no impact on the name of the event form it references.
- Select a time period. This is a filter for which records are included in your data source. The options are:
- All History: all past records saved for this event form will be included in the data source. You can also choose whether to include today’s data.
- All future: all future records saved for this event form will be included in the data source. You can also choose whether to include today’s data.
- All history and future: all records saved for this event form will be included in the data source.
- Last: choose a number of past days, weeks, months or years to include records from. You can also choose whether to include today’s data.
- Next: choose a number of future days, weeks, months or years to include records from. You can also choose whether to include today’s data.
- Date Range: choose a start and end date for which records will be included.
- Today: only use records from the day the dashboard is being used.
- To filter the records included in the data source, use the + button next to Field filter. Select a form field in the dropdown menu, set the appropriate filter (string or number, depending on the field type) and type in the desired value. Remember to use the Enter key after entering the value.
- To create a new filter, use the + button next to Field filter again or hover over the filter and use the duplicate button on the right of the screen.
- To delete filters, hover over the filter and use the delete button on the right of the screen.
- Choose a record limit. This is the maximum number of records that will be included for each athlete from the time period you have selected in the previous step.
- Use the Dashboard tab to return to editing your dashboard.
Changing the event form referenced by a data source
In some circumstances, you might want to change the event form that a data source is referencing. For example, this could be because you’ve created an updated version of an old form, and don’t want to rebuild all your widgets to reference your new data source.
- Click the Data tab.
- Select the data source you want to change, and click change.
- Choose the event form you want to change the event to.
- Choose what you want to happen with fields for widgets and filters. This relates to how the dashboard builder will manage items that don’t have a matching field in the new event form.
- Reset fields that don’t exist in the new event page: any widgets or filters referencing a field that doesn’t exist in the new form will reset to the first field in the new form (alphabetically). You need to manually locate and reset the fields for these widgets and filters to work. Using this setting lets you publish your dashboard immediately, but affected items won’t work until they’ve been linked up to the appropriate field in the new form.
- Leave all fields unchanged, I’ll change them manually: any widgets or filters referencing a field that doesn’t exist in the new form will retain their original field, but will return an error message to let you know they don’t have a matching field in the new form. You won’t be able to publish your dashboard until you’ve linked all of the affected widgets and filters to fields in the new form, but this option makes it much easier to identify and amend the items that have been affected.
- Click Change to finalize the change of event forms for the data source. You will receive confirmation that the process is complete.
Enabling a data source to parse nested CSV data
Using this feature without consideration of the volume of data can impact a dashboard’s performance. It’s highly recommended that you speak to your Smartabase consultant before implementing a workflow using nested CSV data.
Some event forms are used to store CSV data related to metrics tracked over a period of time, such as speed or heart rate over a training session. A data source can be configured to identify a field containing nested CSV data so it can be referenced in your dashboard. Nested CSV data can be used in any widget and aggregated just like any other data stored in the form.
- Click the Data tab.
- Select the data source containing the nested CSV data.
- Select parse nested CSV data.
- You’ll then be able to choose the event form’s field that stores the CSV data and specify the fields (i.e. headers) included within the data.
- Each field needs to be entered on a new line for the dashboard builder to recognize them separately.
- Create a widget and choose the relevant field from your nested CSV data as the value. Fields from nested CSV data will be labelled with the format Field Name[CSV Field Name].
Displaying heart rate data from nested CSV data
Nested CSV data can be referenced in widgets just like any other data. We’ll go through two examples where we display the maximum heart rate across a session in a tile widget, and the heart rate over time in a time series chart widget.
- Add a tile widget from the widget library.
- Complete any required styling and labelling of the widget.
- Select the data source containing the nested CSV data. Add any widget filtering required – in this example, you would likely filter the tile based on the person, session or date range chosen in the dashboard’s select box or date picker widgets.
-
Select the appropriate nested CSV data field as the field (in this case, called Samples[Heart Rate]). Set the data type to Number, and the aggregation to Maximum.
- Save and publish your dashboard. When you load your dashboard on Smartabase, you’ll see the tile load with the maximum heart rate value for the data set based on the filters you’ve applied.
To visualize the heart rate across the entire session using a time series chart widget, you would follow a similar process to the tile above, with a couple of extra requirements:
-
- Set up your chart series:
- Set the series Field to Samples[Heart Rate].
- Set the Time field to Samples[Start Time].
- Apply the appropriate data filters based on your dashboard’s setup.
- Choose your aggregation – because only one heart rate data value exists for each point in time, the aggregation selected won’t make a difference. We’ve used get from most recent record.
- Apply the custom time input to the chart’s X-axis settings. Based on the CSV data, this will be %H:%M:%S. You can learn more about custom time settings in our article on time series chart widgets.
- Save and publish your dashboard. The time series chart will load with the rolling heart rate across the filtered session.
- Set up your chart series: