NIElytics
Independent Python analytics library for ClimateLens India (SDG 13). This repository implements core analytics and optional visualization, not a frontend, backend, or operational disaster service.
For step-by-step setup, every testing/build command, and practical Python examples, see Commands and usage.
Implemented library capabilities (0.1.0 development tree)
- Installable
srcpackage; Python 3.11+. - Local CSV, Excel, JSON, Parquet and DataFrame loading with explicit date parsing.
- Non-mutating
Datasetcleaning and operation history. - Missing-value reports, JSON-compatible profiling, descriptive/grouped statistics, correlations and covariance.
- JSON-safe table records and a standalone synthetic-data integration example.
- Explicit rolling means, missing-date detection, monthly baseline anomalies, and descriptive outlier masks.
- Optional line, bar, histogram, box, scatter, correlation, time-series, distribution, seasonal, and geographic figures; explicit display/export, never automatic GUI launch.
Install
python3 -m venv .venv
.venv/bin/python -m pip install -e '.[dev]'
.venv/bin/python -m pytest
.venv/bin/python examples/basic_analysis.py
For filesystems that do not support virtual-environment symlinks (some removable drives), put the environment on a native filesystem instead, e.g. python3 -m venv --copies /tmp/nielytics-env, then use that environment's Python. /tmp is temporary; choose a persistent native-filesystem location for ongoing work.
A consumer installs the complete current feature set with python -m pip install nielytics after publication, or python -m pip install /path/to/nielytics from this checkout. Core analytics, Excel and Parquet readers, visualization, and geospatial plotting dependencies are included in the standard install. Development dependencies are not. A public package-index release has not been performed; the intended distribution name is nielytics.
Quick start
import pandas as pd
from nielytics import Dataset
# Synthetic demonstration, not climate observations.
data = Dataset(pd.DataFrame({"value": [10.0, 20.0, None]}))
cleaned = data.fill_missing(columns=["value"], strategy="mean")
print(cleaned.summary())
payload = {"profile": cleaned.profile(), "records": cleaned.to_records()}
Dataset("measurements.csv", parse_dates=["date"]) loads a local file. Source data and existing Dataset instances are preserved; cleaning returns a new Dataset. The frame and history properties return copies. Pandas deep copies do not recursively isolate mutable objects inside cells: use scalar table values.
Statistics skip missing values. Variance/std default to sample statistics (ddof=1); insufficient data produces missing results, not invented zeroes. No unit conversion or climate interpretation is implicit. to_records() omits the index, encodes dates as ISO strings at millisecond precision, and maps missing/nonfinite values to JSON null.
Display and export graphs
python -m pip install -e .
python examples/visualization_gallery.py --output-dir charts
# Explicitly open interactive charts in your browser:
python examples/visualization_gallery.py --output-dir charts --show
The gallery uses synthetic measurements and writes nine interactive HTML charts plus a geographic PNG. Open the HTML files in a browser; they embed Plotly and work offline. Functions in nielytics.core.visualization return figures, not windows. Use fig.show() explicitly for Plotly, fig.write_html(...)/fig.to_json() for export, and fig.savefig(...) for geographic Matplotlib figures. See Commands and usage for all ten function calls and display troubleshooting.
Architecture and limitations
nielytics is one installable package. Dataset, ten plotting functions, AnalysisResult, and the five hazard analyzers are importable from the package root. Internal modules remain available under nielytics.core, nielytics.hazards, nielytics.climate.providers, and nielytics.geospatial. Optional plotting dependencies are imported on use, not on core import.
Heat, rainfall/flood, drought, landslide and cyclone analyzers return explicitly labeled indicators from caller-provided inputs. They do not issue official declarations or validated predictions. Climate connectors require explicit calls, preserve provider attribution, and distinguish historical modeled data from event catalogs. The NASA COOLR service URL returned HTTP 404; catalog access and provider coverage are documented in data sources. No live alert or forecast feed is claimed. Unsupported provider fields and regions are not fabricated. See API reference, integration contract, GeoJSON guide, and team handoff.
The full long-term master specification includes advanced comparisons, automatic insights, reporting, and an optional configured facade; these are not implemented. External licensing and competition rules on prebuilt libraries require separate confirmation. Teammates own routing, authentication, storage, and display.
Synthetic hazard and map example
python examples/climate_indicators.py
The output contains five JSON-compatible indicator results and an EPSG:4326 GeoJSON point; all measurements are synthetic demonstrations, not provider observations. For real historical provider data, call the connectors explicitly using nielytics.climate.providers and check the source metadata. See commands and usage.
Release preparation
Use a virtual environment. Run python -m pytest, python -m ruff check src tests examples, the installed-package examples, and python -m build. Choose a license with the owner before redistribution. No public index release has been performed.
Metadata
Release files for nielytics 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nielytics-0.1.0.tar.gz | 13.4 MB | Without provenance | Details for nielytics-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nielytics-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for nielytics-0.1.0-py3-none-any.whl |
Total release size: 13.4 MB
Release files / nielytics-0.1.0.tar.gz
| Download URL | nielytics-0.1.0.tar.gz |
|---|---|
| Size | 13.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
266fff1c93457130240508c5db570ec4d39ef2016a82de6feb63f19c291c8cad
|
|
BLAKE2b-256 checksum How to use checksums |
6855a3fef5482952ab32edcea67c9bff65e98d4b2964c2097239355763093935
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / nielytics-0.1.0-py3-none-any.whl
| Download URL | nielytics-0.1.0-py3-none-any.whl |
|---|---|
| Size | 66.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ba028bf69b01a81cb7aec8b78dc4aa9591ecbffa8f184da025673cc3863cf118
|
|
BLAKE2b-256 checksum How to use checksums |
6ba38e64eb340072dc154aa5f98b13209162de5338b642e063f004bfdccc6cbb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for nielytics 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.