FastAPI · scikit-learn · World Bank data

Forecast a country's energy and economy.

Solaire Predictor is a small FastAPI service that predicts six metrics — electricity usage, GDP total, GDP growth, population, population growth, and electrification rate — for any country, at any future year. Trained on World Bank historical data with scikit-learn regression, deployed standalone on the Afrotomation cluster.

Live prediction

Pick a metric, country code, and target year. The form POSTs the same JSON your code would send.

Pick a metric and click Predict.
prediction will appear here
curl equivalent:
# pick a metric to see the request

API surface

All prediction endpoints accept the same JSON body and return the same shape.

Electricity POST/predict-electricity-usage kWh/capita/year for the requested country & year.
GDP total POST/predict-gdp-total Total GDP in current US$.
GDP growth POST/predict-gdp-growth Annual GDP growth rate (%).
Population POST/predict-population Total population count.
Pop growth POST/predict-population-growth Annual population growth rate (%).
Electrification POST/predict-electrification-rate % of population with grid access.

Body for every POST: {"country_code": "BFA", "year": "2030", "use_linear": true}. Response: {"predicted_value": <float>}.