Vivid Macro is an open-source project designed to simplify access to macroeconomic data from various sources. With support for fetching data directly from the FRED (Federal Reserve Economic Data) database and ASCII datasets from Tealbook (previously Greenbook), it serves as a comprehensive tool for macroeconomists and data analysts. The platform offers an intuitive interface for generating Vector Autoregression (VAR) visualizations, enabling users to easily explore and understand the dynamics among various economic indicators. Developed with Flask and delivered as a Docker container, Vivid Macro makes macroeconomic analysis accessible for personal and educational purposes.
VividMacro is a Docker-packaged Flask web application available on Docker Hub. This guide shows how to start it with Docker.
Download and install Docker Desktop for your operating system to proceed, you can find it on Docker's official website.
To download the image, execute the following command in your terminal or command prompt:
docker pull gaspardlemarque/vivid-macro:dev
With the Docker image downloaded, you can run the application by executing:
docker run -p 4000:5000 gaspardlemarque/vivid-macro:dev
This command initiates a Docker container from the vivid-macro
image.
Here, -p 4000:5000
maps port 4000 on your local machine to port 5000
inside the Docker container, which is the default port Flask listens on.
The application is now accessible in your local environment
at http://localhost:4000
.
To retrieve macroeconomic data from the FRED (Federal Reserve Economic Data) database through Vivid Macro, you'll need to obtain and configure an API key.
- Visit the FRED API documentation page at https://fred.stlouisfed.org/docs/api/api_key.html.
- If you don't already have an account on the FRED website, you will need to create one. Click on "My Account" button and follow the instructions.
- Once you have a FRED account, log in and generate a new API key. This key is unique to your account and will be used to authenticate your requests to the FRED API via Vivid Macro.
After obtaining your API key, you'll need to configure Vivid Macro to use it:
-
In the root directory, create a file named
.env
. It will be used to store environment variables, including your FRED API key. -
Open the
.env
file with your favorite text editor. -
Add a line for the FRED API key in the following format:
API_KEY='your_api_key_here'
Replace
'your_api_key_here'
with the actual API key you obtained from FRED. Ensure there are no spaces before or after the equals sign. -
Save your changes. Vivid Macro is now configured to authenticate with the FRED API using your API key.
preview.webm
This project is licensed under the MIT License. See the LICENSE
file for more details.