This Streamlit app demonstrates time series forecasting using the ARIMA (AutoRegressive Integrated Moving Average) model. The application focuses on predicting the economic gap (GDP difference) of developing countries based on historical data.
Before running the app, ensure you have the required libraries installed. You can install them using the following command:
pip install -r requirements.txt
The app loads a dataset from a CSV file named cleaned_dataset_with_incomegroup.csv. The data is sorted by the year and set as the index.
The sidebar allows you to configure the ARIMA model by selecting a country and adjusting the electrification level. These parameters influence the training of the ARIMA model.
The ARIMA model is built based on the selected country and electrification level. The data is split into training and testing sets, and the model is fitted to the training data.
The Mean Absolute Error (MAE) and Root Mean Squared Error (RMSE) of the ARIMA model are displayed to assess the model’s performance on the test set.
The app extends the time index to forecast the economic gap for the next 20 years. The predicted values are visualized using a dashed orange line on the economic gap plot.
To run the app, execute the following command:
streamlit run your_script_name.py
Replace your_script_name.py with the filename of your script containing the Streamlit app.
- streamlit
- pytz
- pandas
- numpy
- matplotlib
- statsmodels
- scikit-learn