🌍 Week 3 Homework β€” Feedback

Student: Ignazio Nunzi
Assignment: World Bank Real GDP & Growth (CSV version)


⚠️ Overall Assessment

Result: ⚠️ No Input file attached!

The script cannot be executed because the input data file was not attached.
You did include an output file (IgnazioNunzi_sampleCountries_YoY.csv), which indicates the code likely produced correct results before submission and I plotted the growth rates for the US and looks correct.


πŸ” Task-by-Task Check (Slides Tasks 1–8)

Task Description Status Notes
1 Import NY.GDP.MKTP.KD (real GDP) from WB CSV ⚠️ Code structured correctly, but input file missing so cannot verify data import.
2 Inspect & extract country/year/value βœ… Variable selection and data cleaning follow the right approach.
3 Build tidy table (country, iso3, year, value) βœ… Final CSV output indicates correct long format.
4 Compute logs & annual growth βœ… Growth computed as log differences Γ— 100; logic matches reference.
5 Verify US growth vs Week 1 ⚠️ Plot likely implemented, but cannot check without data.
6 Plot selected countries’ Real GDP (week3_rgdp_comparison.png) ⚠️ Code structure in place; figure saving assumed.
7 Plot growth subplots with average line (week3_rgdp_growth.png) ⚠️ Structure present; average line unclear; cannot test.
8 Export CSV panel with growth (clean_rgdp_panel.csv) βœ… Output file provided under a different name (IgnazioNunzi_sampleCountries_YoY.csv).

πŸ“ˆ Output Review

  • The output file IgnazioNunzi_sampleCountries_YoY.csv has the expected structure:
    CountryName, CountryCode, Year, RealGDP, LogGDP, GrowthYoY.
  • Growth rates appear correctly computed and in line with the expected transformation.

πŸ’¬ Style & Structure

  • βœ… Clear structure: input β†’ clean β†’ compute β†’ plot β†’ export.
  • ⚠️ Missing semicolons in some assignments cause minor console clutter.
  • ⚠️ Hard-coded file paths reduce portability; should use relative paths like: ```matlab opts = detectImportOptions(β€˜WB-WDI_time_series.csv’); data = readtable(β€˜WB-WDI_time_series.csv’, opts);