Predspot 1.0.0 — first stable release and revival of the project.
pip install predspotDocumentation: https://adaj.github.io/predspot/ · PyPI: https://pypi.org/project/predspot/1.0.0/
First stable release and revival of the project: the code base now targets Python 3.10+ with current
versions of pandas (>= 2.2), GeoPandas (>= 1.0), scikit-learn and statsmodels.
Added
crime_mapping.get_city_shape("Natal, RN, Brazil")— thin wrapper around
osmnx.geocode_to_gdfreturning the raw city shape;osmnxis now a core
dependency (theosmextra is kept, empty, for compatibility).examples/natal.ipynb: an executed end-to-end walkthrough on Natal with
synthetic data (executed, with outputs), also rendered in the documentation.PredictionPipeline.evaluateaccepts a list of scorings and returns a
DataFrame (one CV pass for all metrics).- README section explaining the framework (thesis, Chapter 3, Figures 7-12);
the README is now the documentation home page. crime_mapping.load_study_area("City, Country")fetches a study area
boundary from OpenStreetMap viaosmnx(pip install predspot[osm]).synthetic.generate_crimesgenerates synthetic events inside any study
area: Gaussian hotspots plus uniform background, with trend, annual cycle,
day-of-week and hour-of-day patterns; reproducible withseed.QuadratCountmapping (event counts per cell) as a first-class alternative
toKDE, usable with hexagonal (create_gridhexagonal) and square
(create_gridsquares) grids insidePredictionPipeline.pipeline.build_default_pipelineand reproducible
pipeline.generate_testdata(..., seed=...).PredictionPipeline.features,.next_timeandrandom_state.- Test suite (pytest) and continuous integration for Python 3.10-3.13.
- Documentation rebuilt with MkDocs (Material + mkdocstrings), deployed
automatically to GitHub Pages; replaces the Sphinx site. pyproject.tomlpackaging (src layout) and automated PyPI publishing.
Changed
tfreqis optional in the feature classes (inferred from the series).- Debug
prints replaced with theloggingmodule (predspotlogger); the
debug=arguments were removed. - Wrapper estimators expose their inner estimator as
.estimator
(previously._estimator). - Version jumps from 0.1.x to 1.0.0: the public API (
Dataset, mappings,
feature classes,PredictionPipeline) is considered stable from here on. Datasetno longer modifies the input DataFrame and requires the study
area to have a CRS.- Grid centroids are computed in a projected CRS; grids accept study areas in
any CRS. geojsoncontouris an optional dependency (pip install predspot[contour]).
Removed
- Sphinx documentation sources and the committed HTML build.
QuadratCount2,KGridand the hard dependencies ondescartes,
contextilyandrtree.
Fixed
- Compatibility with pandas 2/3 (
'ME'offsets,DataFrame.append,
positionalSeriesindexing), GeoPandas 1.x (sjoin(predicate=), CRS
strings,gpd.datasets) and scikit-learn 1.x (FeatureUnioninternals). Seasonality/Trendnever calledSTL(...).fit().FeatureScalinghad nofit, so scalers inside aPipelinewere never fitted.