Skip to content

QbikEdge/marketstack-plotter

Repository files navigation

DE

Marketstack Plotter

An advanced plotter program that loads financial data either via the Marketstack API or from a local JSON/CSV file and visualizes them in two different plot areas.

Table of Contents

About the App

The Modern Data Plotter offers two different plot areas:

  • Standard Plot: Visualizes the default progression of date against close.
  • Custom Plot: Users can individually select the x- and y-axis from the loaded data and set additional plot settings such as title, axis labels, chart type, color, legend, and color bar.

Additionally, the loaded data can be saved as JSON or CSV. The user-friendly interface also allows fetching data via the Marketstack API or loading from local files.

Features

  • 📃 Data Source:
    • Load financial data via the Marketstack API.
    • Load local JSON or CSV files.
  • 📈 Plotting 📊:
    • Standard plot: date vs. close.
    • Custom plot with freely selectable axes.
    • Support for line charts, scatter plots, and bar charts.
  • ⌨ UI Elements:
    • Dropdown menu for the 30 most common stock symbols.
    • Text field for entering custom stock symbols.
    • Color selection, legend, and color bar options.
    • Menu and toolbar elements with icons.
  • 🖨 Data Export:
    • Save the plot as an image (PNG/JPEG).
    • Export data as JSON or CSV.
  • 🌙 Modern Design:
    • Uses the qdarkstyle theme for a modern, dark interface.

Installation

It is recommended to create a virtual environment (venv). Click here to learn more:
python -m venv market-plotter

Activate venv:

Windows:

.market-plotter\Scripts\activate

Linux/macOS:

source market-plotter/bin/activate
Deactivate virtual environment
deactivate
Remove virtual environment:
Windows:
rmdir /S /Q market-plotter

Linux/macOS:

rm -rf market-plotter
Rename virtual environment:

First, deactivate if active

deactivate

Windows (CMD):

 ren market-plotter new_name

Linux/macOS:

  mv market-plotter new_name

After renaming, verify and update absolute paths in activation scripts if necessary.

Ensure that Python 3 is installed. Then install the required packages via pip:

pip install PySide6 matplotlib qdarkstyle pandas requests

Alternatively, you can use the requirements.txt file:

pip install -r requirements.txt
If desired, the program can also be compiled into an executable exe file for Windows systems. The pyinstaller package is required for this:
pip install pyinstaller

Then compile the program with the following command:

pyinstaller --onefile --windowed --icon=icon.ico MarketDataAPIv3.py

Usage

❗ Before starting the program, a marketstack.com key should be added to the .env file.

Start the program via the command line:

python MarketDataAPIv3.py

After launching the program, a stock symbol can be selected from the dropdown menu or a custom symbol can be entered. Data can then be loaded either via the API or from a local file.

Custom plot options can be configured via the GUI. The plot can be saved as an image, and the data can be exported.

Screenshots

UI PySide6

img.png img_1.png

Sources

About

This program loads financial data either via the Marketstack API or from a local JSON or CSV file.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages