Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
2a1364b
Update changelog.rst
May 25, 2023
e79e137
Add `numpydoc` to sphinx extensions
May 25, 2023
fd2bfae
Add graph boundary attribute
May 25, 2023
57b3e3a
Use NETWORK_FILTER in test data
May 25, 2023
a11523f
Fix test assertion: add Polygon to MultiPolygon
May 25, 2023
a36224c
Remove unnecessary save statements
May 25, 2023
fe74f99
Add city area
May 30, 2023
177bbfa
Population density calculation
Jun 5, 2023
854b6ed
Added `rasterstats` to sphinx packages
Jun 5, 2023
fbec357
Add standalone module for tile determination
Jun 5, 2023
61c1b49
Explicitly mention option to use un-tiled dataset
Jun 6, 2023
7e26a3d
Improve grammar
Jun 6, 2023
4d5a718
Added edge cell tessellation notebook
Jun 7, 2023
7e9e669
Fix code style issues with Black
cbueth Jun 7, 2023
df36db4
New subpackage for population download and io
Jun 8, 2023
b08fcf6
Merge remote-tracking branch 'origin/57-partition-area' into 57-parti…
Jun 8, 2023
c2892df
Fix: Full raster path
Jun 8, 2023
cb907cf
Update test_ghsl.py
cbueth Jun 8, 2023
a0792f3
Changed ghsl folder modality.
Jun 9, 2023
537897a
Fix: move test fixture `_delete_ghsl_tifs`
Jun 9, 2023
116ab9a
Ignore population and output files
Jun 9, 2023
6edd6cc
Update packages and add `momepy` for notebook use
Jun 12, 2023
35240f0
Add edge tesselation
Jun 13, 2023
2ed0949
Make all file paths platform independent
Jun 13, 2023
662a20e
Add notebook with population density calculation
Jun 15, 2023
fe99253
Add show tesselation plot
Jun 17, 2023
ec3d568
Specify requirements file more detailed
Jun 17, 2023
3865f6f
Fix typo
Jun 17, 2023
a3979fb
Add cell id for agglomeration later
Jun 17, 2023
3e9b1a1
Integrate population density calculation
Jun 17, 2023
8f192bf
Integrate edge population density preprocessing
Jun 17, 2023
e9c746c
Update test data script - calculates population
Jun 17, 2023
34f7e34
Restructured Reference pages
Jun 17, 2023
25bc74d
Doc: Add try-catch for unstable cities
Jun 17, 2023
7728058
Doc: Wrong underline length
Jun 18, 2023
62cd3aa
Doc: Tesselation and population density reference notebooks.
Jun 19, 2023
9865b45
Improve language
Jun 19, 2023
88d5ce5
Edge split up: add population and area value compatibility
Jun 19, 2023
56aefb7
Fix: Graph Import Projection Order
Jun 19, 2023
9265e34
Sped up population distribution
Jun 20, 2023
51fb7d9
Add basic graph stats to graph object on import
Jun 20, 2023
8115d71
Graph loading: explicit type for graph stats when
Jun 20, 2023
75f13fc
Fix: Split edge length when splitting isolated edges
Jun 20, 2023
2cf7f2d
Calculate LTN stats
Jun 20, 2023
1bc103e
Update test data
Jun 20, 2023
b626646
Update changelog for `0.2.0`
Jun 20, 2023
6cabb5e
Fix code style issues with Black
cbueth Jun 20, 2023
f05527e
Lint: ignore test data script
Jun 20, 2023
de48ab7
Merge remote-tracking branch 'origin/57-partition-area' into 57-parti…
Jun 20, 2023
6a1983f
Tests: valid test did not raise error
Jun 20, 2023
175b6f1
Version bump `0.2.0` - update dependencies
Jun 20, 2023
bfe0bd6
Improve: save distances in single-precision
Jun 20, 2023
5a88917
Improve: Test case compability
Jun 20, 2023
135a6ba
Lint: changed black `src`
Jun 20, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
conda config --show

- name: Generating .rst files
run: sphinx-apidoc -o docs superblockify/
run: sphinx-apidoc -o docs/api/ superblockify/
- name: Generating html
run: sphinx-build docs public -b dirhtml

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Run Black
uses: psf/black@stable
with:
options: ''
src: './superblockify ./tests ./scripts'

- uses: stefanzweifel/git-auto-commit-action@v4
with:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,16 @@ jobs:
strategy:
matrix:
submodule:
- { name: "Metrics", pytest_args: "tests/metrics/" }
- {
name: "Metrics & Graph Stats",
pytest_args: "tests/metrics/ tests/test_graph_stats.py" }
- { name: "Approaches", pytest_args: "tests/partitioning/approaches/" }
- { name: "Partitioning Base", pytest_args: "tests/partitioning/test_base.py" }
- {
name: "Partitioning Rest",
pytest_args: "tests/partitioning/ --ignore=tests/partitioning/approaches/ --ignore=tests/partitioning/test_base.py"
}
- { name: "Population", pytest_args: "tests/population/" }
- { name: "Attribute", pytest_args: "tests/test_attribute.py" }
- { name: "Plot", pytest_args: "tests/test_plot.py" }
- { name: "Utils", pytest_args: "tests/test_utils.py" }
Expand Down
13 changes: 12 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,22 @@ docs/api/*
# OSMnx cache
**/cache/

# GHSL population data
data/ghsl/*
*.tif
*.xlsx

# Jupyter Notebook
.ipynb_checkpoints

# outputs - add manually
data/*
tests/test_data/output/*
public/*
jupyter_execute/*
jupyter_execute/*
# logs
*.log
# graphs
*.graphml
# plots
*.pdf
Binary file added docs/_static/momepy_footprint_tessellation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/rasterization.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 30 additions & 8 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,53 @@
Changelog
*********

Version 0.2.0 (2023-06-20)
**************************

* Sped up population distribution in
:func:`superblockify.population.approximation.get_edge_population`.
* Add population and density to LTNs
* Fix: Graph import projection order. Un-skewed distance attribute.

Version 0.1.3 (2023-06-19)
**************************

* Documented approaches in reference notebooks :ref:`Population Data`,
:ref:`Street Tessellation`, and :ref:`Street Population Density`.
* Added population preprocessing for for every tesselated edge. This enables an
efficient population density aggregation for any given superblock.
See modules in :mod:`superblockify.population`.
* Automated population data download and preprocessing of the GHS-POP - R2023A dataset
<https://ghsl.jrc.ec.europa.eu/ghs_pop2023.php>.
* Added graph attribute `boundary`, used for calculating the total area of the city.
* Added general graph statistics :mod:`superblockify.metric.graph_stats`.
Including spatial clustering and anisotropy.

Version 0.1.2 (2023-05-18)
**************************

* Added Partitioner based on Betweenness Centrality
* Added Partitioner based on Betweenness Centrality.
* Fix segfault in betweenness centrality calculation caused by testcase with one node
graph
graph.

Version 0.1.1 (2023-05-15)
**************************

* Added Betweenness Centrality Calculation in measures, precompiled version works quick
on metropolian sized city networks
on metropolitan sized city networks.
* Added speed limit: Routing and low traffic speed overwriting. Unit can be passed
when initializing a partitioner
when initializing a partitioner.

Version 0.1.0 (?)
*****************
Version 0.1.0 (2023-04-11)
**************************

* Initial release
* Full rework of the restricted distance calculation. Runs quicker and is more
memory efficient. Also, path finding had a bug in the previous version.


Version 0.0.0 (?)
*****************
Version 0.0.0
*************

* See changes before in the repository under the tag `0.0.0
<https://github.com/cbueth/Superblockify/tags>`_.
22 changes: 10 additions & 12 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,36 +14,30 @@

sys.path.insert(0, os.path.abspath(".."))

autodoc_mock_imports = [
"networkx",
"osmnx",
"numpy",
"scipy",
"matplotlib",
"pandas",
"geopandas",
"shapely",
"numba",
]
# autodoc_mock_imports = [
# "modules that are not installed but referenced in the docs",
# ]

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = "superblockify"
copyright = "2023, Carlson Büth"
author = "Carlson Büth"
release = "0.1.2"
release = "0.2.0"

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = [
"myst_nb",
"sphinx.ext.autodoc",
"numpydoc",
"sphinx.ext.viewcode",
"sphinx.ext.napoleon",
"sphinx.ext.intersphinx",
"sphinx.ext.mathjax",
"sphinx.ext.autosectionlabel",
]

templates_path = ["_templates"]
Expand Down Expand Up @@ -101,6 +95,10 @@
"numpy": ("https://numpy.org/doc/stable", None),
"pandas": ("https://pandas.pydata.org/pandas-docs/stable", None),
"geopandas": ("https://geopandas.org/en/stable/", None),
"pyproj": ("https://pyproj4.github.io/pyproj/stable/", None),
"scipy": ("https://docs.scipy.org/doc/scipy/reference", None),
"shapely": ("https://shapely.readthedocs.io/en/stable", None),
"numba": ("https://numba.readthedocs.io/en/stable", None),
"rasterstats": ("https://pythonhosted.org/rasterstats/", None),
"momepy": ("https://docs.momepy.org/en/stable", None),
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ and modified from {external+networkx:mod}`networkx.algorithms.centrality.between
````{sidebar} Pair-Wise Dependencies
"... the cubic number of pair-wise dependencies
$\delta(s, t \mid v)=\sigma(s, t \mid v) / \sigma(s, t)$
can be aggregated without computing all of the explicitly."y
can be aggregated without computing all of the explicitly."

One-sided dependencies:
$\delta(s \mid v)=\sum_{t \in V} \delta(s, t \mid v)$
Expand Down
Loading