Metadata-Version: 2.4
Name: polerisk
Version: 1.1.0
Summary: Predictive utility pole failure analysis and maintenance optimization platform
Home-page: https://github.com/kylejones200/polerisk
Author: Kyle T. Jones
Author-email: "Kyle T. Jones" <kyletjones@gmail.com>
License: MIT
Project-URL: homepage, https://github.com/kylejones200/polerisk
Project-URL: documentation, https://polerisk.readthedocs.io/
Project-URL: bug-tracker, https://github.com/kylejones200/polerisk/issues
Project-URL: changelog, https://github.com/kylejones200/polerisk/blob/main/CHANGELOG.md
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Utilities
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.20.0
Requires-Dist: pandas>=1.3.0
Requires-Dist: matplotlib>=3.4.0
Requires-Dist: scipy>=1.7.0
Requires-Dist: netCDF4>=1.5.0
Requires-Dist: cartopy>=0.19.0
Requires-Dist: seaborn>=0.11.0
Requires-Dist: python-dateutil>=2.8.2
Requires-Dist: scikit-learn>=1.0.0
Requires-Dist: joblib>=1.0.0
Requires-Dist: jinja2>=3.0.0
Requires-Dist: signalplot>=0.1.2
Requires-Dist: folium>=0.12.0
Provides-Extra: performance
Requires-Dist: numba>=0.56.0; extra == "performance"
Provides-Extra: dev
Requires-Dist: pytest>=6.0.0; extra == "dev"
Requires-Dist: pytest-cov>=2.0.0; extra == "dev"
Requires-Dist: pytest-benchmark>=3.4.0; extra == "dev"
Requires-Dist: hypothesis>=6.0.0; extra == "dev"
Requires-Dist: black>=21.7b0; extra == "dev"
Requires-Dist: isort>=5.0.0; extra == "dev"
Requires-Dist: flake8>=3.9.0; extra == "dev"
Requires-Dist: mypy>=0.910; extra == "dev"
Provides-Extra: docs
Requires-Dist: sphinx>=4.0.0; extra == "docs"
Requires-Dist: sphinx-rtd-theme>=0.5.0; extra == "docs"
Requires-Dist: myst-parser>=0.17.0; extra == "docs"
Provides-Extra: ml
Requires-Dist: tensorflow>=2.8.0; extra == "ml"
Requires-Dist: torch>=1.10.0; extra == "ml"
Requires-Dist: xgboost>=1.5.0; extra == "ml"
Provides-Extra: web
Requires-Dist: flask>=2.0.0; extra == "web"
Requires-Dist: flask-cors>=3.0.0; extra == "web"
Requires-Dist: fastapi>=0.70.0; extra == "web"
Requires-Dist: uvicorn[standard]>=0.15.0; extra == "web"
Requires-Dist: gunicorn>=20.1.0; extra == "web"
Provides-Extra: cloud
Requires-Dist: boto3>=1.20.0; extra == "cloud"
Requires-Dist: docker>=5.0.0; extra == "cloud"
Requires-Dist: dask>=2021.10.0; extra == "cloud"
Provides-Extra: all
Requires-Dist: numba>=0.56.0; extra == "all"
Requires-Dist: tensorflow>=2.8.0; extra == "all"
Requires-Dist: torch>=1.10.0; extra == "all"
Requires-Dist: xgboost>=1.5.0; extra == "all"
Requires-Dist: flask>=2.0.0; extra == "all"
Requires-Dist: flask-cors>=3.0.0; extra == "all"
Requires-Dist: fastapi>=0.70.0; extra == "all"
Requires-Dist: uvicorn[standard]>=0.15.0; extra == "all"
Requires-Dist: gunicorn>=20.1.0; extra == "all"
Requires-Dist: boto3>=1.20.0; extra == "all"
Requires-Dist: docker>=5.0.0; extra == "all"
Requires-Dist: dask>=2021.10.0; extra == "all"
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

# polerisk

**Predictive utility pole failure analysis and maintenance optimization platform**

## What You Get

`polerisk` provides comprehensive tools for analyzing utility pole health, predicting failures, and optimizing maintenance schedules. Built for utility companies, infrastructure managers, and risk analysts who need data-driven insights for pole management.

### Key Capabilities

**🔍 Risk Assessment**
- Analyze pole condition and failure probability
- Multi-factor risk scoring (age, material, weather exposure, load)
- Historical failure pattern analysis
- Predictive maintenance scheduling

**📊 Data-Driven Insights**
- Statistical analysis of pole populations
- Geospatial visualization of risk hotspots
- Time series analysis for degradation patterns
- Cost-benefit analysis for maintenance prioritization

**🤖 Machine Learning Models**
- Failure prediction models
- Anomaly detection for unusual deterioration
- Risk clustering and pattern recognition
- Custom model training on your data

**📈 Reporting & Visualization**
- Interactive dashboards
- Exportable reports (PDF, CSV, HTML)
- Map-based visualizations
- Custom analytics for your KPIs

## Installation

```bash
pip install polerisk
```

### Optional Packages

Install additional capabilities based on your needs:

```bash
# For enhanced performance
pip install polerisk[performance]

# For machine learning features
pip install polerisk[ml]

# For web dashboard
pip install polerisk[web]

# For cloud deployment
pip install polerisk[cloud]

# Install everything
pip install polerisk[all]
```

## Quick Start

```python
import polerisk

# Load your pole data
poles = polerisk.load_data('pole_inventory.csv')

# Assess risk for all poles
risk_assessment = polerisk.assess_risk(poles)

# Get high-risk poles
high_risk = risk_assessment[risk_assessment['risk_score'] > 0.7]

# Generate maintenance schedule
schedule = polerisk.optimize_maintenance(
    high_risk,
    budget=100000,
    time_horizon='1year'
)

# Export results
schedule.to_csv('maintenance_plan.csv')
polerisk.generate_report(schedule, output='report.html')
```

## Core Features

### Risk Analysis
```python
# Calculate failure probability
risk_scores = polerisk.calculate_risk(
    poles,
    factors=['age', 'material', 'weather_exposure', 'load'],
    weights='auto'  # or specify custom weights
)

# Identify critical infrastructure
critical = polerisk.identify_critical_poles(
    poles,
    criteria=['customer_impact', 'replacement_cost', 'failure_risk']
)
```

### Predictive Modeling
```python
# Train a failure prediction model
model = polerisk.train_model(
    historical_data,
    target='failure_within_year',
    model_type='random_forest'
)

# Predict failures
predictions = model.predict(current_poles)

# Evaluate model performance
metrics = model.evaluate(test_data)
print(f"Accuracy: {metrics['accuracy']:.2%}")
```

### Geospatial Analysis
```python
# Create risk heat map
risk_map = polerisk.create_risk_map(
    poles,
    base_map='openstreetmap',
    cluster_radius=5  # km
)

# Export interactive map
risk_map.save('pole_risk_map.html')

# Find poles in high-risk zones
zones = polerisk.identify_risk_zones(poles, threshold=0.8)
```

### Maintenance Optimization
```python
# Optimize maintenance schedule
optimal_plan = polerisk.optimize_maintenance(
    poles,
    budget=500000,
    constraints={
        'max_poles_per_month': 100,
        'min_risk_threshold': 0.6,
        'region_balance': True
    }
)

# Calculate ROI
roi = polerisk.calculate_roi(
    optimal_plan,
    avoided_failures=estimated_failures,
    failure_cost=avg_failure_cost
)
```

## Data Requirements

`polerisk` works with standard pole inventory data:

**Minimum Required Fields:**
- Pole ID
- Location (latitude/longitude or address)
- Installation date or age
- Material type

**Recommended Fields for Better Analysis:**
- Inspection history
- Maintenance records
- Load data
- Weather exposure
- Soil conditions
- Previous failures

**Supported Data Formats:**
- CSV, Excel
- JSON, GeoJSON
- Shapefiles
- SQL databases
- REST APIs

## Use Cases

### Utility Companies
- Reduce unexpected outages by 40-60%
- Optimize maintenance budgets
- Prioritize inspections based on risk
- Comply with regulatory requirements

### Infrastructure Managers
- Long-term asset planning
- Capital expenditure optimization
- Risk-based decision making
- Performance benchmarking

### Risk Analysts
- Portfolio-level risk assessment
- Scenario analysis and modeling
- Cost-benefit analysis
- Regulatory reporting

## Performance

- Analyze **100,000+ poles** in seconds
- Real-time risk scoring
- Parallel processing for large datasets
- Cloud-scalable architecture

## Support

- 📚 **Documentation**: [polerisk.readthedocs.io](https://polerisk.readthedocs.io/)
- 🐛 **Issues**: [github.com/kylejones200/polerisk/issues](https://github.com/kylejones200/polerisk/issues)
- 💬 **Discussions**: [github.com/kylejones200/polerisk/discussions](https://github.com/kylejones200/polerisk/discussions)
- 📧 **Contact**: kyletjones@gmail.com

## Requirements

- Python 3.12 or higher
- Standard data science libraries (automatically installed)

## License

MIT License - Free for commercial and personal use.

---

**Ready to optimize your pole maintenance?**

```bash
pip install polerisk
```

[Get Started](https://polerisk.readthedocs.io/quickstart) | [View Examples](https://github.com/kylejones200/polerisk/tree/main/examples) | [API Reference](https://polerisk.readthedocs.io/api)
