Skip to content

Repository files navigation

🚀 Live Data Reporter

Live Data Reporter is a terminal-based educational tool that lets students interact with live data from space missions, the ISS, and global markets. It offers real-time updates on astronauts in orbit, the current position of the International Space Station (ISS), and top business news or IBM stock data — all within a menu-driven Python console app.


📦 Features

  • 👨‍🚀 View Astronauts in Space
    Lists names and spacecraft of all astronauts currently in orbit.

  • 🛰️ Track the ISS
    Displays the real-time coordinates of the International Space Station.
    Optionally shows the ISS position on a world map using Python's turtle.

  • 📰📈 Get Business News or IBM Stock Prices
    Choose between:

    • Top 3 U.S. business headlines via NewsAPI
    • IBM stock price (real-time, 5-minute interval) via Alpha Vantage
  • 🗂️ Data Logging & Saving

    • Logs all API activity with timestamps in logs.txt
    • Saves astronaut and ISS data in data/iss_data.txt

📁 Project Structure

live-data-reporter/
├── data/
│   └── iss_data.txt            # Astronauts + ISS location log
├── images/
│   ├── map.gif                 # World map for turtle
│   └── iss.gif                 # ISS icon for turtle
├── .env                        # Real API keys (not pushed)
├── .env.example                # Template for API keys
├── main.py                     # Entry-point script with menu
├── astronauts.py               # Astronaut-fetching module
├── iss_tracker.py              # ISS tracking module
├── news_or_stock.py            # News or stock module
├── logs.txt                    # API logs
├── requirements.txt            # Python dependencies
└── README.md                   # You're reading it

🛠️ Setup Instructions

1. 📥 Clone the Repository

git clone https://github.com/SBAK729/Live-Data-Reporter.git
cd live-data-reporter

2. 🐍 Create & Activate Virtual Environment

Windows (PowerShell):

python -m venv .venv
.venv\Scripts\Activate

macOS/Linux:

python3 -m venv .venv
source .venv/bin/activate

3. 📦 Install Requirements

pip install -r requirements.txt

4. 🔐 Add API Keys

Create a .env file based on the .env.example:

NEWS_API_KEY=your_news_api_key_here
STOCK_API_KEY=your_alpha_vantage_api_key_here

Get API keys:


5. 🚀 Run the App

python main.py

Use the terminal menu to explore astronauts, ISS tracking, and market news or stocks.


📌 Sample Terminal Output

----- Live Data Reporter -----

1. View astronauts in space
2. Track ISS location
3. View U.S. business news or IBM stock
4. Exit

Enter Your choice : 1

👨‍🚀 Astronauts currently in space:
- Sergey Prokopyev on ISS
- Jasmin Moghbeli on ISS
...

🧾 Logs & Data Output

  • logs.txt: Contains API request logs with timestamps and status (Success/Fail).
  • data/iss_data.txt: Stores astronaut and ISS coordinate history.

✅ Requirements

  • Python 3.7+
  • Internet connection (for API access)
  • API keys for NewsAPI and/or Alpha Vantage

🧪 Development Notes

  • All API keys are loaded securely from .env using python-dotenv
  • Use structured exception handling to avoid crashes during data fetching

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages