π Week 3 Homework β Feedback
π Week 3 Homework β Feedback
Student: Alessia Canuto
Assignment: World Bank Real GDP & Growth (API version)
β Overall Assessment
Result: βοΈ Correct
The student successfully retrieves data using the World Bank API, processes it into a usable panel, computes log GDP and annual growth rates, and generates the required plots and CSV output.
The workflow is clear, logically ordered, and achieves all core objectives of Tasks 1β8.
π Task-by-Task Check
| Task | Description | Status | Notes |
|---|---|---|---|
| 1 | Download NY.GDP.MKTP.KD data (API) |
β | Correct use of API request and JSON decoding; retrieves multiple countries successfully. |
| 2 | Inspect and extract year/value pairs | β | Correct parsing and conversion from strings to numeric. Handles table structure cleanly. |
| 3 | Build tidy table (country, year, value) |
β | Table correctly structured and readable. |
| 4 | Compute logs & annual growth | β | Uses log differences; conditional check on positive values prevents log(0) errors. |
| 5 | Verify US series | β | US growth rates consistent with expected pattern from Week 1. |
| 6 | Plot selected countriesβ Real GDP (week3_rgdp_comparison.png) |
β | Multiple lines plotted with clear legend and labels. Saved under correct filename. |
| 7 | Plot growth rates with subplots & average line (week3_rgdp_growth.png) |
β | Subplots implemented correctly; average growth line shown. Saved with correct filename. |
| 8 | Export CSV panel (clean_rgdp_panel.csv) |
β | File correctly written with all required columns. |
π Data Handling & Robustness
- Properly skips or ignores missing and non-positive GDP values before taking logs.
- Uses table indexing efficiently; avoids manual loops where unnecessary.
- Output files created reproducibly, without hard-coded file paths.
- API calls well-structured and compatible with World Bank endpoint.
π¬ Style & Clarity
- Code is well-commented and easy to follow.
- Some lines missing semicolons, causing mild Command Window clutter β recommended to suppress intermediate outputs.
- Figure labels and legends are clear and informative.
- Logical variable names (
gdpData,growthRates,countryList) improve readability.
β Minimal Suggestions
- Add semicolons at the end of all assignment lines to keep the output clean.
- Consider rounding growth rates in tables/plots to two decimals for neater presentation.
- Optionally set consistent figure size and color scheme for uniform visual output.