Economics, Python and AI: Skills for Analytics Work
2026-11-23
Economics, Python and AI: Skills for Analytics Work
Data 88E, Econ 148 and learning to work with models
Plan for today
Economics in notebooks
Data 8, Data 88E and Econ 148 at Berkeley
Skills for jobs in the AI era
What keeps its value when AI writes code
Step one: vibecoding
Building analyses with an AI assistant, and checking them
Step two: small models
The harness that sits around every AI product
Part 1
Economics in notebooks
My path into notebooks
- My background is in international development
- At Berkeley I started teaching a development course built on notebooks
- Students worked with field data from published studies in the first week
- That course led to Data 88E and Econ 148
Data 8: Foundations of Data Science ![Data 8 logo]()
- Introductory course open to students in any major
- No prerequisites in programming or statistics
- Real questions and real data from the first lecture
- Python introduced as students need it, inside notebooks
Open textbook: Adhikari, DeNero and Wagner, Computational and Inferential Thinking, inferentialthinking.com
The Data Science Connectors model
- Connector courses are taken alongside Data 8
- Each one applies the same tools to a single discipline
- Faculty in that discipline design and teach them
- Students see the methods used on questions from their own field
Connectors Library: public notebook repositories for connector courses
Data 88E: Economic Models
- A connector course in economics
- Economic models taught through notebooks
- Students work with economic data alongside the theory
- Open materials that other institutions have adapted
Data 88E: Economic Models Textbook, Budget Constraints and Utility Maximization. data-88e.github.io/textbook
From a spreadsheet to a demand curve
- Survey in a spreadsheet
- Table in a notebook
- Demand curve
- Students answer a willingness-to-pay survey in Google Sheets
- The same data is read into a notebook with one line of code
- The class demand curve is plotted from their own answers
![Class demand survey responses in a Google Sheet, the same data read into a table in a notebook, and the resulting demand curve of price against cumulative count with a best-fit line]()
Data 88E, fall 2024: class demand survey in a spreadsheet, read into a notebook, plotted as a demand curve
Econ 148: Data Science for Economists
Forecasting
ARIMA, Prophet and Chronos-2 on Zillow rent and CPI data
ML fairness
Income prediction on Folktables and ACS data, with SHAP explanations
Survival analysis
Time to reemployment for displaced workers, IPUMS CPS data with lifelines
Each unit puts a classic econometric method next to a newer model on the same data.
Frequent assessment in Econ 148
- Students practice pandas code on PrairieLearn
- Questions are randomized and graded automatically
- Feedback arrives right away, while students are still working on the problem
prairielearn.com. Question from Econ 148, Spring 2026.
The Python stack
- Read the docs
- Supply data
- Configure
- Run
- Interpret
- Econ 148 students meet a new data or ML package every few weeks
- NumPy, pandas, statsmodels, scikit-learn
- The same stack runs in Colab, Databricks and JupyterHub
- AI tools expose similar Python interfaces, and the same pattern applies
Part 2
Skills for jobs in the AI era
What changes when AI writes code
Richard Borcherds, a Fields medalist on the Berkeley mathematics faculty, no longer grades homework for correctness.
- Many of his students were using AI to receive top homework scores
- AI tools can now do much of the routine work in a course, and in many jobs
If AI can produce the routine answers, what is left for you to learn?
Audrey Baime, The Daily Californian, October 23, 2026
Skills that keep their value
Read and write Python
AI tools produce code that you have to check.
Ask an inferential question
Is the goal prediction, or cause and effect?
Debug and test
AI-generated code often fails without an error message.
Know the domain
Economics or business knowledge is what makes a result meaningful.
Students who combine domain knowledge, data skills and working fluency with AI tools can build applications others cannot.
There is more analysis to do, not less
![Terence Tao, Math 2.0, Caltech, October 2026]()
Terence Tao, “Math 2.0,” AIM Public Lecture, Caltech, October 2026
“The future frontiers of mathematics will always continue to expand.”
The same may hold for analytics:
- Questions that took a semester project can now take a week
- Smaller teams can work on more questions
- More questions become feasible, in more fields
Part 3
Step one: vibecoding
What vibecoding means
Vibecoding is describing an analysis in natural language and having an AI assistant write the code. You then run it, read it and revise it.
- Fast for a first draft
- The analyst is still responsible for the result
- Describe the question
- Generate code
- Run it
- Read and check it
- Revise
How do you know the code is right?
Exercise: can we reproduce this chart?
- A chart of employment in Spain by presidential term, published in the press
- Two series: employed persons in the EPA survey and workers registered with Social Security
- The task for an AI assistant: find the data, rebuild the chart and check the headline
The question is about data and careful reading, not about politics.
El Diario, Instagram post. instagram.com/p/DeXZ-VrGlI6
The result in a notebook
- The rebuilt chart, shaded by each Spanish president’s term
- Runs in Google Colab with a Google account
- Every step is in the notebook and can be checked
A larger example: the vibecession notebook
A notebook series built for students in Bogotá, October 2026, each running in Google Colab or JupyterLite.
- Sources data from public APIs
- Builds a monthly dataset
- Compares consumer sentiment with economic fundamentals
- Fits a time series model and examines the gap
Checking AI-written code with tests
- Tests are written into the notebook
- A test checks what the code returns, not what it is called
- Here a function named
square actually cubes its input
- Tests are how you check vibecoded work
otter-grader: otter-grader.readthedocs.io
Part 4
Step two: small models and the harness
A small model in a notebook
A small Qwen model loaded on a JupyterHub. Students load it, change parameters and observe the results, with no setup.
- Administrator: sets up the environment
- Instructor: sets up the curriculum
- Student: explores
What a harness is
Products like ChatGPT or Claude are a model plus a harness around it. A small model makes each layer visible.
- Tokens: text becomes numbers
- Chat format: system, user and assistant roles
- System prompt and settings such as temperature
- Context and memory: what the model sees each turn
- Tools: letting the model call code or search
- Evaluation: testing outputs for accuracy and bias
Small models in the browser
![JupyterLite]()
A JupyterLite site where small language models run in the student’s browser through WebLLM, with no server, API key or installation.
- Talking to models and generation settings
- Tokens, chunking and embeddings
- Memory with SQLite and embedding search
- Inside an open-weight model package
Requires Chrome or Edge with WebGPU.
A new course: Understanding AI with small models
Data 88I, a 2-unit connector course in development at Berkeley.
- Runs in JupyterLite, on JupyterHub, or with students’ own Ollama installation
- Topics: bias, evaluation, training data, privacy and API costs
- Built on the same notebooks as the small-models-lite site
Where to start
2. Rebuild a chart
![QR code linking to the Colombia-26-NB notebook repository]()
Rebuild one chart with an AI assistant, and check the code.
3. Run a small model
![QR code linking to the Small Models in the Browser site]()
Run a small model and look at its tokens.
4. Try AI in JupyterLite
![QR code linking to the JupyterLite AI demo]()
An AI assistant inside a browser notebook.
Thank you
Eric Van Dusen
College of Computing, Data Science, and Society, UC Berkeley
ericvd@berkeley.edu · github.com/ericvd-ucb