Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 46 additions & 31 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,35 +1,50 @@
Next release
============

* Add support for Python 3.14, NumPy 2, Pandas 3, and Pandana 0.8.
* Establish NumPy 1.26 and Pandas 2.2 as the tested dependency floors.
* Move package metadata to ``pyproject.toml`` and validate source and wheel
distributions in continuous integration; declare Pandana as an optional
``network`` extra.
* Test on macOS and Windows as well as Linux, and build the documentation with
warnings as errors in continuous integration.
* Preserve choice-result dtypes and filtering behavior under Pandas 3.
* Correct chained assignment in the square-foot pro forma under Pandas 3
copy-on-write semantics.
* Fix ``Developer.pick()`` failing when ``form`` is None: all the forms in the
feasibility table now compete on profitability, as intended (#194, thanks to
Hana Sevcikova). Passing a flat single-form feasibility table still works.
* Fix the transition model dropping linked rows (e.g. persons) for a row that
is both copied and removed in the same transition (#233, reported by Hana
Sevcikova with the fix used at PSRC).
* Preserve index names in tables returned by the transition model (#221,
thanks to Scott Bridwell and Hana Sevcikova).
* Warn when rows match none of the segments in a transition model's
v3.3rc1
=======

2026/09/15

Release candidate for v3.3, the first release since v3.2 in May 2020. It restores
compatibility with current versions of Python and the scientific Python stack,
modernizes the packaging and continuous integration, and fixes several
long-standing bugs.

* Requires Python 3.10 or later, and is tested on Python 3.10 through 3.14 with
NumPy 1.26 through 2.x, Pandas 2.2 through 3.x, SciPy 1.10+, Statsmodels 0.14+,
and Orca 1.8+. Drops support for Python 2 and for Python 3.5 through 3.9
(#235, #239).
* Removes uses of NumPy and Pandas features that no longer exist, such as
``np.int`` and ``Series.iteritems()``, which made v3.2 fail on NumPy 1.24+ and
Pandas 2 (#231, #232).
* Preserves choice-result dtypes and filtering behavior under Pandas 3, and
corrects chained assignment in the square-foot pro forma under Pandas 3
copy-on-write semantics (#239).
* Supports Pandana 0.8 for the network accessibility utilities, now declared as
an optional ``network`` extra: ``pip install "urbansim[network]"`` (#239).
* Fixes ``Developer.pick()`` failing when ``form`` is None: all the forms in the
feasibility table now compete on profitability, as intended. Passing a flat
single-form feasibility table still works (#194).
* Fixes the transition model dropping linked rows (e.g. persons) for a row that
is both copied and removed in the same transition (#233), and no longer reuses
the ids of removed linked rows for new ones.
* Preserves index names in tables returned by the transition model (#221).
* Warns when rows match none of the segments in a transition model's
configuration, since they are silently dropped from the updated table, or
match more than one segment, since they are duplicated (#207, reported by
Stefan Coe and Hana Sevcikova).
* New rows added to linked tables by the transition model no longer reuse the
ids of rows removed in the same step.
* The DataFrame explorer handles float-typed zone ids in map queries (#204;
fixed as a side effect of the Pandas compatibility work).
* Releases are built, verified, and published to PyPI by a GitHub Actions
workflow using Trusted Publishing, and the contributor guide documents the
release process.
match more than one segment, since they are duplicated (#207).
* The DataFrame explorer handles float-typed zone ids in map queries (#204).
* Moves package metadata to ``pyproject.toml`` and removes ``setup.py`` (#239).
* Replaces Travis CI and AppVeyor with GitHub Actions continuous integration
that tests the minimum and current dependency versions on Linux, macOS, and
Windows, checks code style, validates the built distributions, and builds the
documentation with warnings as errors (#235, #239). Releases are built,
verified, and published to PyPI by a GitHub Actions workflow using Trusted
Publishing (#244).
* ``main`` is now the integration branch; ``dev`` and ``master`` are retired
(#236).
* Thanks to Paul Waddell for the compatibility, packaging, and CI work; to Juan
Caicedo and Sol Tadeo, whose earlier NumPy and Pandas compatibility fixes
were incorporated; to Hana Sevcikova for the developer model fix and the
transition model reports and fix; and to Scott Bridwell and Stefan Coe for
the reports.

v3.2
====
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ UrbanSim
========

.. image:: https://img.shields.io/pypi/v/urbansim.svg
:target: https://pypi.python.org/pypi/urbansim/
:target: https://pypi.org/project/urbansim/
:alt: Latest Version

.. image:: https://github.com/UDST/urbansim/actions/workflows/test.yml/badge.svg?branch=main
Expand Down Expand Up @@ -86,6 +86,6 @@ Technical documentation

* `Full documentation <https://udst.github.io/urbansim/>`__

* Other `UDST <https://docs.udst.org>`__ libraries
* Other `UDST <https://github.com/UDST>`__ libraries

* Documentation for `UrbanCanvas <https://cloud.urbansim.com/docs/>`__, the UrbanSim cloud platform
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@

# General information about the project.
project = u'urbansim'
copyright = u'2020, UrbanSim Inc.'
copyright = u'2014-2026, UrbanSim Inc.'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down
9 changes: 4 additions & 5 deletions docs/source/developer/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ and adds the new buildings to the set of current buildings. Thus

An example of the sample code required to generate the set of feasible
buildings is shown below. This code comes from the ``utils`` module of the
current `sanfran_urbansim <https://github
.com/udst/sanfran_urbansim>`_ demo. Notice that the SqFtProForma is
current `sanfran_urbansim <https://github.com/udst/sanfran_urbansim>`_ demo. Notice that the SqFtProForma is
first initialized and a DataFrame of parcels is tested for feasibliity (each
individual parcel is tested for feasibility). Each *use* (e.g. retail, office,
residential, etc) is assigned a price per parcel, typically from empirical data
Expand Down Expand Up @@ -65,12 +64,12 @@ translation to units. ::

d = {}
for form in pf.config.forms:
print "Computing feasibility for form %s" % form
print("Computing feasibility for form %s" % form)
d[form] = pf.lookup(form, df[parcel_use_allowed_callback(form)])

far_predictions = pd.concat(d.values(), keys=d.keys(), axis=1)

sim.add_table("feasibility", far_predictions)
orca.add_table("feasibility", far_predictions)


The ``developer model`` is responsible for picking among feasible buildings
Expand Down Expand Up @@ -121,7 +120,7 @@ ids+1 and then incremented from there). ::
all_buildings = dev.merge(buildings.to_frame(buildings.local_columns),
new_buildings[buildings.local_columns])

sim.add_table("buildings", all_buildings)
orca.add_table("buildings", all_buildings)

.. toctree::
:maxdepth: 2
Expand Down
18 changes: 9 additions & 9 deletions docs/source/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Basic Example - Residential Price Hedonic

A fairly complete case study of using UrbanSim can be shown entirely within a
single Jupyter Notebook, as is the case with
`this Notebook <http://nbviewer.jupyter.org/github/udst/sanfran_urbansim/blob/master/Hedonic%20Example.ipynb>`_
`this Notebook <https://nbviewer.org/github/udst/sanfran_urbansim/blob/master/Hedonic%20Example.ipynb>`_
from the `example repository <https://github.com/udst/sanfran_urbansim>`_.

As the canonical example of using UrbanSim, take the case of a residential
Expand Down Expand Up @@ -66,8 +66,8 @@ Complete Example - San Francisco UrbanSim Modules
A complete example of the latest UrbanSim framework is now being maintained on
`GitHub <https://github.com/udst/sanfran_urbansim>`_. The example requires
that the UrbanSim package is already installed (no other dependencies are
required). The example is maintained under `Travis Continuous Integration <https://travis-ci.org/UDST/sanfran_urbansim>`_
so should always run with the latest version of UrbanSim.
required). The example dates from 2017 and may need small updates to run
with current versions of UrbanSim and its dependencies.

The example has a number of Python modules including ``dataset.py``,
``assumptions.py``, ``variables.py``, ``models.py`` which will be discussed one
Expand Down Expand Up @@ -127,7 +127,7 @@ use category names. ::

# this maps building type ids to general building types
# basically just reduces dimensionality
sim.add_injectable("building_type_map", {
orca.add_injectable("building_type_map", {
1: "Residential",
2: "Residential",
3: "Residential",
Expand Down Expand Up @@ -408,8 +408,8 @@ YAML configuration files currently can also be used to define location choice
models and even accessibility variables, and in theory can be added to any
UrbanSim model that supports `YAML persistence <models/statistical.html#yaml-persistence>`_
as described in the API docs. Using configuration files specified in YAML
also allows interactivity with the `UrbanSim web portal <https://github.com/udst/usui>`_,
which is one of the main reasons for following this architecture.
also allows the models to be edited and shared outside of Python, which is one
of the main reasons for following this architecture.

As can be seen, these configuration files are a great way to separate
specification of the model from the actual infrastructure that stores and
Expand Down Expand Up @@ -442,7 +442,7 @@ Estimation Workflow
~~~~~~~~~~~~~~~~~~~

A sample estimation workflow is available
`in this Notebook <http://nbviewer.ipython.org/github/udst/sanfran_urbansim/blob/5b93eb4708fc7ea97f38a497ad16264e4203dbca/Estimation.ipynb>`__.
`in this Notebook <https://nbviewer.org/github/udst/sanfran_urbansim/blob/5b93eb4708fc7ea97f38a497ad16264e4203dbca/Estimation.ipynb>`__.

This notebook estimates all of the models in the example that need estimation
(because they are statistical models). In fact, every cell simply calls the
Expand All @@ -462,7 +462,7 @@ Simulation Workflow
~~~~~~~~~~~~~~~~~~~

A sample simulation workflow (a complete UrbanSim simulation) is available
`in this Notebook <http://nbviewer.ipython.org/github/udst/sanfran_urbansim/blob/5b93eb4708fc7ea97f38a497ad16264e4203dbca/Simulation.ipynb>`__.
`in this Notebook <https://nbviewer.org/github/udst/sanfran_urbansim/blob/5b93eb4708fc7ea97f38a497ad16264e4203dbca/Simulation.ipynb>`__.

This notebook is possibly even simpler than the estimation workflow as it has
only one substantive cell which runs all of the available models in the
Expand All @@ -478,7 +478,7 @@ Exploration Workflow

UrbanSim now also provides a method to interactively explore UrbanSim inputs
and outputs using web mapping tools, and the
`exploration notebook <http://nbviewer.ipython.org/github/udst/sanfran_urbansim/blob/5b93eb4708fc7ea97f38a497ad16264e4203dbca/Exploration.ipynb>`_
`exploration notebook <https://nbviewer.org/github/udst/sanfran_urbansim/blob/5b93eb4708fc7ea97f38a497ad16264e4203dbca/Exploration.ipynb>`_
demonstrates how to set up and use this interactive display tool.

This is another simple and powerful notebook which can be used to quickly map
Expand Down
6 changes: 3 additions & 3 deletions docs/source/gettingstarted.rst
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ workflows.

This also makes the notebook a fantastic pedagogical tool - in other words
it's great for demos and communicating both the input and output of cells of
Python code (e.g. `nbviewer <https://nbviewer.jupyter.org/>`_).
Python code (e.g. `nbviewer <https://nbviewer.org/>`_).
Many of the full-size examples of UrbanSim on this site are presented
in notebooks.

Expand All @@ -162,7 +162,7 @@ Background

UrbanSim has been an active research project since the late 1990's, and has
undergone continual re-thinking, and re-engineering over the ensuing years,
as documented in many of the `accumulated research papers <http://www.urbansim.com/research/>`_.
as documented in many accumulated research papers.
Below is a brief, high-level summary of UrbanSim in only a few paragraphs from
a modeling/programmer perspective. In pseudocode, UrbanSim can be boiled down
to a series of models estimated and then simulated in sequence.::
Expand Down Expand Up @@ -352,7 +352,7 @@ in the tutorials section.

Note that this approach is inspired by a number of different frameworks (in
Python and otherwise) such as `py.test <https://docs.pytest.org/en/latest/fixture.html>`_,
`flask <http://flask.pocoo.org/>`_, and even web frameworks like
`flask <https://flask.palletsprojects.com/>`_, and even web frameworks like
`Angular <https://docs.angularjs.org/guide/di>`_.

Note that this is designed to be an *extremely* flexible framework. Models can
Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ UrbanSim is a platform for building statistical models of cities and regions. Th

This ``urbansim`` Python library is a core component. It contains tools for statistical estimation and simulation; domain-specific logic about housing markets, household relocation, and other processes; and frameworks and utilities for assembling a model.

v3.2, released May 5, 2020
v3.3rc1, released September 15, 2026

Contents
--------
Expand Down
5 changes: 2 additions & 3 deletions docs/source/maps/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ DataFrame Explorer
Introduction
------------

The DataFrame Explorer is used to create a web service within the IPython
The DataFrame Explorer is used to create a web service within the Jupyter
Notebook which responds to queries from a web browser. The REST API is
undocumented as the user does not interact with that API. Simply call the
``start`` method below and then open `http://localhost:8765
Expand Down Expand Up @@ -38,8 +38,7 @@ Here is what each dropdown on the web page does:
DataFrame with the name from the first dropdown
* The third dropdown selects the color scheme from the
`colorbrewer <http://colorbrewer2.org/>`_ color schemes
* The fourth dropdown sets ``quantile`` and ``equal_interval``
`color schemes <http://www.ncgia.ucsb.edu/cctp/units/unit47/html/quanteq.html>`_
* The fourth dropdown sets ``quantile`` and ``equal_interval`` color schemes
* The fifth dropdown selects the Pandas aggregation method to use
* The sixth dropdown executes the
`.query <http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.query.html>`_
Expand Down
2 changes: 1 addition & 1 deletion docs/source/models/statistical.rst
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,6 @@ Discrete Choice API Docs
.. automodule:: urbansim.models.dcm
:members:

.. _patsy: http://patsy.readthedocs.org/
.. _patsy: https://patsy.readthedocs.io/
.. _DataFrame: http://pandas.pydata.org/pandas-docs/stable/dsintro.html#dataframe
.. _DataFrames: http://pandas.pydata.org/pandas-docs/stable/dsintro.html#dataframe
2 changes: 1 addition & 1 deletion urbansim/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = version = '3.3.dev3'
__version__ = version = '3.3rc1'