02 — Methods / Python & Coding

Cloud-Based Python Vibe Coding

Trying Python with no local setup, using Google Colab, LLMs, and Google Drive

Illustration of running an analysis in a cloud notebook

There are essentially two ways to start using Python for data analysis. You can set up Python on your own machine, or you can run it in the cloud with Google Colab. This page is the entry point for the second option. It is for those who want to try Python without installing anything, or who would rather not use their own machine's resources.

Dr. Hoo, can I try Python without installing anything?
You can. With Google Colab, you just sign in through your browser.
01

Choosing between the two paths

Local or cloud, which one should I choose?
It depends on your goal. Colab suits a first try, and a local setup suits ongoing research. Starting in Colab and moving later is a common path too.

Neither option is the right answer for everyone. Pick the one that fits your goals and constraints.

Path A / Local

Python Vibe Coding Course

  • You plan to keep using Python in your research
  • You want full reproducibility (requirements.txt, DOI on Zenodo) when you publish a paper
  • You handle larger datasets or longer computations
  • You need at least 8 GB of RAM and 1 to 2 hours for the initial setup

Path B / Cloud (this page)

Google Colab

  • You just want to try Python before committing
  • You'd rather not install new software on your machine
  • Your machine has limited resources, or you work on an iPad or a Chromebook
  • All you need is a Google account and a browser

It is also common to try Python in Colab first, then move to a local setup once you want to keep going. You don't have to commit to the heavier option upfront. Start with whichever fits where you are now.

02

What is Google Colab?

Google Colaboratory (Colab) is a free cloud-hosted Jupyter Notebook service from Google. Sign in to your Google account in a browser, and Python is ready to use with zero installation.

  • No setup required. Python and major libraries such as pandas, numpy, and matplotlib are pre-installed.
  • Free. Anyone with a Google account can use it within reasonable limits.
  • Easy to share. You can share notebooks the same way as Google Docs, with link sharing and collaborative editing.
  • GPU available. You get free GPU access (with quotas) for machine learning workloads.
  • Google Drive integration. You can store data and notebooks in your own Drive.

The free tier has limits. Sessions time out after about 12 hours, and compute resources are capped. It is not a good fit for serious research work or large computations. For learning and exploration, however, the free tier is usually plenty.

03

What the linked article covers

On a separate blog, I have a step-by-step walkthrough on building a reproducible data analysis environment with Google Colab, large language models (LLMs), and Google Drive. It covers the following topics, in this order.

  • Opening Colab for the first time and running your first cell
  • Asking an LLM such as ChatGPT or Claude, in plain language, to write code for the analysis you want
  • Pasting the resulting code into Colab and running it smoothly
  • Storing data in Google Drive and mounting Drive from Colab to read and write files
  • Saving outputs (figures, CSVs) back to Drive and sharing them with collaborators

If you follow along as you read, you can cover the basics in about 30 minutes to an hour.

Read the blog post ↗
04

When you outgrow Colab

As you use Colab more, a few inconveniences tend to come up. Sessions time out and interrupt long jobs, and uploading big datasets to Drive every time gets tedious. It is also harder to tell collaborators exactly which library versions you used. When that happens, the natural next step is a local setup.

  • No more session timeouts, so you can run long computations
  • Easy access to large datasets already on your machine
  • requirements.txt captures your environment, so your analysis is easier to reproduce when you publish a paper
  • Editors such as VSCode make writing code more comfortable

For setting up a local environment, see the Python Vibe Coding Course on this site, which walks through the whole flow in five parts. It also covers how to move an analysis you wrote in Colab to a local environment.


✓

Summary

  • There are two ways to start with Python, a local setup or the cloud (Colab)
  • If you want to try Python without installing anything, start with Colab
  • For serious research workflows and reproducibility on publication, you'll likely want to move to a local setup eventually
  • Step-by-step instructions are in the linked blog post and the Python Vibe Coding Course
So once I'm used to Colab, I can move to my own computer.
Right. The Python Vibe Coding Course walks you through that, step by step.