Metadata-Version: 2.4
Name: orgnet
Version: 0.2.0
Summary: Organizational Network Analysis Platform using ML and Graph Analytics
Home-page: https://github.com/kylejones200/orgnet
Author: Kyle Jones
Author-email: Kyle Jones <kyletjones@gmail.com>
Maintainer-email: Kyle Jones <kyletjones@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/kylejones200/orgnet
Project-URL: Documentation, https://github.com/kylejones200/orgnet#readme
Project-URL: Repository, https://github.com/kylejones200/orgnet
Project-URL: Issues, https://github.com/kylejones200/orgnet/issues
Keywords: organizational-network-analysis,network-analysis,graph-analytics,machine-learning,social-network-analysis,organizational-behavior,collaboration-analysis
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Operating System :: OS Independent
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.24.0
Requires-Dist: pandas>=2.0.0
Requires-Dist: networkx>=3.1
Requires-Dist: scipy>=1.10.0
Requires-Dist: scikit-learn>=1.3.0
Requires-Dist: python-dateutil>=2.8.2
Requires-Dist: pytz>=2023.3
Requires-Dist: pyyaml>=6.0
Requires-Dist: tqdm>=4.65.0
Requires-Dist: joblib>=1.3.0
Provides-Extra: graph
Requires-Dist: python-igraph>=0.10.0; extra == "graph"
Requires-Dist: node2vec>=0.4.6; extra == "graph"
Provides-Extra: ml
Requires-Dist: torch>=2.0.0; extra == "ml"
Requires-Dist: torch-geometric>=2.3.0; extra == "ml"
Requires-Dist: transformers>=4.30.0; extra == "ml"
Requires-Dist: sentence-transformers>=2.2.0; extra == "ml"
Provides-Extra: nlp
Requires-Dist: nltk>=3.8.1; extra == "nlp"
Requires-Dist: spacy>=3.5.0; extra == "nlp"
Requires-Dist: bertopic>=0.15.0; extra == "nlp"
Requires-Dist: gensim>=4.3.0; extra == "nlp"
Provides-Extra: viz
Requires-Dist: matplotlib<4.0.0,>=3.7.0; extra == "viz"
Requires-Dist: seaborn>=0.12.0; extra == "viz"
Requires-Dist: plotsmith>=0.2.0; python_version >= "3.12" and extra == "viz"
Requires-Dist: pyvis>=0.3.2; extra == "viz"
Provides-Extra: temporal
Requires-Dist: ruptures>=1.1.8; extra == "temporal"
Provides-Extra: three-es
Requires-Dist: SQLAlchemy>=2.0.23; extra == "three-es"
Requires-Dist: alembic>=1.13.1; extra == "three-es"
Requires-Dist: python-dotenv>=1.0.0; extra == "three-es"
Requires-Dist: anomsmith>=0.0.2; extra == "three-es"
Provides-Extra: three-es-viz
Requires-Dist: plotsmith>=0.2.0; python_version >= "3.12" and extra == "three-es-viz"
Requires-Dist: matplotlib>=3.7.0; extra == "three-es-viz"
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: flake8>=6.0.0; extra == "dev"
Provides-Extra: docs
Requires-Dist: sphinx>=5.0.0; extra == "docs"
Requires-Dist: sphinx-rtd-theme>=1.2.0; extra == "docs"
Requires-Dist: myst-parser>=1.0.0; extra == "docs"
Provides-Extra: all
Requires-Dist: orgnet[auth,data,email,examples,export,graph,ml,mlops,nlp,stats,temporal,three-es,viz]; extra == "all"
Provides-Extra: export
Requires-Dist: openpyxl>=3.1.0; extra == "export"
Requires-Dist: reportlab>=4.0.0; extra == "export"
Requires-Dist: python-pptx>=0.6.21; extra == "export"
Provides-Extra: stats
Requires-Dist: statsmodels>=0.14.0; extra == "stats"
Provides-Extra: mlops
Requires-Dist: mlflow>=2.0.0; extra == "mlops"
Provides-Extra: data
Requires-Dist: polars>=0.19.0; extra == "data"
Requires-Dist: pyarrow>=12.0.0; extra == "data"
Requires-Dist: fastparquet>=2023.4.0; extra == "data"
Requires-Dist: numba>=0.58.0; extra == "data"
Provides-Extra: examples
Requires-Dist: faker>=19.0.0; extra == "examples"
Requires-Dist: jupyter>=1.0.0; extra == "examples"
Provides-Extra: auth
Requires-Dist: PyJWT>=2.8.0; extra == "auth"
Provides-Extra: email
Requires-Dist: sentence-transformers>=2.2.0; extra == "email"
Requires-Dist: umap-learn>=0.5.4; extra == "email"
Requires-Dist: hdbscan>=0.8.33; extra == "email"
Requires-Dist: faiss-cpu>=1.7.4; extra == "email"
Requires-Dist: email-validator>=2.0.0; extra == "email"
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

# Organizational Network Analysis (ONA) Platform

A comprehensive Python application for analyzing organizational networks using machine learning and graph analytics. This platform transforms digital exhaust (emails, Slack messages, calendar data, code commits, etc.) into actionable insights about organizational structure, collaboration patterns, and network dynamics.

## Features

- **Multi-source Data Ingestion**: Supports email, Slack/Teams, calendar, documents, code repositories, and HRIS systems
- **Graph Construction**: Builds weighted, temporal organizational graphs with sophisticated edge weighting
- **Network Metrics**: Computes centrality measures (degree, betweenness, eigenvector, closeness), structural holes, and core-periphery analysis
- **Community Detection**: Multiple algorithms (Louvain, Infomap, Label Propagation, SBM)
- **Machine Learning**: Graph Neural Networks (GCN, GAT), Node2Vec embeddings, link prediction
- **NLP Analysis**: Topic modeling (LDA, BERTopic), expertise inference, sentiment analysis
- **Temporal Analysis**: Change point detection, onboarding integration tracking, network evolution
- **Multi-modal Fusion**: Combines insights from multiple data sources
- **Anomaly Detection**: Detects isolation, overload, and temporal anomalies
- **Intervention Framework**: FINDING → HYPOTHESIS → INTERVENTION → MEASUREMENT workflow
- **Ego Network Analysis**: Personal network analysis for individuals
- **Cross-Modal Validation**: Validates insights across different data sources
- **Team Stability Analysis**: Time-Size Paradox analysis for team retention and stability
- **Bonding/Bridging Analysis**: Analyzes within-group (bonding) vs between-group (bridging) connections
- **Reporting**: HTML reports and static or interactive network views (Pyvis, etc.)
- **Privacy-First**: Built with privacy and ethics considerations

## Installation

Dependencies are declared in `pyproject.toml` and pinned in **`uv.lock`**. Use [uv](https://docs.astral.sh/uv/) for reproducible installs, or install with pip and extras as usual.

```bash
# Option A: uv (recommended — uses uv.lock)
uv sync --all-extras

# Option B: pip editable install with optional stacks
pip install -e ".[all]"

# Download spaCy language model (NLP extra)
python -m spacy download en_core_web_sm
```

Core-only install: `uv sync` or `pip install -e .`. After changing dependencies in `pyproject.toml`, refresh the lockfile with `uv lock` and commit `uv.lock`.

## Quick Start

```python
from orgnet.core import OrganizationalNetworkAnalyzer

# Initialize analyzer
analyzer = OrganizationalNetworkAnalyzer(config_path="config.yaml")

# Load data
analyzer.load_data()

# Build graph
graph = analyzer.build_graph()

# Run analysis
results = analyzer.analyze()

# Generate report
analyzer.generate_report(output_path="report.html")
```

## Testing

Run the test suite:

```bash
pytest
```

For coverage report:

```bash
pytest --cov=orgnet --cov-report=html
```

See [tests/README.md](tests/README.md) for more details.

## Code Quality

Format code with black:

```bash
black orgnet/ tests/ example.py --line-length 100
```

Check code style with flake8:

```bash
flake8 orgnet/ tests/ example.py --max-line-length=100
```

Or use the Makefile:

```bash
make format   # Format code
make lint     # Check style
make test     # Run tests
make check    # Format, lint, and test
```

## Project Structure

```
ONA/
├── orgnet/
│   ├── __init__.py
│   ├── core.py                 # Main analyzer class
│   ├── config.py               # Configuration management
│   ├── data/
│   │   ├── __init__.py
│   │   ├── ingestion.py        # Data ingestion layer
│   │   ├── models.py           # Data models
│   │   └── processors.py       # Data processing utilities
│   ├── graph/
│   │   ├── __init__.py
│   │   ├── builder.py          # Graph construction
│   │   ├── weights.py          # Edge weight calculations
│   │   └── temporal.py         # Temporal graph handling
│   ├── metrics/
│   │   ├── __init__.py
│   │   ├── centrality.py       # Centrality measures
│   │   ├── structural.py       # Structural holes, core-periphery
│   │   └── community.py        # Community detection
│   ├── ml/
│   │   ├── __init__.py
│   │   ├── gnn.py              # Graph Neural Networks
│   │   ├── embeddings.py       # Node2Vec, etc.
│   │   └── link_prediction.py  # Link prediction models
│   ├── nlp/
│   │   ├── __init__.py
│   │   ├── topics.py           # Topic modeling
│   │   └── expertise.py        # Expertise inference
│   ├── temporal/
│   │   ├── __init__.py
│   │   ├── change_detection.py # Change point detection
│   │   └── onboarding.py      # Onboarding analysis
│   ├── visualization/
│   │   ├── __init__.py
│   │   ├── network.py          # Network visualizations
│   │   └── dashboards.py       # Dashboard components
├── config.yaml                 # Configuration file
├── pyproject.toml              # Package metadata and optional dependency groups
├── uv.lock                     # Resolved dependency lockfile (uv)
└── README.md                   # This file
```

## Configuration

Edit `config.yaml` to configure:
- Data source settings
- Graph construction parameters
- Analysis preferences
- Privacy settings

## Privacy & Ethics

This tool is designed with privacy in mind:
- Aggregates data before storage
- Respects retention policies
- Focuses on patterns, not individual monitoring
- Configurable anonymization

**Important**: Always obtain proper consent and follow organizational policies before deploying.

## License

MIT License

## Contributing

Contributions welcome! Please read the contributing guidelines first.


