Skip to content

cdelnano/legatum-index-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Comprehensive Time-Series Analysis Tool

Description: This Python package is designed to offer robust tools for the analysis and visualization of time-series data, focusing on the comparison of actual versus forecasted outcomes across various dimensions such as Safety and Security, Personal Freedom, and Governance. It includes three primary scripts:

  1. arima_model.py

    • Purpose: Fits ARIMA models to time-series data to make predictions and visualize the forecasted results.
    • Key Features: Supports customization of ARIMA parameters, graphical representation of forecasts vs. actual data, and insights into potential future trends.
  2. error_metrics.py

    • Purpose: Computes standard error metrics to assess forecast accuracy.
    • Metrics Included: Mean Squared Error (MSE), Mean Absolute Error (MAE), and Root Mean Squared Error (RMSE).
    • Output: Outputs both console-based results and a CSV file with detailed metrics for further analysis.
  3. plot.py

    • Purpose: An interactive Dash application for dynamic visualization of time-series data.
    • Functionality: Allows users to explore data trends visually across different countries and categories over time through an interactive web-based dashboard.

Installation:

Prerequisites:

  • Python 3.x: Install from python.org.

Steps:

  1. Clone the repository or download the package to your local machine.
  2. Navigate to the package directory.
  3. Install the necessary dependencies using pip: pip install dash pandas plotly sklearn numpy
  4. Update the file paths in the scripts (arima_model.py, error_metrics.py, plot.py) to point to your data directories or specific files.

Execution:

Running ARIMA Model Script (arima_model.py):

  1. Place your dataset in the designated directory or update the dataset path in the script.
  2. To execute, run: python3 arima_model.py
  3. Outputs will include a graphical display of the ARIMA model predictions and actual data, saved to a file or displayed on screen.

Calculating Error Metrics (error_metrics.py):

  1. Verify that the dataset path in the script matches where your data is stored.
  2. Execute the script with: python3 error_metrics.py
  3. Error metrics will be printed to the console, and a CSV file with detailed results will be saved in the specified output directory.

Data Visualization with Dash (plot.py):

  1. Confirm that the script is located in the correct directory to access the necessary data files.
  2. Run the script using: python3 plot.py
  3. Open a web browser and navigate to http://127.0.0.1:8050/ to interact with the dynamic visualization dashboard.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages