Home

Vibe Coding in Python with Claude Code and Docker

You’ve written Python code by typing every line yourself. But what if you could describe what you want in plain English and watch the code appear? Vibe coding is like having a conversation with your computer—you describe the outcome, Claude Code builds it, you test and refine. It’s not magic; it’s a new way to work where you guide the vision and AI handles the implementation. This tutorial shows you how to analyze the classic Iris flower dataset using nothing but natural language requests.

Key Concepts

What You’ll Need

Step 1: Create New GitHub Repository

You now have a local Git repository and a backup on GitHub.

Step 2: Copy Docker Configuration

You need the .devcontainer folder from the vibe project to set up your Docker environment.

Your iris-analysis folder should now contain:

Step 3: Open Project in Container

Step 4: Start Claude Code

claude

Claude Code is now running and ready for your requests.

Step 5: First Vibe - Load the Data

Now the fun begins. Instead of looking up documentation, just describe what you want.

Load the iris dataset from scikit-learn. Convert it to a pandas dataframe with proper column names. Add the species names as a column (not just numbers). Show me the first 10 rows. Save the code to a file called iris_exploration.py

You just used vibe coding! No searching documentation, no trial and error—just describe and test.

Ask Claude to commit using Git. Or do this yourself from GitHub Desktop.

Commit these changes.

Step 6: Second Vibe - Summary Statistics

Before creating visualizations, understand what the data contains.

Show me summary statistics for the iris data grouped by species. I want to see the mean, min, and max for each measurement (sepal length, sepal width, petal length, petal width) for each of the three species. Add this to iris_exploration.py

This exploration helps you understand patterns in the data.

Ask Claude to commit using Git. Or do this yourself from GitHub Desktop.

Step 7: Third Vibe - Create a Histogram

Time to visualize the data.

Create a histogram showing the distribution of petal lengths for all flowers. Use 20 bins. Add a title and axis labels. Save the plot as petal_length_histogram.png. Add this code to iris_exploration.py

Step 8: Fourth Vibe - Scatter Plot

Scatter plots show relationships between two variables.

Create a scatter plot with petal length on the x-axis and petal width on the y-axis. Color each point by species using different colors. Add a legend showing which color is which species. Save as petal_scatter.png. Add this to iris_exploration.py

This is vibe coding in action: describe the visualization, test it, iterate.

Step 9: Fifth Vibe - Box Plot

Box plots are great for comparing distributions across groups.

Create a box plot comparing petal lengths across the three species. Put species on the x-axis and petal length on the y-axis. Use different colors for each species. Add a title. Save as species_boxplot.png. Add this to iris_exploration.py

Step 10: Review and Commit

Before committing, review what Claude built.

Iris data analysis with histograms, scatter plots, and box plots

You’ve saved your first working analysis!

Step 11: Iterate and Improve

Vibe coding shines when you iterate. Try adding features by describing them:

Example requests to Claude:

After each successful feature:

Key principles:

Each time, follow the pattern: describe → test → iterate → commit.

Next Steps

Troubleshooting

Workflow Overview

This tutorial combined several technologies into one workflow:

The magic isn’t any single tool—it’s how vibe coding lets you describe what you want and iterate rapidly. You went from empty project to complete data analysis with multiple visualizations in 20 minutes without writing a single line of code manually.


Created by Steven Ge on December 11, 2025.