Introduction
Hey there, it's Guchyos.
Lately, when doing data analysis for research, I've been using a technique called "vibe coding." Vibe coding is an approach where you write code while having a dialogue with an LLM (Large Language Model). "Vibe" refers to the mood or feel of the process — you tell the LLM what you want to do and have it write the code for you. Even if you're a programming beginner, you can consult with an LLM as you work through your analysis, which significantly lowers the barrier to entry.
In this post, I'll explain how to do vibe coding in Python using Google Colab and an LLM.
The method I'll introduce stores all your data, code, and results in Google Drive, which has the added benefit of making your work easy to reproduce.
What is Google Colab?
Google Colaboratory (Google Colab) is a free, cloud-based Python execution environment provided by Google. It runs entirely in your browser and has the following features:
- No environment setup required: Python and libraries are already installed
- Free GPU/TPU access: Capable of heavy computation like machine learning
- Google Drive integration: Save data and code to the cloud
- Collaborative editing: Multiple people can edit simultaneously, like Google Docs
- Jupyter Notebook format: Code, execution results, and explanations are all bundled in one file
The biggest advantage is that you can start Python programming immediately with just a browser, without installing anything on your computer.

What is an LLM (Large Language Model)?
An LLM (Large Language Model) is an artificial intelligence trained on enormous amounts of text data. It can converse naturally like a human, answer questions, write text, and generate program code.

Representative LLM services:
- ChatGPT (OpenAI): The most well-known
- Claude (Anthropic): Gives impressively accurate answers even to vaguely worded questions
- Gemini (Google): Strong integration with Google services
These services are accessible via a web browser and allow you to interact in a chat format. Even without programming knowledge, if you ask "please write code to do this," the LLM will generate Python code for you.
Note: Code generated by LLMs is not always perfect. Errors can occur, but if you show the error message to the LLM, it will suggest fixes — working through this dialogue is the real joy of vibe coding.
What is Python?
Python is a programming language that appeared in 1991, known for its readable and writable syntax. Today it is used across a wide range of fields including data science, machine learning, web development, and automation scripting.

Features of Python:
- Simple syntax: Natural, English-like notation that is beginner-friendly
- Rich libraries: Extensive purpose-built libraries for statistics, machine learning, image processing, and more
- Large community: Plenty of information available, so you can quickly find solutions when stuck
- Open source: Free to use
In research, it has become one of the mainstream languages for data analysis alongside R.
What is Google Drive?
Google Drive is a cloud storage service provided by Google that lets you store, share, and edit files online. It can be accessed from any device — computer or smartphone — and is widely used in research and business settings.
Features of Google Drive:
- 15 GB free storage: Ready to use immediately with a Google account
- Real-time collaborative editing: Multiple people can simultaneously edit documents and spreadsheets
- Powerful search: Can even recognize and search text within images
- Automatic sync: Access the latest files from all your devices
- Flexible sharing settings: Finely adjust permissions such as view-only, comment, or edit
In research, it has become an indispensable tool for sharing data and presentation materials, and for collaborative writing.
Why Vibe Coding × Google Drive?
There are probably quite a few people who want to try programming but feel the first step is too high a hurdle.
- "I don't understand Python syntax"
- "I don't know what error messages mean"
- "I have no idea how to write the code"
- "I know the statistical method, but I don't know how to implement it"
With vibe coding, you can analyze data even as a programming beginner by writing code in dialogue with an LLM. Tell it what you want in your native language, and the LLM will write the code. If an error occurs, consult the LLM and it will teach you the solution.
Furthermore, with the method introduced here, everything is centralized in Google Drive, which brings these benefits:
- Data, code, and analysis results are managed in one place
- That means everything related to the analysis is recorded together
- So it's easy to share with collaborators, supervisors, and lab members
- Reproducibility is also easy to ensure
How to Do It!
Basic Flow
In the vibe coding I'll explain here, you go back and forth between dialogue with the LLM and code execution in Google Colab.
Basic cycle:
- Ask the LLM to "please write code to do this"
- Copy the code generated by the LLM
- Paste it into Google Colab and run it
- Check the results (if it works, move on; if there's an error, report it to the LLM)
Repeat this cycle to advance your analysis.
Preparation: Organizing Your Data and Setting Up Folders and Files in Google Drive
1. Create the Ultimate Excel Sheet
First, consolidate all the data needed for analysis into a single Excel sheet (or CSV file). "Ultimate" means the information needed for analysis is complete and well-organized. Each row must be uniquely identified by a combination of values across multiple columns.
For example, for rice yield data:
Year | Variety | Treatment | Replicate | Yield (kg/10a) | Plant Height (cm)
-----|---------|-----------|-----------|----------------|------------------
2024 | A | 0N | 1 | 520 | 85
2024 | A | 0N | 2 | 535 | 87
2024 | A | 6N | 1 | 580 | 92
2024 | B | 3N | 1 | 498 | 78
...
In this example, each row is uniquely determined by the combination of "Year," "Variety," "Treatment," and "Replicate." With this structure, each measurement value is clearly linked to its condition, so you won't run into trouble during analysis.
If your data is spread across multiple sheets (e.g., a variety info sheet and a measurement data sheet), consolidating them into one is easier in the long run.
2. Create a Folder Structure in Google Drive
Go to Google Drive (https://drive.google.com/).
Log in with your Gmail account. This way, your files will be saved linked to your account.
Now, let's create a folder structure like this:
Example folder structure:
📁 Research Project Name/
📁 data/ ← Store data files here
📁 code/ ← Save Google Colab notebooks here
📁 results/ ← Save figures and tables of analysis results here
Specific steps:
- Open Google Drive
- Click the "New" button in the upper left → "New folder" to create a folder named "Research Project Name"

- Inside that folder, create three folders: "data," "code," and "results"
- Upload the Excel file you created to the "data" folder
3. Create a Google Colab Notebook
You can create a Google Colab notebook directly from Google Drive.
Method 1: Create from Google Drive (Recommended)
- Open the "code" folder in Google Drive
- Click "New" → "More" → "Google Colaboratory"

- Once the notebook opens, rename the file to something like "analysis_notebook"

If "Google Colaboratory" is not displayed, search for "Colaboratory" under "Connect more apps" and install it.
Method 2: Create directly from Google Colab
- Go to https://colab.research.google.com/
- "File" → "New notebook"
- After creating it, go to "File" → "Save a copy in Drive" and specify the "code" folder as the save destination
Reference links:
Practice: Advancing the Analysis in Dialogue with the LLM
This is the heart of vibe coding. Let's go back and forth between the LLM and Google Colab to do our coding and analysis.
Step 1: Ask the LLM for the First Code (LLM side)
First, open your LLM (ChatGPT, Claude, Gemini, etc.) and ask it something like this.
At this point, if you're worried about data leakage, use the temporary chat feature!
💬 Example prompt to LLM:
Please write Python code for Google Colab that mounts Google Drive and
reads an Excel file at the following path:
/content/drive/MyDrive/Research Project Name/data/analysis_data.xlsx
The LLM should generate code something like this:
from google.colab import drive
import pandas as pd
drive.mount('/content/drive')
df = pd.read_excel('/content/drive/MyDrive/Research Project Name/data/analysis_data.xlsx')
print(df.head())
Step 2: Run the Generated Code in Google Colab (Colab side)
Basic Google Colab operations:
- Add a code cell (the rectangular box where you write code): click the "+ Code" button at the top of the notebook (red circle in the figure)
- Run code: click the play button (▶) on the left side of the cell, or press "Shift + Enter"
- Delete a cell: click the trash can icon in the upper right of the cell (blue circle in the figure)

- Copy the code generated by the LLM
- Paste it into the Google Colab notebook
- Click the play button (▶) on the left side of the code cell to run it

- On the first run, you'll be asked for permission to access Google Drive — follow the instructions to grant access

Now you can access folders in your Google Drive, read Excel files from there, and save analysis results back to it.
Next, to get an overview of the data, ask the LLM to write code that outputs basic information.
💬 Example prompt to LLM:
Please write Python code that outputs the following basic information
about the Excel file I just loaded:
- Number of rows and columns
- List of column names
- Data type of each column
- Presence and count of missing values
- Basic statistics for numerical data (mean, standard deviation, min, max, etc.)
- First 5 rows of data
Workflow:
- 💬 Have the LLM generate the code
- 📋 Copy the code
- 🔬 Paste it into Google Colab and run it
- 👀 Check the output (it will appear below the code cell)
Copy the basic information displayed below the code cell and show it to the LLM. This step is important.
At this point, if you're worried about data leakage, use the temporary chat feature!
💬 Example prompt to LLM:
I am working with the following data:
[Paste the basic information output from Google Colab here]
Using this data, I would like to perform the following analysis:
1. Calculate the mean yield for each variety
2. Conduct a t-test between varieties
3. Visualize the results with a box plot
4. Save the figure and t-test results to /content/drive/MyDrive/Research Project Name/results/
Please write the Python code.
This way, the LLM understands the data structure before generating the code.
Note that you are only showing the LLM a summary of the data, so there is no risk of the LLM absorbing your raw data.
You could send the raw data directly to the LLM, but it's not recommended from a data security standpoint.
Again, the workflow:
- 💬 Have the LLM generate the code
- 📋 Copy the code
- 🔬 Paste it into Google Colab and run it
- 👀 Check the results (if it worked, you're done; if there's an error, move to the next step)
Step 5: Report Errors to the LLM (Colab → LLM → Colab)
Errors are part of programming. Just copy the error message displayed in Google Colab and paste it to the LLM.
💬 Example prompt to LLM:
I got the following error. Please tell me the cause and how to fix it.
[Paste the error message from Google Colab here]
Example:
KeyError: 'variety'
The LLM will explain the cause — something like "the column name is 'Variety' not 'variety'" — and suggest a corrected version of the code.
Common errors and how to handle them:
ModuleNotFoundError: A required library is not installed
- 💬 Ask the LLM "please tell me the code to install ○○"
- 🔬 Run the generated code in Colab
KeyError: Incorrect column name specified
- 💬 Show the LLM the basic info to confirm the correct column name
- 🔬 Run the corrected code in Colab
ValueError: Data type mismatch
- 💬 Ask the LLM "please give me code to convert the data type"
- 🔬 Run the generated code in Colab
Error resolution cycle:
🔬 Colab: Error occurs
↓ Copy the error message
💬 LLM: Analyzes cause + generates corrected code
↓ Copy the corrected code
🔬 Colab: Run the corrected code
↓ Success! Or another error (if so, repeat)
Step 6: Understand What the Code Does (LLM side)
Rather than just using the generated code, it's also important to understand what it does. Ask the LLM to annotate it line by line in English.
💬 Example prompt to LLM:
Please add a comment to every line of the code you wrote earlier.
Explain in detail what each line does so that even a programming beginner can understand.
By doing this:
- You'll understand how the code works
- You can apply it the next time you do a similar analysis
- The content of the Methods section in your paper will become clear
If you paste the annotated code into Google Colab, it will also be easy to understand when you revisit it later.
Notes and Recommendations!
Save analysis result figures and tables to Google Drive as well. You can also have the LLM write the code for this.
💬 Example prompt to LLM:
Please add code to save the created figure to
/content/drive/MyDrive/Research Project Name/results/
as "figure_yield_comparison.png" at high resolution (300 dpi).
This way, all figures and tables are also retained in your Google Drive folder.
Ensure Code Reproducibility (Python and Library Version Management)!
Even with the same code, behavior can change or errors can occur if the versions of Python or libraries (the things that appear as "import something" in the code) are different.
To ensure reproducibility in research, it is important to record these versions.
You can't change the Python version itself, but you should at least record the version in use when you ran the analysis.
How to Check Versions
💬 Example prompt to LLM:
Please write code to check the current versions of Python and
pandas, numpy, matplotlib, scipy, seaborn (the libraries included in my code)
in Google Colab.
You'll likely get a response like this:
To check the current environment in Google Colab, run the following code:
import sys
print(f"Python version: {sys.version}")
import pandas as pd
import numpy as np
import matplotlib
import scipy
import seaborn as sns
print(f"pandas: {pd.__version__}")
print(f"numpy: {np.__version__}")
print(f"matplotlib: {matplotlib.__version__}")
print(f"scipy: {scipy.__version__}")
print(f"seaborn: {sns.__version__}")
Run this in Google Colab to display the versions of Python and the libraries.
How to Record Versions
You can add a text cell and leave notes in it, as shown below.
Note that in text cells, code cannot be executed. They are for notes only.

Add a text cell at the very beginning of your Google Colab notebook and paste in the output from the code above.
This records the Python and library versions used for the analysis.
How to Pin Library Versions
If you want to install the listed library versions, run the following code at the beginning of your notebook:
!pip install pandas==2.0.3 numpy==1.25.2 matplotlib==3.7.1 (list library==version for each)
From this point on, libraries imported in subsequent code will be the versions specified here.
Recommended Approach: Creating and Loading requirements.txt
If you want to manage all libraries at once, you can save and load a list of libraries as a text file.
Try asking the LLM like this:
💬 Example prompt to LLM:
Please write code to save the versions of all currently installed libraries
in Google Colab as a requirements.txt file to Google Drive.
Save it to /content/drive/MyDrive/Research Project Name/code/
You should get code like this:
!pip freeze > /content/drive/MyDrive/Research Project Name/code/requirements.txt
Running this in Google Colab will save a requirements.txt file containing the list of libraries to your Google Drive folder.
To reproduce the same environment later, just run the following at the very beginning of the notebook:
!pip install -r /content/drive/MyDrive/Research Project Name/code/requirements.txt
If You're Worried About Data Leakage, Use the Temporary Chat Feature!
Even if you're not directly uploading data to the LLM, you might be concerned about discussing unpublished data with an LLM. Most LLM services have a "temporary chat" or "incognito mode," and using this means your input data won't be used for model training, so you can feel at ease.
Temporary chat features in major LLM services:
ChatGPT:
Claude:
- When starting a new chat, select "Use Incognito" in the upper right of the screen

Gemini:
- Click the "Temporary chat" icon displayed to the right of "New chat"

Notes when using temporary chat:
- Chat history is not saved, so make sure to save important code in Google Colab. Also save the chat contents somewhere as appropriate.
Make Sure to Back Up!
Make sure to save and back up your Google Colab notebooks regularly.
How to save:
- Auto-save: Google Colab automatically saves to Google Drive
- Manual save: "File" → "Save" or "Ctrl + S" (Mac: Cmd + S)
Best practices for version management:
Before making major changes, copy the notebook
- "File" → "Save a copy in Drive"
- Add a date or version number to the filename (e.g.,
analysis_notebook_v2_20240115.ipynb)
Check the change history
- "File" → "Revision history" to view and restore past versions
Once an important analysis result is obtained, copy and save the notebook at that point
Tips for Effective Vibe Coding
Tip 1: Be Specific with Your Prompts
Make your instructions to the LLM as specific as possible.
❌ Bad example: "Make a graph"
⭕ Good example: "Please compare the yield by variety using a box plot, with the y-axis label 'Yield (kg/10a)', the title 'Yield Comparison Between Varieties', figure size 12 cm wide × 8 cm tall, and font size 12pt"
Tip 2: Proceed Step by Step
Rather than asking for complex analyses all at once, proceed in stages.
- Load data → 🔬 Run in Colab and check
- Check basic statistics → 🔬 Run in Colab and check
- Simple visualization → 🔬 Run in Colab and check
- Statistical testing → 🔬 Run in Colab and check
- Create the final figure → 🔬 Run in Colab and check
By checking results at each step as you go, it's easier to identify the cause when an error occurs.
Tip 3: Don't Fear Errors
There's no need to panic when an error occurs. If you show the error message to the LLM, it will usually tell you the solution. In fact, facing errors often deepens your understanding.
Mindset for handling errors:
- Errors are opportunities to learn
- Error messages are hints to solving the problem
- Through dialogue with the LLM, your understanding of the code gradually deepens
Tip 4: Templatize Frequently Used Code
If you repeat similar analyses, it's convenient to create a template notebook in advance.
Contents to include in a template:
- Code to mount Google Drive
- Code to load data
- Code to output basic statistics
- Style settings for commonly used figures
Copy the template notebook to start a new analysis, and you can save the time of initial setup.
Alternatively, have the LLM write new code based on the template code.
About Folder Sharing
The greatest advantage of this method is that everything related to the analysis is saved in a Google Drive folder:
Things saved in your Google Drive folder:
- Original data (data/analysis_data.xlsx)
- Analysis code (code/analysis_notebook.ipynb)
- Google Colab notebooks also save execution results
- Analysis result figures (results/figure_yield_comparison.png)
- Analysis result tables (results/statistics_results.csv)
When someone asks "please explain the details of your analysis method" or "please reproduce the results," sharing the Google Drive folder allows anyone to re-run the analysis in the same environment. For example, you could have your supervisor check whether the analysis is correct.
How to share a Google Drive folder:
- Right-click the folder and click "Share"
- Enter the email address of the person you want to share with
- Set the permission to "Viewer" (they can't edit files in the folder) or "Editor"
- Click "Send"
Reference link:
Note that Google Colab notebooks are saved together with execution results, so the record of "this is what happened when this code was run" is also preserved.
Want to Try It Right Now? Here's a Ready-Made Example!
If you'd like to jump straight into vibe coding with a real dataset, here's a sample notebook you can use as practice material.
It uses open-source biochar data to walk through the full workflow: building a Random Forest machine learning model and interpreting the results with SHAP analysis — exactly the kind of thing you'd do in actual research.
👉 RandomForestSHAP/BiocharRandomForestSHAP.ipynb at main · Gucchyon/RandomForestSHAP
How to use it as a vibe coding exercise:
- Open the notebook from the link above
- Save a copy to your own Google Drive ("File" → "Save a copy in Drive")
- Try running each cell — and whenever you're unsure what the code does, just paste it into your LLM and ask!
It's a great way to get hands-on experience with the Google Drive × Google Colab × LLM workflow described in this post.
Summary
Vibe coding is a method that leverages the power of LLMs to allow even programming beginners to perform data analysis. By repeating the cycle of generating code with the LLM → running it in Google Colab → reporting results back to the LLM, you can advance your analysis.
By centralizing everything in Google Drive, you can build a highly reproducible research environment. You'll never find yourself wondering "how did I do this analysis again?" And you can easily share everything with collaborators, supervisors, and lab members.
Recap of key points:
- 💬 LLM = Code generator and consultation partner
- 🔬 Google Colab = Place to run code and check results
- 💾 Google Drive = Save everything and ensure reproducibility
- 🔄 Repeat the LLM ↔ Colab cycle to complete the analysis
Let's all give it a try.
Reference links:
- Google Colab official site
- How to use Google Colab (official tutorial)
- ChatGPT
- Claude
- Gemini
- Google Drive Help Center