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

Develop #72

Open
wants to merge 140 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
140 commits
Select commit Hold shift + click to select a range
af22839
add full network examples
jhelsel11 May 7, 2020
7b6b193
problem with project card creation
jhelsel11 May 8, 2020
c660792
Solved cchardet install error.
jhelsel11 May 8, 2020
7a0a59b
reformat transit time period name for .lin
i-am-sijia May 11, 2020
b3f0dd9
Merge branch 'develop' of https://github.com/wsp-sag/client_met_counc…
i-am-sijia May 11, 2020
ffa9b3e
get true shape from shapes_df
i-am-sijia May 12, 2020
001a277
Show error when adding reversible lane.
jhelsel11 May 13, 2020
d706831
update Lasso based on the latest CUBE logfile
i-am-sijia May 14, 2020
322a804
Merge branch 'develop' of https://github.com/wsp-sag/client_met_counc…
i-am-sijia May 14, 2020
de7e29a
change project card builder name
jhelsel11 May 19, 2020
d94131a
allow project card to write out "managed" from logfile
i-am-sijia May 20, 2020
be08c4d
Update installation instructions
e-lo May 21, 2020
137d653
update doc'tn
e-lo May 21, 2020
5f97cfc
uploading error in scenario quickstart.
jhelsel11 May 21, 2020
88617d1
project card updates
i-am-sijia May 21, 2020
91e7fd0
Error with lasso reading reversible lane log card
jhelsel11 May 21, 2020
a20171f
change EPSG to CRS to match RoadwayNetwork
i-am-sijia May 22, 2020
ad5cf18
lasso still broken.
jhelsel11 May 22, 2020
ca7ce5b
RoadwayNetwork typo
i-am-sijia May 22, 2020
bffbba4
error in lasso? network wrangler?
jhelsel11 May 22, 2020
1984a0f
update managed lane scenario jupyter notebook
jhelsel11 May 27, 2020
14e2e21
Merge branch 'master' into develop
i-am-sijia Jun 4, 2020
3d3aa67
Add install instructions for folium and osmnx from conda
e-lo Jun 9, 2020
6bdfecc
Fixed pandas set copy warning
e-lo Jun 10, 2020
8fdda49
2nd part of fix of pandas bug + skip outdated test
e-lo Jun 10, 2020
9e3c717
add ELIFs in project building when network or changes are given
i-am-sijia Jun 10, 2020
d50bd32
Process base roadway network outside of if statement
e-lo Jun 10, 2020
d04293e
Revert "Process base roadway network outside of if statement"
e-lo Jun 10, 2020
3387410
Merge branch 'develop' of https://github.com/wsp-sag/client_met_counc…
e-lo Jun 10, 2020
5d4b603
Major project changes refactor
e-lo Jun 11, 2020
5e13699
added create_project from network example
DavidOry Jun 11, 2020
3a85e87
update test data for csv and shp file changes for creating projects, …
i-am-sijia Jun 11, 2020
b8db577
project card for split property variables
i-am-sijia Jun 11, 2020
6c03898
remove duplicate code
jhelsel11 Jun 17, 2020
d6927bd
Merge branch 'develop' of https://github.com/wsp-sag/Lasso into develop
jhelsel11 Jun 17, 2020
94273fd
Added ability to concatenate log files
e-lo Jun 24, 2020
289224d
generate unique shape id
i-am-sijia Jun 25, 2020
4b0cc80
added more bus only facilties based on Rachel's feedback
i-am-sijia Jun 25, 2020
34300b2
integerize split property attributes
i-am-sijia Jun 26, 2020
72d7fd3
RoadwayNetwork.CRS wasn't working for initial CRS setting
i-am-sijia Jun 26, 2020
a1428e0
roadway change properties wasn't in list format after code refactorin…
i-am-sijia Jul 16, 2020
9c1fe39
When wrangler passes assign_group values, Lasso should not calculate …
i-am-sijia Jul 16, 2020
cb38073
Add/adjust documentation in scenario creation notebook
e-lo Jul 17, 2020
2348218
Add scenario creation steps for Rachel
e-lo Jul 17, 2020
bfd56d5
add example test to write shape file
i-am-sijia Jul 20, 2020
b4deb05
Merge branch 'develop' of https://github.com/wsp-sag/client_met_counc…
i-am-sijia Jul 20, 2020
a39dd6f
write out assign_group in project card, without "existing"
i-am-sijia Jul 20, 2020
f7d5e0a
fix indexing bug in appending calculated "assign_group" to links_df
i-am-sijia Jul 20, 2020
34c65dc
temporary fix for integer issues related to ML_lanes_XX
i-am-sijia Jul 20, 2020
6286896
add make cube network notebook for Rachel discussion
DavidOry Jul 21, 2020
a71f83b
New scenario creation notebook
e-lo Jul 21, 2020
064cd2d
Merge branch 'develop' of https://github.com/wsp-sag/client_met_counc…
e-lo Jul 21, 2020
0594faa
Clean up notebooks
e-lo Jul 21, 2020
a5ca675
get my_parameters values from config yaml
i-am-sijia Jul 22, 2020
77532eb
Merge branch 'develop' of https://github.com/wsp-sag/client_met_counc…
i-am-sijia Jul 22, 2020
a393d7e
moving make-cube-network to client_met_council
DavidOry Jul 22, 2020
e4392f7
when ML and assign_group project cards are applied together, assign_g…
i-am-sijia Jul 22, 2020
c74583e
assign_group crosswalk for ML dummy access/egress links
i-am-sijia Jul 23, 2020
6418953
refactoring read logfile
i-am-sijia Jul 24, 2020
d5216a7
add test for ad-hoc parameters
e-lo Jul 24, 2020
c9b3501
ad hoc parameters
i-am-sijia Jul 24, 2020
5988c68
Default project name / card file name
e-lo Jul 28, 2020
0a04fee
error from too many conditions
jhelsel11 Jul 28, 2020
04fb82c
add bike_facility to fixed width output network
i-am-sijia Jul 31, 2020
97d76f6
parameters _dict_ change to project.py
DavidOry Aug 3, 2020
303b328
assign_group for walk, bike, drive_only option for fixed width
DavidOry Aug 4, 2020
71f88de
trim character fields in Cube read
DavidOry Aug 5, 2020
418e351
node correction
DavidOry Aug 5, 2020
90089f0
cube script spacing
DavidOry Aug 5, 2020
c6ad9d3
return dataframes
DavidOry Aug 5, 2020
6337411
bug fix on DBF write
DavidOry Aug 5, 2020
4fd53f8
Merge pull request #100 from wsp-sag/use_fixes
DavidOry Aug 5, 2020
42e1f8e
update conda activate command
e-lo Aug 6, 2020
04355db
Flexible parameters input: dict or parameters instance
e-lo Aug 11, 2020
17a03ae
Merge branch 'develop' of https://github.com/wsp-sag/client_met_counc…
e-lo Aug 11, 2020
b060ce8
pep8
e-lo Aug 11, 2020
c292e24
add osmnx to pre-install list
e-lo Aug 11, 2020
d7d688b
add mrcc_id and ROUTE_SYS (functional class from mrcc) to metcouncil …
i-am-sijia Aug 13, 2020
5407ce1
update highway asgngrp crosswal
DavidOry Aug 18, 2020
6dbcbe0
add ML lanes variable to net_to_dbf
DavidOry Aug 18, 2020
d5513e6
write shape file - use shape_id to join true shapes to links
i-am-sijia Aug 18, 2020
ab59509
including shape_id in default
DavidOry Aug 19, 2020
1378faf
fill na for new shapes so that they can be added to shapes_metcouncil_df
i-am-sijia Aug 19, 2020
9819215
add managed lane example
DavidOry Aug 19, 2020
d62e52b
join true shapes to links_metcouncil_df, get rid of shapes_metcouncil_df
i-am-sijia Aug 19, 2020
2a01239
Merge branch 'develop' of https://github.com/wsp-sag/client_met_counc…
i-am-sijia Aug 19, 2020
d4173ff
share new managed lane notebook bug
DavidOry Aug 19, 2020
d24366d
update managed lane example
DavidOry Aug 20, 2020
a07e62e
parameters dictionary bug
DavidOry Sep 1, 2020
01da8df
correct method name, fix apply bug
DavidOry Sep 1, 2020
f87725d
adding wisconsin DOT mrcc variable to output
DavidOry Sep 2, 2020
0232d4c
modify assign group and roadway approach
DavidOry Sep 8, 2020
e7c2adf
fix join bug
DavidOry Sep 9, 2020
4096d63
widot join bugs
DavidOry Sep 12, 2020
0c92757
transit coding example
DavidOry Sep 15, 2020
4e73910
Hacky fix for program type line being optional
e-lo Sep 15, 2020
1e926c2
Non hacky fix
e-lo Sep 15, 2020
394e438
add node example line file
DavidOry Sep 15, 2020
7b445c1
More robust log file concatenation
e-lo Sep 16, 2020
d3057b0
Merge branch 'master' into develop
DavidOry Sep 17, 2020
d5b17dd
downtown area type fix
DavidOry Sep 18, 2020
0feac77
add lanes detail
DavidOry Sep 23, 2020
3bfb4ee
add lanes logic
DavidOry Sep 30, 2020
cea514f
remove temp test mark
DavidOry Sep 30, 2020
22c23d9
add simple lanes lookup make script
DavidOry Sep 30, 2020
8889b02
number of lanes bug fix
DavidOry Sep 30, 2020
134b3ad
lanes bug fix
DavidOry Oct 1, 2020
980ded7
start on #111
DavidOry Oct 1, 2020
6714ad1
finish metcouncil prototype #111
DavidOry Oct 1, 2020
b9cf8a3
update lanes algorithm
DavidOry Oct 12, 2020
9574015
remove lanes calculations
DavidOry Oct 19, 2020
9be69d9
remove calculate lanes from roadway
DavidOry Oct 19, 2020
0a30bfe
refactor number of lanes computation
DavidOry Oct 20, 2020
7a76374
move assign group and roadway class, and centroid connector function …
DavidOry Oct 21, 2020
dd02ac5
fix bug in calculate centroid connect
DavidOry Oct 23, 2020
f2adb93
add shape id to transit line NAME
i-am-sijia Dec 29, 2020
420b3f9
add ohio mug demo files
DavidOry Feb 3, 2021
8522bef
updates to Ohio example
DavidOry Mar 8, 2021
2d6cdc0
pass parameters as an argument when create cube transit from .lin
i-am-sijia Mar 2, 2021
1d0b60f
merge cherry pick conflict
i-am-sijia Mar 3, 2021
0e0de0d
Merge pull request #116 from BayAreaMetro/partial-change
i-am-sijia Mar 8, 2021
72c8c56
centroidconnect default to False in calculate distance
DavidOry Mar 10, 2021
39f79eb
update creating project card from cube log file
i-am-sijia Mar 11, 2021
ed80a2c
project card change error
DavidOry Mar 11, 2021
993ecc0
adding st_paul log example
DavidOry Mar 12, 2021
440a08e
update calculate number of lanes method
DavidOry Mar 12, 2021
505002e
do not write out changes in split-properties format for non-ml projec…
i-am-sijia Mar 15, 2021
d68e766
example yml and notebook #117
i-am-sijia Mar 16, 2021
fc51e00
update MUG notebook
DavidOry Mar 16, 2021
62f4f56
metcouncil .lin file update
i-am-sijia Apr 14, 2021
c29d78d
update project.py when only node changes are made #123
i-am-sijia Apr 15, 2021
1c02de3
default lanes to 0 (it should already be so, but just to be safe)
i-am-sijia Jul 19, 2021
1fad75a
temp solve pickle and pandas (>=1.3) conflict
i-am-sijia Jul 20, 2021
997b559
optionally write out drive-only shapefiles
i-am-sijia Jul 20, 2021
b0b9b36
update documentation
i-am-sijia Jul 20, 2021
4a8fba3
fix bug in add_counts
i-am-sijia Aug 5, 2021
eeab0fa
Addresses #128
DavidOry Aug 16, 2021
9dd484a
#131 exclude records that first get added then edited from compatibil…
i-am-sijia Feb 19, 2022
c627e16
PRE_COMMIT_ALLOW_NO_CONFIG=1 git
e-lo Mar 17, 2022
554ce0b
Merge pull request #133 from wsp-sag/fix-write-out-type-conversion
DavidOry Mar 21, 2022
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
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ docs/_generated/*
*.log
# except logs in the cube example
!examples/cube/*.log
!examples/stpaul/cube/*.log

# Created yml
notebooks/*.yml
notebooks/*.yaml
# Jupyter
.ipynb_checkpoints/
profile_default/
Expand Down Expand Up @@ -78,3 +82,5 @@ env/

# large metcouncil data file
metcouncil_data/mrcc/*.mrcc.out.matched.geojson
.Rproj.user
scripts/.Rhistory
76 changes: 44 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Lasso
This package of utilities is a wrapper around the [network_wrangler](http://github.com/wsp-sag/network_wrangler) package for MetCouncil. It aims to have the following functionality:
This package of utilities is a wrapper around the [`network_wrangler`](http://github.com/wsp-sag/network_wrangler) package for MetCouncil. **IMPORTANT** Lasso will automagically install `network_wrangler` for you, so

It aims to have the following functionality:

1. parse Cube log files and base highway networks and create ProjectCards for Network Wrangler
2. parse two Cube transit line files and create ProjectCards for NetworkWrangler
Expand All @@ -8,34 +10,34 @@ This package of utilities is a wrapper around the [network_wrangler](http://gith
## Installation

### Requirements
Lasso uses Python 3.6 and above. Requirements are stored in `requirements.txt` but are automatically installed when using `pip` as are development requirements (for now) which are located in `dev-requirements.txt`
Lasso uses Python 3.6 and above. Requirements are stored in `requirements.txt` but are automatically installed when using `pip` as are development requirements (for now) which are located in `dev-requirements.txt`.

The intallation instructions use the [`conda`](https://conda.io/en/latest/) virtual environment manager and some use the ['git'](https://git-scm.com/downloads) version control software.

### Basic instructions
If you are managing multiple python versions, we suggest using [`virtualenv`](https://virtualenv.pypa.io/en/latest/) or [`conda`](https://conda.io/en/latest/) virtual environments. All commands should executed in a conda command prompt, not powershell or the system command prompt. Do not add conda to the system path during installation. This may cause problems with other programs that require python 2.7 to be placed in the system path.

Example using a conda environment (recommended):
Example using a conda environment (recommended) and using the package manager [pip](https://pip.pypa.io/en/stable/) to install Lasso from the source on GitHub.

```bash
conda create python=3.7 -n <my_lasso_environment>
source activate <my_lasso_environment>
conda install rtree
conda install shapely
conda install fiona
pip install git+https://github.com/wsp-sag/network_wrangler.git@master#egg=network_wrangler
pip install git+https://github.com/wsp-sag/Lasso@master#egg=lasso

conda config --add channels conda-forge
conda create python=3.7 rtree geopandas folium osmnx -n <my_lasso_environment>
conda activate <my_lasso_environment>
pip install git+https://github.com/wsp-sag/Lasso@master
```
Lasso can be installed in several ways depending on the user's needs. The above installation is the simplest method and is appropriate when the user does not anticipate needing to update lasso. An update will require rebuilding the network wrangler environment. Installing from clone is slightly more involved and requires the user to have a git manager on their machine, but permits the user to install lasso with the -e, edit, option so that their lasso installation can be updated through pulling new commits from the lasso repo without a full reinstallation.

#### From GitHub
Use the package manager [pip](https://pip.pypa.io/en/stable/) to install Lasso from the source on GitHub.
Lasso will install `network_wrangler` from the [PyPi](https://pypi.org/project/network-wrangler/) repository because it is included in Lasso's `requirements.txt`.

```bash
conda install rtree
conda install shapely
pip install -e git+https://github.com/wsp-sag/network_wrangler.git@master#egg=network_wrangler
pip install -e git+https://github.com/wsp-sag/Lasso@master#egg=lasso
#### Bleeding Edge
If you want to install a more up-to-date or development version of network wrangler, you can do so by installing it from

```bash
conda config --add channels conda-forge
conda create python=3.7 rtree geopandas folium osmnx -n <my_lasso_environment>
conda activate <my_lasso_environment>
pip install git+https://github.com/wsp-sag/network_wrangler@develop
pip install git+https://github.com/wsp-sag/Lasso@develop
```

Note: if you wanted to install from a specific tag/version number or branch, replace `@master` with `@<branchname>` or `@tag`
Expand All @@ -46,31 +48,41 @@ If you are going to be working on Lasso locally, you might want to clone it to y
**if you plan to do development on both network wrangler and lasso locally, consider installing network wrangler from a clone as well!**

```bash
conda create python=3.7 -n <my_lasso_environment>
source activate <my_lasso_environment>
conda install rtree
conda install shapely
conda install fiona
conda install folium
conda install osmnx

conda config --add channels conda-forge
conda create python=3.7 rtree geopandas folium osmnx -n <my_lasso_environment>
conda activate <my_lasso_environment>
git clone https://github.com/wsp-sag/Lasso
git clone https://github.com/wsp-sag/network_wrangler

cd network_wrangler
pip install -e .
cd ..

cd lasso
cd Lasso
pip install -e .
```

Note: if you are not part of the project team and want to contribute code bxack to the project, please fork before you clone and then add the original repository to your upstream origin list per [these directions on github](https://help.github.com/en/articles/fork-a-repo).

## Documentation
https://wsp-sag.github.io/Lasso/

Documentation requires the sphinx package and can be built from the `/docs` folder using the command: `make html`
Documentation is located at [https://wsp-sag.github.io/Lasso/](https://wsp-sag.github.io/Lasso/)

Edit the source of the documentation in the `/docs` folder.

To build the documentation locally requires additional packages found in the `dev_requirements.txt` folder.

To install these into your conda python environment execute the following from the command line in the Lasso folder:

```bash
conda activate <my_lasso_environment>
pip install -r dev-requirements.txt
```

To build the documentation, navigate to the `/docs` folder and execute the command: `make html`

```bash
cd docs
make html
```

## Usage

Expand Down Expand Up @@ -142,7 +154,7 @@ cube_transit_net.write_as_cube_lin(os.path.join(SCRATCH_DIR, "t_transit_test.lin

**Read a wrangler roadway network standard network from file and write it to fixed width format that cube can read**

Note that this calculates MetCouncil specific variables and also by default will create a "model-ready" network which
Note that this calculates MetCouncil specific variables and also by default will create a "model-ready" network which
separates out managed lanes as parallel links.

```python
Expand Down
4 changes: 1 addition & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@
"member-order": "groupwise",
}

autoclass_content = (
"class"
) # classes should include both the class' and the __init__ method's docstring
autoclass_content = "class" # classes should include both the class' and the __init__ method's docstring

autosummary_generate = True
10 changes: 10 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@
Welcome to lasso's documentation!
=================================

This package of utilities is a wrapper around the
[network_wrangler](http://github.com/wsp-sag/network_wrangler) package
for MetCouncil. It aims to have the following functionality:
1. parse Cube log files and base highway networks and create ProjectCards
for Network Wrangler
2. parse two Cube transit line files and create ProjectCards for NetworkWrangler
3. refine Network Wrangler highway networks to contain specific variables and
settings for Metropolitan Council and export them to a format that can
be read in by Citilab's Cube software.

.. toctree::
:maxdepth: 3
:caption: Contents:
Expand Down
Loading