Skip to the content.

Data Analysis with AI: From Dataset to Publication Figures

This tutorial walks you through using OpenCode to analyze the Palmer Penguins dataset and create visualizations.

What you’ll learn

Steps

  1. Download the “Palmer Penguins dataset” to your folder. This will be an example dataset to use: https://allisonhorst.github.io/palmerpenguins/. You can download the CSV directly from here

  2. Switch to Plan mode. This is a mode that won’t start to make things. It will ask you questions to help guide your progress.

  3. Use this prompt:

Make me some figures of the Palmer Penguins dataset attached. 
Output the figure in an Excel file.
  1. Interact with the Plan. For this example I replied that I want scatter plots comparing body measurements across penguin species. This is where you can influence what the model does. This is the major advantage over other chatbots.

  2. Change from Plan mode to Build mode and begin planned tasks by prompting it to begin (i.e. “yes”).

  3. If it gets stuck with an error, prompt complete analysis and it will continue working until the end.

Results

The Palmer Penguins dataset contains measurements for three penguin species (Adelie, Chinstrap, and Gentoo) from islands in the Palmer Archipelago, Antarctica. It includes features like bill length, bill depth, flipper length, and body mass.

Tips