Skip to content

Releases: adaj/predspot

Release list

Predspot 1.0.0

Choose a tag to compare

@adaj adaj released this 14 Sep 19:49
498ef8d

Predspot 1.0.0 — first stable release and revival of the project.

pip install predspot

Documentation: 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_gdf returning the raw city shape; osmnx is now a core
    dependency (the osm extra 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.evaluate accepts 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 via osmnx (pip install predspot[osm]).
  • synthetic.generate_crimes generates synthetic events inside any study
    area: Gaussian hotspots plus uniform background, with trend, annual cycle,
    day-of-week and hour-of-day patterns; reproducible with seed.
  • QuadratCount mapping (event counts per cell) as a first-class alternative
    to KDE, usable with hexagonal (create_gridhexagonal) and square
    (create_gridsquares) grids inside PredictionPipeline.
  • pipeline.build_default_pipeline and reproducible
    pipeline.generate_testdata(..., seed=...).
  • PredictionPipeline.features, .next_time and random_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.toml packaging (src layout) and automated PyPI publishing.

Changed

  • tfreq is optional in the feature classes (inferred from the series).
  • Debug prints replaced with the logging module (predspot logger); 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.
  • Dataset no 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.
  • geojsoncontour is an optional dependency (pip install predspot[contour]).

Removed

  • Sphinx documentation sources and the committed HTML build.
  • QuadratCount2, KGrid and the hard dependencies on descartes,
    contextily and rtree.

Fixed

  • Compatibility with pandas 2/3 ('ME' offsets, DataFrame.append,
    positional Series indexing), GeoPandas 1.x (sjoin(predicate=), CRS
    strings, gpd.datasets) and scikit-learn 1.x (FeatureUnion internals).
  • Seasonality/Trend never called STL(...).fit().
  • FeatureScaling had no fit, so scalers inside a Pipeline were never fitted.