(Finalize DataFun-03 project: fetch, process, and log all data types)
A Python project to fetch, analyze, and log data from multiple formats:
- CSV
- Excel
- JSON
- Plain Text (TXT)
This project demonstrates how to:
- Fetch web data using
requests - Save data in multiple formats (CSV, Excel, JSON, TXT)
- Analyze the data using
pandasand standard Python libraries - Log operations using a reusable logger (
utils_logger.py)
- Activate the virtual environment:
.venv\Scripts\activate- Run each script:
python example_get_csv.py
python example_get_excel.py
python example_get_json.py
python example_get_text.py- View logs:
logs/project_log.log| File | Description |
|---|---|
example_get_csv.py |
Fetches a CSV file from the web and analyzes it |
example_get_excel.py |
Downloads and analyzes an Excel file |
example_get_json.py |
Fetches JSON data about astronauts and analyzes it |
example_get_text.py |
Downloads a Shakespeare text and performs basic text analysis |
utils_logger.py |
Logger utility used by all scripts |
├── example_data/ │ ├── 2020_happiness.csv │ ├── astros.json │ ├── Feedback.xlsx │ └── romeo.txt │ ├── logs/ │ └── project_log.log │ ├── example_get_csv.py ├── example_get_excel.py ├── example_get_json.py ├── example_get_text.py │ ├── example_process_csv.py ├── example_process_excel.py ├── example_process_json.py ├── example_process_text.py │ ├── happiness_ladder_score_stats.txt ├── json_astronauts_by_craft.txt ├── text_romeo_word_count.txt │ ├── main.py ├── requirements.txt ├── README.md └── utils_logger.py
- Python 3.11+
requestspandasloggingpathlibjson
- How to work with different file formats
- How to use Python to automate data fetching and analysis
- How to use logging for debugging and auditability
- How to follow a professional Git + VS Code workflow
This project is part of the Data Fundamentals course
at Northwest Missouri State University.
It helps students:
- Practice using Python modules and functions
- Learn data processing and file handling
- Document and manage projects in a clean structure
Sabri Hamdaoui
Master’s Student in Data Analytics
Northwest Missouri State University
GitHub: github.com/sabrouch36
git clone https://github.com/YOUR_USERNAME/datafun-03-analytics.git
cd datafun-03-analytics
code .python -m venv .venv
.venv\Scripts\activatepip install -r requirements.txtpython main.py