# How to use this file AI for Data and Documents — TOPIC 1 From Spreadsheet to First Results Exploratory analysis: descriptive statistics and visual presentation HOW TO USE THIS FILE 1. Download one GOV dataset (GOV1.csv ... GOV23.csv) and its description from the "GOV Datasets" page. 2. Open a new chat at claude.ai and UPLOAD the CSV file. 3. Copy a prompt below, paste it into Claude, and run it. 4. Read the output critically. Ask the follow-up prompts. Keep a short log of what you asked and what you got. DATASET STRUCTURE (every GOV file is the same) - country, iso3, year -> identifiers (NOT predictors) - Y1 -> numeric outcome - Y2 -> binary outcome (0/1) - X1 ... X20 -> predictors - X20 = ht_region -> world region, 10 categories (a categorical predictor) (in a few datasets the region may appear as X19 — always confirm with the description file before you rely on it) A GOOD HABIT: after any result, add "Show the exact code you ran so I can reproduce it." --- # Orient yourself in the data I have uploaded a CSV file. Act as a careful data analyst. First, load the file and tell me: - the number of rows and columns - the column names and the data type of each column - how many unique countries and how many years are covered - the number of missing values in each column Do NOT analyze anything yet. Just describe the structure of the data and show me the first 5 rows. Then wait for my next instruction. --- # Describe the outcome Y1 Focus only on the numeric outcome variable Y1. Give me a descriptive summary of Y1: - count, mean, median, standard deviation, min, max - the 25th, 50th, and 75th percentiles - how many values are missing Then tell me in plain English: is Y1 roughly symmetric or skewed? Are there any obvious extreme values I should worry about? Show the code you ran. --- # Visualize the distribution of Y1 Create a histogram of Y1 and, separately, a boxplot of Y1. Use clear axis labels and a title. After you show the plots, describe in two or three sentences what they tell me about the shape of Y1, its center and spread, and any outliers. Show the code. --- # Missing data, handled honestly Make a table showing, for every variable (Y1, Y2, X1 through X20), the count and percent of missing values, sorted from most missing to least. Important rule for this whole session: when a variable has missing values, do NOT create a "missing" category and do NOT fill the gaps with a guess. For each analysis, simply exclude the rows that are missing on the variable(s) that analysis uses (complete-case, variable by variable). State how many rows you used each time. --- # Summary statistics for all predictors Produce one clean summary table for the predictors X1 through X19 (the numeric ones): for each, give mean, standard deviation, min, median, and max. Handle X20 (ht_region) separately: it is a categorical region variable, so give me a frequency table showing how many rows fall in each region category. Show the code and keep the table readable. --- # Y1 across regions (groups) Using X20 (ht_region) as the grouping variable, show how the outcome Y1 differs by region: - a table of the mean and median of Y1 for each region category, with the number of observations in each - a boxplot of Y1 by region Then describe which regions have the highest and lowest typical Y1, and whether the spread differs a lot across regions. Show the code. --- # Y1 over time Show how Y1 changes over time. Compute the average Y1 for each year and plot it as a line chart (year on the x-axis, average Y1 on the y-axis). Describe the trend in two or three sentences. Show the code. --- # Which predictors move with Y1? Compute the correlation between Y1 and each numeric predictor X1 through X19. Present the result as a table sorted by the absolute size of the correlation, strongest first. Then show a correlation heatmap of Y1 and X1 through X19. In plain English, name the three predictors most strongly associated with Y1 and say whether each association is positive or negative. Remind me that correlation is not causation. Show the code. --- # A focused scatter Take the predictor most strongly correlated with Y1 (from the previous step). Make a scatterplot with that predictor on the x-axis and Y1 on the y-axis, add a fitted trend line, and color the points by X20 (region). Describe what you see: is the relationship linear, and does it look similar across regions? Show the code. --- # A one-paragraph data brief Write a short, honest "data brief" (one paragraph, plain English, no jargon) that I could paste into a report. It should state: what the dataset covers, the typical value and spread of Y1, how Y1 varies by region and over time, and the two or three predictors most associated with Y1. Do not overclaim; flag any data quality issues you noticed. --- # CHECK YOUR WORK — verification habits for Topic 1 - Ask Claude to "show the code" after every result, and skim it. - Re-ask one summary statistic a second time and confirm you get the same number. - If a chart looks surprising, ask: "How many rows did you use for this, and how many were dropped as missing?" - Never accept a causal claim ("X causes Y1"); the data here support association only.