Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: improved node consolidation functions #377

Merged
merged 32 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
2f71606
including node_consolidation function
gsagostini Sep 10, 2022
53351c9
adding imports of nx split and deepcopy
gsagostini Sep 10, 2022
5e00851
importing nx_to_gdf
gsagostini Sep 10, 2022
30354ac
adding data for a street network
gsagostini Sep 11, 2022
e3a4931
testing consolidate_intersections
gsagostini Sep 11, 2022
f75afd7
formatting graph dataset loading
gsagostini Sep 11, 2022
fd2b0d1
formatting the tests file
gsagostini Sep 11, 2022
2accf90
adding consolidate_intersections to functions to test list
gsagostini Sep 11, 2022
1e20a98
updating networkx to 2.5 in minimal env
gsagostini Sep 12, 2022
d84b78b
fixing docstrings and adding test for warning section
gsagostini Sep 12, 2022
375bb86
cleaning method user input
gsagostini Sep 12, 2022
558f1a2
docstring of extension
gsagostini Sep 15, 2022
15d9287
fixed docstring
gsagostini Sep 15, 2022
22818dc
fixed docstring
gsagostini Sep 15, 2022
324e219
grammar
gsagostini Sep 15, 2022
777a7ab
added default tolerance
gsagostini Sep 15, 2022
73413f1
replacing column with attribute naming
gsagostini Oct 11, 2022
5b2b415
adding approach to simplified_graph object
gsagostini Oct 11, 2022
930d9df
input can be non-Multi graph type
gsagostini Oct 12, 2022
b9aae1a
throw exception when simplification method unrecofnized
gsagostini Oct 12, 2022
068536d
removing directed paramater, always infer directionality
gsagostini Oct 12, 2022
22775fc
set_geometry in the edge dataframe
gsagostini Oct 12, 2022
efe5119
Merge remote-tracking branch upstream/main into pr/gsagostini/377
martinfleis Oct 12, 2022
0e435d2
adding notebook to user_guide
gsagostini Oct 12, 2022
d0c12e7
Merge remote-tracking branch 'upstream/main' into pr/gsagostini/377
martinfleis Jan 23, 2024
49c1864
lint issues
martinfleis Jan 23, 2024
2d0e2b2
fix
martinfleis Jan 23, 2024
7316f76
try fixing the kernel issue
martinfleis Jan 23, 2024
c199407
adapt title
martinfleis Jan 23, 2024
9edfd6f
api reference
martinfleis Jan 23, 2024
3e43378
conditional import of osmnx in tests
martinfleis Jan 23, 2024
e0949e4
Apply suggestions from code review
martinfleis Jan 23, 2024
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 ci/envs/38-minimal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ dependencies:
- python=3.8
- geopandas=0.8
- libpysal=4.2.2
- networkx=2.3
- networkx=2.5
- tqdm=4.27.0
- pytest
- pytest-cov
Expand Down
9 changes: 6 additions & 3 deletions momepy/datasets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,23 @@
__all__ = ["available", "get_path"]

_module_path = os.path.dirname(__file__)
available = ["bubenec", "tests"]
available = ["bubenec", "tests", "nyc_graph"]


def get_path(dataset):
def get_path(dataset, extension="gpkg"):
"""
Get the path to the data file.
Parameters
----------
dataset : str
The name of the dataset. See ``momepy.datasets.available`` for
all options.
extension : str
The extension of the data file
"""
if dataset in available:
return os.path.abspath(os.path.join(_module_path, dataset + ".gpkg"))
filepath = dataset + "." + extension
return os.path.abspath(os.path.join(_module_path, filepath))
msg = "The dataset '{data}' is not available. ".format(data=dataset)
msg += "Available datasets are {}".format(", ".join(available))
raise ValueError(msg)
Loading