Using Gemini in Colab to generate, run, and fix Python code that replicates things you’ve already done in a spreadsheet (descriptive stats, charts, adding a new column, a correlation + scatterplot)
Prompting clearly, debugging errors, and re‑prompting to improve or change code.
You will make one continuous notebook with a few checkpoints.
Open a new Google Colab notebook and use Gemini to guide you through the steps below. The steps are intentionally brief, and not very detailed on purpose. USE GEMINI to figure out how to do them!!!!
Load the Chicago community areas dataset into a DataFrame.
Show the first 5 rows, column names, and descriptive stats for the whole dataset
Use 2 columns: (1) crowded housing and (2) one other column you care about
Compute mean and median and make bar chart of each column sorted in order to show the distribution.
Add a markdown cell and write 1–2 sentences on these values - is the median above or below the average? what does that mean? Refer to the charts to make your point.
Create a new column (add a new column to the dataframe) that classifies crowded housing into Low/Medium/High.
Use your own thresholds from earlier work or ask Gemini to propose reasonable cutoffs (cite which you used).
Make a bar chart that shows the count of neighborhoods in each category
Save the updated data frame to a new .csv file (??)
Create a correlation matrix (heat map) for numeric columns
Identify two variables: one that has a strong negative correlation with crowded housing and one that has a strong positive correlation.
Make two scatterplots, one for each variable that you've identified, that shows the trend line and R^2 value.
Ask Gemini to make an argument for an intervention that might improve crowded housing based on the scatterplots and any other relevant data (give it context and situation - use RAISE strategy to prompt)
Now do the same in ChatGPT -- Copy the scatterplots (screenshot) and any other relevant data and info into ChatGPT asking it to use that information to make an argument for an intervention that might improve crowded housing (don't forget RAISE)
Back in Colab add a markdown cell to present that case use whichever result is better, or combine them. . (It does not need to be complex. 1-2 sentences about what the graphs show and 1-2 sentences about a possible intervention based on that data).
Add a markdown cell with answers to these questions:
1. Give one example from this assignment where you used Gemini to get from not‑working to working code? What did you do to solve the problem?
2. What was the thing you struggled with the most?
3. What was the thing that was surpisingly easy?
4. Gemini vs. ChatGPT - based on what you know so far, when is it good to use Gemini
Colab notebook link (must be viewable). Your notebook should read like a short story: code cells, outputs, and brief Markdown notes.
Submit using [this form]