Skip to main content
Version: 0.21.2

Guided Learning

Snapshots capture a session's datasets in a DataChat object. You can use snapshots to:

  • Capture a time slice of a live-updating data stream.
  • Re-use a dataset in a different session.
  • Share the datasets from a session with another user.
  • Update large datasets at convenient times from a database.

Load Datasets

  1. Open a new DataChat session.

  2. Load the "BikeShare dataset (Excel)" file from the DataChat Training directory.

    By default, new sessions open in Grid mode. Because "BikeShare.xlsx" includes multiple sheets, the "All Datasets" table opens as a popup. To adjust these settings, see Set default mode and Automatically enlarge charts and some tables in Grid Mode.

    The "All Datasets" table shows that the BikeShare.xlsx file contains three datasets: BikeShare, SeasonDecode, and WeatherDecode.

    BikeShare AllDatasets table

    Close the popup.

  3. Load the "worldcities_sample.csv" file. No popup appears, but we see that "worldcities_sample" is set to the current dataset it's highlighted in lighter blue and a "v1" shows next to the dataset name.

  4. Double-click on "Unnamed" next to the DataChat icon to rename the session. Let's call it "AllBike".

Combine "BikeShare.xlsx" Datasets

  1. Click "BikeShare" to set it as the current dataset.

  2. Click Plot to open the Chart Builder. By default, the form is set to show a scatter chart, but we can change the chart type by clicking on the icons along the top left of the form. Select:

    • chart type: Bar Chart
    • X-Axis: seasonCode
    • Y-Axis: casualRiders.

    BikeShare Chart Builder plot

  3. Click Submit to build the chart. We can see that seasonCode doesn't give us very much information, let alone an informative chart. Let's extend the BikeShare dataset with the other two datasets. Close the scatter chart popup.

  4. Click Dataset > Extend in the sidebar to open the Extend form.

    BikeShare Dataset Extend

    DataChat assesses whether the current dataset ("BikeShare") matches other dataset columns in the current session "BikeShare" and "SeasonDecode" share "seasonCode", and "BikeShare" and "WeatherDecode" share "weatherSituation". Note that "worldcities_sample" doesn't share any columns with "BikeShare".

    We want to extend on "seasonCode", so we'll click Submit, to accept the DataChat sentence shown at the bottom of the form, that corresponds to entering in the chat box:

    Extend the dataset BikeShare with the dataset SeasonDecode

    We can also click "specify column join key" and stipulate the columns explicitly.

    BikeShare Dataset Extend with column joins

    DataChat adds the "season" column to BikeShare and saves the new dataset as BikeShare_Extend.

    BikeShare Dataset

  5. Add "WeatherDecode" to "BikeShare_Extend". With "BikeShare_Extend" highlighted as the current dataset, click Dataset > Extend and select "Weather_Decode" as the dataset to extend with.

    By default, DataChat:

    • Identifies "weatherSituation" as equal in both datasets.
    • Adds the "weather" and "weatherDetails" columns to BikeShare_Extend.
    • Saves the new dataset as BikeShare_Extend_Extend.
  6. Click Plot to open the Chart Builder. Select:

    • chart type: Bar Chart
    • x-axis: season
    • y-axis: casualRiders
    • Optional Fields > Overlay: allRiders
    • Optional Fields > Slider: weatherDetails.

    BikeShare Chart Builder plot

    Click Submit to save the plot.

Save Snapshot

  1. Click Save in the sidebar, select "Snapshot", enter "AllBikeSnap", and click Submit.

    BikeShare AllDatasets table

    The chat box displays a success message.

    BikeShare chat box Snapshot Save success

    Only one snapshot can be saved per session, so if a snapshot of the same name existed, DataChat prompts you to overwrite or to save the snapshot to a new name. If another snapshot exists in the same session, it is overwritten with the new snapshot and the new name.

  2. Return to the homepage click the DataChat icon in the upper leftmost corner of the page.

Snapshot Editor

  1. Click Snapshots in the sidebar of the homepage and select "AllBikeSnap". Right-click to show the snapshot menu.

    Edit Snapshot

    Select Edit Snapshot.

    Edit Snapshot BikeShare

    The Snapshot Editor shows the DataChat sentences that are needed to build the datasets in the snapshot object. Note that the Plot sentences are not included they were trimmed because they don't affect the datasets. The yellow icon to the left of the snapshot name, "AllBikeSnap" shows that because the session was trimmed, the snapshot should be verified to ensure it works as expected.

  2. Hover to the left of the second line, to reveal the checkbox and select it.

    Edit Snapshot BikeShare select

    Let's remove the extraneous dataset we didn't use.

  3. Click Cut from the sidebar. The Load data from the file worldcities_sample.csv line is removed from the snapshot.

    If we changed our minds, we could undo our change with Cmd-Z on Mac and Ctrl-Z on Windows.

  4. Click Restart > Continuous to verify the snapshot. The remaining four steps will be tested in the window to the right, and a success message appears. Note that the yellow caution icon changes to a green check mark, to show that the snapshot is verified it can be pasted directly into a session, or used to start a new session.

    Edit Snapshot BikeShare verified

  5. Click Save from the sidebar to save the current state of the snapshot.

Use a Snapshot

Click the DataChat icon to return to the homepage and Snapshots. Double-click on the "AllBikeSnap" snapshot. A new session called "AllBikeSnap_1" opens, loading the datasets from the altered and saved snapshot "AllBikeSnap". We can generate new charts or work with the data in different ways than we had in the initial "AllBike" session, which is still available in Sessions from the homepage.