Skip to content

GeeksterLab/FakeMetricsAnalyzer

Repository files navigation

📊 Fake Metrics Analyzer

Fake Metrics Analyzer Pipeline codecov PyPI Streamlit


📖 Table of Contents

  1. Introduction
  2. Architecture
  3. Project Structure
  4. Libraries
  5. Installation
  6. Usage
  7. Streamlit Interface
  8. Deployment
  9. Reports
  10. Tests & CI

🧐 Introduction

Fake Metrics Analyzer is a Python project designed to analyze fake metrics like views and likes on posts to detect anomalies. The project generates detailed reports, provides visualizations (such as a scatter plot of views vs likes), and allows exploration of anomalies and trends in the data.


🚧 Architecture

Here is a Mermaid diagram that presents the main components and their interactions:

flowchart LR
  A[Data Import] --> B[Data Cleaning]
  B --> C[Anomaly Detection]
  C --> D[Data Visualization]
  D --> E[Generate Reports]
  E --> F[Streamlit Dashboard]
Loading
  • Data Import: Loading view and like data.
  • Data Cleaning: Preparing and cleaning the data.
  • Anomaly Detection: Detecting anomalies in the view and like data.
  • Data Visualization: Generating charts to better understand the data.
  • Generate Reports: Generating detailed PDF reports outlining the metrics.
  • Streamlit Dashboard: Interactive interface to explore the analysis results.

📁 Project Structure

  • assets/: Contains visual resources such as icons and CSS styles.
  • data/: Folder containing processed and prepared data.
  • env/: Virtual environment to manage project dependencies.
  • reports/: Reports generated during analysis, in PDF format.
  • scripts/: Python scripts for analysis, anomaly detection, report generation, etc.
  • visualization/: Contains data visualization scripts and tools.
  • requirements.txt: List of project dependencies.

📦 Libraries

  • pandas → Data management and analysis.
  • matplotlib → Data visualization (scatter plot, histograms).
  • seaborn → Advanced data visualization.
  • scikit-learn → Anomaly detection and statistical models.
  • streamlit (optional) → For creating an interactive dashboard.
  • fpdf → PDF report creation.
  • pytest → Unit and integration testing.
  • numpy → For mathematical operations and numerical array processing.
  • plotly (optional) → For creating interactive visualizations.
  • scipy (optional) → For advanced statistical functions or statistical tests.
  • opencv-python (optional) → For image processing.

⚙️ Installation

  1. Clone the repository:
git clone https://github.com/GeeksterLab/Fake_Metrics_Analyzer.git
cd Fake_Metrics_Analyzer
  1. Create and activate a Python environment:
python3.10 -m venv env
source env/bin/activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Install the project in development mode:
pip install -e .

🚀 Usage

  1. Run the main script to start the analysis:
python scripts/main.py
  1. Launch the Streamlit interface to explore the data interactively:
streamlit run scripts/streamlit_app.py

🌐 Streamlit Interface

The project includes a Streamlit interface that allows you to visualize anomalies in views and likes, as well as explore the metrics from different angles. You will be able to interact with the results through interactive graphs.

To start the Streamlit interface, simply run:

streamlit run scripts/streamlit_app.py

The web interface will launch, and you can interact with your data via a visual dashboard.


☁️ Deployment

  • You can try this project on Streamlit instead of installing it locally.

Streamlit


📑 Reports

Analysis results are generated as PDF reports in the reports/ folder, containing visualizations and statistical summaries.

Example of a generated report:

./reports/FakeMetrics_Report.pdf

🧪 Tests & CI

To run unit and integration tests:

pytest --cov=fake_metrics_analyzer --cov-report=term-missing --cov-report=xml

MIT © 2025 [GeeksterLab]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors