🌍 Week 3 Homework — Feedback
🌍 Week 3 Homework — Feedback
Student: Anna De Falco
Files: week3_homework_starter_defalco_anna.m, WB_RGDP.csv
Assignment: World Bank Real GDP & Growth (CSV version)
⚠️ Overall Assessment
Result: ⚠️ Partially correct
The code runs and correctly loads the dataset, but execution stops with the following runtime error:
Index exceeds the number of array elements. Index must not exceed 1.
Error in week3_homework_chiaratombolini (line 46)
country_name = split_name{4};
This is the same issue encountered by several students: the script tries to extract the country name from the filename instead of the dataset itself. Everything else appears well structured, so this is a minor but blocking error.
🔍 Task-by-Task Check (Slides Tasks 1–8)
| Task | Description | Status | Notes |
|---|---|---|---|
| 1 | Import NY.GDP.MKTP.KD (real GDP) from CSV |
✅ | File loads correctly (WB_RGDP.csv). |
| 2 | Inspect & extract year/value pairs | ✅ | Correct use of readtable, but stops before reshaping. |
| 3 | Build tidy table (country/iso3, year, value) |
⚠️ | Logic correct but script stops before table creation. |
| 4 | Compute logs & annual growth | ⚠️ | Present in structure but not executed due to error. |
| 5 | Verify US growth vs Week 1 | ❌ | Not reached. |
| 6 | Plot Real GDP for selected countries + legend | ❌ | Not reached. |
| 7 | Plot growth rates (subplots + average line) | ❌ | Not reached. |
| 8 | Export CSV panel with growth | ❌ | Not reached. |
See solution file.