Skip to content

huseyna/economic_analyzer

Repository files navigation

Economic Analyzer

A CLI tool for generating macroeconomic reports from CSV data files.

Installation

pip install -r requirements.txt

Usage

python main.py --files dataset1.csv dataset2.csv --report average-gdp

Available Reports

Report name Description
average-gdp Average GDP per country, sorted descending
continent-gdp-share Cumulative GDP across all years and its percentage share

Adding a New Report

  1. Create a new file in reports/, e.g. reports/ucontinent_gdp.py
  2. Implement a function with signature def continent_gdp_share_report(rows: list[dict]) -> str
  3. Register it in reports/__init__.py:
from reports.continent_gdp import continent_gdp_share_report

REPORTS: dict = {
    ...
    "continent-gdp-share": continent_gdp_share_report,
}

That's it — the new report is automatically available via --report continent-gdp-share.

Running Tests

pytest

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages