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

2020 Model Validation (Contingency Plan) #116

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1515 commits
Select commit Hold shift + click to select a range
6a015b9
make job caps single-scenario
theocharides Nov 15, 2022
800bd24
make inclusionary settings single-scenario based
theocharides Nov 16, 2022
fd626ef
add inclusionary and job cap configs
theocharides Nov 16, 2022
dca0d20
make "lump sum accounts" single-scenario based
theocharides Nov 17, 2022
bcf83c6
create a run setup config outside of the repo
theocharides Nov 18, 2022
821f84d
reduce config.log to env config only
theocharides Nov 21, 2022
f13c4e7
make profit adjustment policies single-scenario
theocharides Nov 21, 2022
6fdc2c8
remove run_setup injectables
theocharides Nov 21, 2022
dbf5cd5
make other account policies single-scenario
theocharides Nov 29, 2022
9019279
make housing preservation single-scenario
theocharides Nov 29, 2022
3952b17
make ADUs single-scenario
theocharides Nov 29, 2022
2dbca09
disable models via the model run list where possible
theocharides Dec 1, 2022
06d8c37
make development projects single scenario
theocharides Dec 1, 2022
3809e5a
make parcels_geography.csv single-scenario
theocharides Dec 6, 2022
01060f7
re-name config summary sub-model
theocharides Dec 6, 2022
8595fc1
fix so lump sum account loops continues
theocharides Dec 12, 2022
018ee1b
update inclusionary housing settings variable
theocharides Dec 13, 2022
7233ac2
remove "scenario" fully from code
theocharides Dec 21, 2022
6806f97
undo temporary code commenting out
theocharides Dec 21, 2022
da43b36
one more commit to move i/o dirs to setup config
theocharides Dec 27, 2022
f021674
documentation added by Elly
yuqiww Dec 27, 2022
267eaca
add model adjuster as an inputs folder
theocharides Dec 28, 2022
b91eae0
add a basis_inputs/crosswalks folder
theocharides Dec 28, 2022
8ae8e04
add a basis_inputs/hazards folder
theocharides Dec 28, 2022
7a50a69
add a basis_inputs/parcels_buildings_agents folder
theocharides Dec 28, 2022
63b5f9f
add a basis_inputs/zoning folder
theocharides Dec 28, 2022
62f5443
add a pandana_accessibility input folder
theocharides Dec 28, 2022
fc905ac
add a plan_strategies input folder
theocharides Dec 28, 2022
de150c6
add a regional_controls input folder
theocharides Dec 28, 2022
bffd2f6
add a travel_model_accessibility input folder
theocharides Dec 28, 2022
46fd1b1
add a zone_forecasts input folder
theocharides Dec 28, 2022
40e0cae
fixes to new subfolder paths
theocharides Dec 29, 2022
8ec35e4
rm abag_targets which are from PBA40
theocharides Jan 4, 2023
f02018b
add another / to path
theocharides Jan 4, 2023
5846780
rm the "adjusters" input file
theocharides Jan 4, 2023
a41a375
organize relocation rates
theocharides Jan 17, 2023
311190f
Merge pull request #316 from BayAreaMetro/scenario_agnostic_runsetup
akselx Jan 26, 2023
a70cbd8
change file name to reflect its action better
theocharides Jan 30, 2023
9a26024
Merge branch 'main' into organize_inputs
theocharides Jan 30, 2023
ba88e65
update superdistricts file paths
theocharides Jan 30, 2023
f2b98c7
update superdistricts file paths
theocharides Jan 30, 2023
92d0365
separate superdistricts file into its uses
theocharides Jan 31, 2023
24dbf38
remove baseline adu file, make configurable
theocharides Feb 1, 2023
489101e
remove unused shifters
theocharides Feb 1, 2023
c4cb142
simplify parcel price
theocharides Feb 1, 2023
dfad2d5
make cost shifters configurable
theocharides Feb 1, 2023
b7fea8c
fix function
theocharides Feb 2, 2023
cb0163d
simplify vacancy rates
theocharides Feb 6, 2023
de15122
streamline cap_rate settings
theocharides Feb 8, 2023
d4e954d
streamline parcel rules
theocharides Feb 8, 2023
be6d666
add policy.yaml strategies to more specific input files
theocharides Feb 9, 2023
22815be
separate out development cap uses
theocharides Feb 13, 2023
ba2bcf1
separate out existing versus strategy inclusionary zoning
theocharides Feb 13, 2023
2bb7859
fixes to previous commits
theocharides Feb 15, 2023
f8ed37c
write out some interim data for model QAQC
yuqiww Feb 23, 2023
8172116
move some debug notebooks around
yuqiww Feb 23, 2023
26785b8
stand-alone scripts to prepare model data for visualization dashboard
yuqiww Feb 23, 2023
8da66bb
disagreggate settings.yaml
theocharides Feb 24, 2023
5f5f3cd
clean inputs/zone_forecast and inputs/regional_controls
theocharides Feb 27, 2023
04c627c
fix datasources.py typo
theocharides Feb 27, 2023
ff7d465
one more typo fix
theocharides Feb 28, 2023
b339949
make vmt fee columns conditional
theocharides Feb 28, 2023
c701ad3
make renter protections orca table dependent on strategy being enabled
theocharides Mar 1, 2023
46ca42c
make inputs usage dependent on strategy being enabled
theocharides Mar 2, 2023
2151054
make add. inputs options for a NP run
theocharides Mar 6, 2023
ab0faab
make more strategy files optional
theocharides Mar 7, 2023
9b5ac4a
update inputs documentation
theocharides Mar 7, 2023
4b9a830
break up edits.yaml into more fitting places
theocharides Mar 8, 2023
bbc4131
more file name fixes and clarity
theocharides Mar 9, 2023
7e2023e
make yearly res vacancy rates an adjuster
theocharides Mar 9, 2023
1bb51f8
more documentation updates
theocharides Mar 10, 2023
ceadef4
Delete working-notes.md
theocharides Mar 10, 2023
d41d96f
Update input.md
theocharides Mar 20, 2023
b2f943c
Merge branch 'visualize_model_data' into viz_interim_based_on_new_inputs
yuqiww Mar 26, 2023
65a30a6
check diagnostic_zones data
yuqiww Mar 28, 2023
02106f4
remove unused summaries package
theocharides Apr 17, 2023
9b1a645
move package version logging to main log
theocharides Apr 17, 2023
ba8b376
start to separate out summaries to clean them
theocharides Apr 17, 2023
39be3f5
move slack reporting into one place (baus.py)
theocharides Apr 18, 2023
2d08ecc
separate out hazards summaries
theocharides Apr 18, 2023
de92d8a
distinguish core summaries and metrics scripts
theocharides Apr 18, 2023
ebe936b
continue to distinguish summaries
theocharides Apr 18, 2023
226b78e
clean up core summaries
theocharides Apr 18, 2023
ff04af4
clean up hazards summaries
theocharides Apr 18, 2023
a5dea40
fix to sb_743 code
theocharides Apr 19, 2023
900cfd8
Merge pull request #317 from BayAreaMetro/organize_inputs
akselx Apr 20, 2023
188f49b
Update models.py
akselx Apr 25, 2023
316193d
add county to geographic summaries
theocharides Apr 25, 2023
dcb5ffa
separate hazards summaries
theocharides Apr 25, 2023
ffa757e
clean core summaries
theocharides Apr 25, 2023
a9294f5
clean geographic summaries
theocharides Apr 25, 2023
8b57996
Merge branch 'visualize_model_data' into viz_interim_based_on_new_inputs
yuqiww Apr 25, 2023
93fa6a9
documentation on some interim data tables
yuqiww Apr 25, 2023
4008298
additional interim data documentation
yuqiww Apr 25, 2023
08f5880
make "main" the default doc version
yuqiww Apr 26, 2023
df67a77
clean travel model summaries
theocharides Apr 27, 2023
af41072
add in-line documentation and remove some debugging code
yuqiww Apr 28, 2023
061cd59
add code to extract diagnostic data from "simulation_output.json"
yuqiww Apr 28, 2023
1730bfe
add documentation on interim data
yuqiww May 2, 2023
005b64e
additional travel model summaries editing
theocharides May 8, 2023
97aed00
Merge pull request #322 from BayAreaMetro/sb753_patch
theocharides May 15, 2023
68522ff
Create baus_iter.py
akselx May 17, 2023
8fe8833
Fixed link in readme
akselx May 17, 2023
b5f875e
bug fix
yuqiww May 19, 2023
466748a
update affordable housing summaries
theocharides May 19, 2023
b00a7f1
update hazards summaries formatting and syntax
theocharides May 23, 2023
af792a1
streamline metrics with plan metrics
theocharides May 23, 2023
3e60673
use variables for summary years
theocharides Jul 3, 2023
8d2b2f9
clean summaries in run file
theocharides Jul 3, 2023
d94dd04
undo last commit and save for the viz PR
theocharides Jul 3, 2023
41b50fb
direct rest of /runs data to new outputs dir
theocharides Jul 3, 2023
d2a14e9
make running summaries package configurable
theocharides Jul 6, 2023
4ff7541
add documentation
theocharides Jul 12, 2023
3bdb9cb
fix errors
theocharides Jul 12, 2023
a1864fe
try to fix markdown on gh-pages specifically
theocharides Jul 12, 2023
118c5ea
another docs markdown edit
theocharides Jul 12, 2023
7a3de91
try to fix markdown spacing
theocharides Jul 12, 2023
9992ca9
docs fixes
theocharides Jul 12, 2023
ddc7b85
update docs headings
theocharides Jul 12, 2023
e714ea1
add a configs page to the docs
theocharides Jul 12, 2023
f36792c
fix for metrics
theocharides Jul 12, 2023
4b04f9a
docs fix
theocharides Jul 12, 2023
49169d9
add config page to docs cont.
theocharides Jul 12, 2023
2287dd1
fix to config name
theocharides Jul 12, 2023
01d0474
more summary fixes
theocharides Jul 17, 2023
d418551
more summary edits
theocharides Jul 19, 2023
680ae39
reduce growth summaries to commonly used columns
theocharides Jul 19, 2023
e13711a
reduce summary years to key model years
theocharides Jul 19, 2023
7096302
fix initial summary year
theocharides Jul 19, 2023
85e1012
edits for selecting summary model years
theocharides Jul 19, 2023
aa19965
switch run_num to run_name
theocharides Jul 25, 2023
7d90480
add output to sub-folders
theocharides Jul 25, 2023
b930a0c
summaries fixes
theocharides Jul 26, 2023
70dc128
summary fixes
theocharides Jul 27, 2023
df80549
update environment files, archiving past envs with their model/versio…
theocharides Jul 27, 2023
fe21213
merge the two scripts for multiple BAUS runs
theocharides Jul 27, 2023
794e3a5
clean up gitignore
theocharides Jul 27, 2023
c107902
new outputs folders fix
theocharides Aug 2, 2023
d1df2a9
read from outputs subdirs
theocharides Aug 7, 2023
258386f
Update README.md
theocharides Aug 7, 2023
80804dd
Update README.md
theocharides Aug 7, 2023
0cacdc1
Update README.md
theocharides Aug 7, 2023
f7245e1
Update README.md
theocharides Aug 7, 2023
edb8b6b
update docs
theocharides Aug 7, 2023
5e3bd75
more docs changes
theocharides Aug 7, 2023
cadd0ff
update docs
theocharides Aug 8, 2023
606c54d
add elcm error fix
theocharides Aug 8, 2023
d051b1b
add model diagrams to docs
theocharides Aug 8, 2023
5b7687e
more docs diagrams
theocharides Aug 8, 2023
6908d6d
run_name added to slack message
theocharides Aug 9, 2023
43f63ac
Update README.md
theocharides Aug 9, 2023
1411b5a
update model.md
theocharides Aug 9, 2023
05d6fa4
update model.md again
theocharides Aug 9, 2023
c1c9a51
update scenarios docs
theocharides Aug 9, 2023
7b647ee
Merge branch 'main' into clean_summaries
theocharides Aug 9, 2023
da0c302
Merge pull request #319 from BayAreaMetro/clean_summaries
theocharides Aug 9, 2023
a31d64e
Merge branch 'main' into remove_outdated_code
theocharides Aug 10, 2023
e06ba39
fully remove run_number from code
theocharides Aug 16, 2023
90ccf03
remove src/
theocharides Aug 16, 2023
7ac74fd
remove runs/
theocharides Aug 16, 2023
a08c16a
rm output/ and related non-current scripts
theocharides Aug 16, 2023
137ca91
reorg scripts/
theocharides Aug 28, 2023
f9bbbb4
delete taz_logsum aggregation code because it is already a column is …
yuqiww Aug 29, 2023
8463828
move urbansim interim and parcel output into baus
theocharides Aug 29, 2023
3ffd746
Merge pull request #324 from BayAreaMetro/remove_outdated_code
theocharides Aug 29, 2023
3fa25cf
Merge branch 'main' into viz_interim_based_on_new_inputs
theocharides Aug 29, 2023
1376585
remove old viz and run comparison code
theocharides Aug 29, 2023
c00df8f
remove more older viz and run comparison code
theocharides Aug 29, 2023
381f58d
clean run file and make visualization a BAUS mode
theocharides Sep 12, 2023
c7a04b1
setup viz location
theocharides Sep 12, 2023
15362d3
move validation code to one place
theocharides Sep 12, 2023
19a53b6
make summary code consistent with viz outputs
theocharides Sep 12, 2023
5672999
fixes to viz cleaning
theocharides Sep 13, 2023
0b4e9ed
rest of the updates to prep outputs for viz
theocharides Sep 18, 2023
c6845e9
clean viz scripts
theocharides Sep 18, 2023
391c2f9
begin to update interim summary code
theocharides Sep 18, 2023
e3b554e
more file renaming
theocharides Sep 19, 2023
a5caa30
cont file name updates
theocharides Sep 19, 2023
4595833
fixes for formatting
theocharides Sep 19, 2023
8805da6
fix slack reading
theocharides Sep 20, 2023
203f02d
Merge pull request #325 from BayAreaMetro/viz_interim_based_on_new_in…
theocharides Sep 22, 2023
4bb0394
Update environment YAML file
drewlevitt Sep 29, 2023
865e14d
add interim output to viz
theocharides Oct 12, 2023
cdf2128
Merge pull request #329 from BayAreaMetro/viz_interim_based_on_new_in…
theocharides Oct 12, 2023
fab4fdd
try to restart docs
theocharides Oct 16, 2023
843a47d
update config and inputs docs
theocharides Oct 16, 2023
0b5d49d
update output md
theocharides Oct 16, 2023
6cb0d79
update model md
theocharides Oct 16, 2023
4380492
add docs model images
theocharides Oct 16, 2023
85ee592
update more docs
theocharides Oct 16, 2023
8c22591
update mkdocs.yml
theocharides Oct 16, 2023
541cee6
more docs updates
theocharides Oct 16, 2023
b8dee9f
Relocate visualization directory
drewlevitt Oct 17, 2023
2bc5b6d
Add PBA50+ contingency plan validation Tableau
drewlevitt Oct 17, 2023
3c0f55e
fix docs url
theocharides Oct 17, 2023
922c5bf
Merge branch 'main' into viz_interim_based_on_new_inputs
theocharides Oct 17, 2023
9028e4c
move visualizer to repo
theocharides Oct 17, 2023
eba31b7
update tableau datasources
theocharides Oct 17, 2023
784b258
Merge pull request #330 from BayAreaMetro/fix_docs_issues
theocharides Oct 17, 2023
bf35337
move run visualizer into baus folder
theocharides Oct 17, 2023
64eb65e
move visualization folder to have subdirs by viz
theocharides Oct 19, 2023
80e2f88
Merge branch 'main' into viz_interim_based_on_new_inputs
theocharides Oct 19, 2023
e69b017
Merge pull request #331 from BayAreaMetro/viz_interim_based_on_new_in…
theocharides Oct 19, 2023
ddad1bb
rm accidentally added files
theocharides Oct 19, 2023
3970fb5
update visualizer file location
theocharides Oct 19, 2023
e7589b5
more Tableau file changes
theocharides Oct 19, 2023
a65e2a6
Merge pull request #332 from BayAreaMetro/viz_interim_based_on_new_in…
theocharides Oct 19, 2023
1b201a9
Tableau change update
theocharides Oct 19, 2023
3c4eda0
move in scripts from petrale
theocharides Oct 23, 2023
6d5ffe2
move earthquake file creation script to Petrale
theocharides Oct 23, 2023
3df6bdf
add a couple of more files to the scripts folder
theocharides Oct 23, 2023
d87e8c2
Add DR units to Tableau
theocharides Oct 24, 2023
d36fedc
Merge pull request #333 from BayAreaMetro/viz_interim_based_on_new_in…
theocharides Oct 24, 2023
72100c0
add to configs documentaion
theocharides Oct 24, 2023
0369c38
update configuration documentation
theocharides Oct 24, 2023
316028a
begin updating interim table documentation
theocharides Oct 24, 2023
213f441
more doc updates
theocharides Oct 24, 2023
ea8847b
output docs updates
theocharides Oct 24, 2023
16a78ee
remove unneeded nearest neighbor calc
theocharides Nov 1, 2023
59629dc
config doc update
theocharides Nov 1, 2023
7989f2a
update input doc
theocharides Nov 1, 2023
592a81d
update README with new visualizer steps
theocharides Nov 1, 2023
c3724cf
Remove slacker dependency
akselx Nov 2, 2023
10d6d3d
Added slack_sdk to environment file
akselx Nov 2, 2023
a7c24ea
Fixed indentation
akselx Nov 2, 2023
49b7da4
Merge pull request #336 from BayAreaMetro/remove_slacker_dependency
theocharides Nov 3, 2023
bd55c02
Merge branch 'main' into viz_interim_based_on_new_inputs
theocharides Nov 3, 2023
e6febb6
Added code to create target folders for summaries
akselx Nov 3, 2023
5043367
Merge pull request #338 from BayAreaMetro/add_required_output_folders
theocharides Nov 3, 2023
c10652f
Update variables.py
akselx Nov 4, 2023
ec4da2c
Merge branch 'main' into viz_interim_based_on_new_inputs
theocharides Nov 6, 2023
c6e539d
update Slack installation
theocharides Nov 6, 2023
c26053d
update slack install instructions in main readme
theocharides Nov 6, 2023
c6f0f99
Add note to direct to the gh-pages branch for BAUS docs
theocharides Nov 6, 2023
d603486
update main readme to reflect new outputs folder creation
theocharides Nov 6, 2023
5a170a7
Merge pull request #334 from BayAreaMetro/create_consistent_runs
akselx Nov 7, 2023
f990c45
update try/except logic for creating model_run_inventory.csv
theocharides Nov 7, 2023
6ef34c6
Reverse sqft_per_job building type NA fix
theocharides Nov 8, 2023
c3ce6a1
Merge branch 'main' into viz_interim_based_on_new_inputs
theocharides Nov 9, 2023
ee903a8
update model documentation
theocharides Nov 10, 2023
3b78c9c
output doc dix
theocharides Nov 10, 2023
f74fe84
update visualizer with inputs
theocharides Nov 10, 2023
5bbea15
Merge pull request #335 from BayAreaMetro/viz_interim_based_on_new_in…
theocharides Nov 13, 2023
932ba3d
update output doc and visualizer
theocharides Nov 13, 2023
7e27b90
Merge pull request #342 from BayAreaMetro/viz_interim_based_on_new_in…
theocharides Nov 13, 2023
815c542
add fix to interim zone output
theocharides Nov 14, 2023
d1a5521
Merge pull request #344 from BayAreaMetro/create_consistent_runs
akselx Nov 15, 2023
6edd686
move model summary year to 2020
theocharides Nov 30, 2023
a76b4c7
update interim_zone_output to begin in initial summary year
theocharides Nov 30, 2023
97ea865
only activate preservation after initial summary year
theocharides Nov 30, 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
25 changes: 4 additions & 21 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,7 @@ venv
ual_baus_install.sh
configs/hlcm_renter_no_unplaced.yaml
configs/hlcm_owner_no_unplaced.yaml
data/2015_06_01_zoning_parcels.csv
data/2015_08_13_parcels_geography.csv
data/2015_08_13_zoning_parcels.csv
data/2015_08_19_parcels_geography.csv
data/2015_08_29_costar.csv
data/2015_09_25_parcels_geography.csv
data/2015_09_25_zoning_parcels.csv
data/2015_09_30_2_parcels_geography.csv
data/2015_09_30_parcels_geography.csv
data/2015_10_05_zoning_parcels.csv
data/2015_10_06_zoning_parcels.back.csv
data/2015_10_06_zoning_parcels.csv
data/2015_10_07_2_parcels_geography.csv
data/2015_10_07_parcels_geography.csv
data/2015_12_11_parcels_geography.csv
data/2015_12_11_zoning_parcels.csv
data/2015_12_16_2_zoning_parcels.csv
data/2015_12_21_zoning_parcels.csv
data/simple_parcels.*
data/02_01_2016_parcels_geography.csv
data/2015_12_21_zoning_parcels.csv
configs/hlcm_renter_lowincome_no_unplaced.yaml
configs/hlcm_owner_lowincome_no_unplaced.yaml
.DS_Store
site/*
47 changes: 21 additions & 26 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,25 @@
language: python
sudo: false

python:
- '2.7'
- '2.7'
- '3.6'

# The Statsmodels line is to resolve a hopefully temporary problem --
# Statsmodels 0.11 dropped support for Python 2.7, but as of 2020-02-23 is
# being installed anyway by PyPI in Python 2.7 environments. If this isn't
# fixed upstream, the best place to address it is in UrbanSim itself, where we
# can make the Statsmodels version conditional on the Python version.

install:
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
fi
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
# Useful for debugging any issues with conda
- conda info -a
# don't think we need all these packages, but copying from urbansim
- >
conda create -q -c synthicity -n test-environment
python=$TRAVIS_PYTHON_VERSION
cytoolz ipython-notebook jinja2 matplotlib numpy pandas patsy pip scipy
statsmodels pytables pytest pyyaml pandana
- source activate test-environment
- pip install pep8
- pip install -r requirements.txt
- pip install statsmodels==0.10.* # see comment above
- pip install . # baus and requirements
- pip install coverage pycodestyle pytest # testing tools
- pip list

script:
- pep8 baus
- pep8 scripts
- py.test baus
- pycodestyle baus
- pycodestyle scripts
- coverage run --source baus --module pytest --verbose

after_success:
- coverage report
87 changes: 22 additions & 65 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,75 +1,32 @@
DRAFT Bay Area UrbanSim (BAUS) Implementation
Bay Area UrbanSim (BAUS) Implementation
=======

[![Build Status](https://travis-ci.org/UDST/bayarea_urbansim.svg?branch=master)](https://travis-ci.org/UDST/bayarea_urbansim)
This is the UrbanSim implementation for the Bay Area. Documentation for the UrbanSim framework is available [here](https://udst.github.io/urbansim/). All documentation for Bay Area Urbansim is at: http://bayareametro.github.io/bayarea_urbansim/main/

This is the DRAFT UrbanSim implementation for the Bay Area. Policy documentation for the Bay Area model is available [here](http://data.mtc.ca.gov/bayarea_urbansim/) and documentation for the UrbanSim framework is available [here](https://udst.github.io/urbansim/).
## Installation
Bay Area UrbanSim is written in Python and runs in a command line environment. It's compatible with Mac, Windows, and Linux, and with Python 2.7 and 3.5+. Python 3 is recommended.

* Install Python for your OS ([Anaconda](https://www.continuum.io/downloads) highly suggested)
* Clone this repository
* Install dependencies using `pip install -r requirements.txt` (may need to uncomment out pandana)
* Get data using `python baus.py -c --mode fetch_data` (you will need an appropriately configured AWS credentials file which you must get from your MTC contact)
* Preprocess data using `python baus.py -c --mode preprocessing`
* Run a simulation using `python baus.py -c` (default mode is simulation)
1. Install the Anaconda Python distribution (not strictly required, but makes things easier and more reliable)
2. Clone this repository
3. Create a Python environment with the current dependencies: `conda env create -f baus-env-2023.yml`
4. Activate the environment: `conda activate baus-env-2023`
6. Store `run_setup.yaml` next to the repository (ask an MTC contact for access) and use it to specify the `inputs` and `outputs` folder locations and `run_name`
7. Pull inputs into the model `inputs` folder (ask an MTC contact for access)
8. Establish an outputs folder in the `outputs` folder using the `run_name` as the folder name
9. Run `python baus.py` from the main model directory (more info about the command line arguments: `python baus.py --help`)

### An overview of baus.py

baus.py is a command line interface (cli) used to run Bay Area UrbanSim in various modes. These modes currently include:

* estimation, which runs a series of models to save parameter estimates for all statistical models
* simulation, which runs all models to create a simulated regional growth forecast
* fetch_data, which downloads large data files from Amazon S3 as inputs for BAUS
* preprocessing, which performas long-running data cleaning steps and writes newly cleaned data back to the binary h5 file for use in the other steps
* baseyearsim which runs a "base year simulation" which summarizes the data before the simulation runs (during simulation, summaries are written after each year, so the first year's summaries are *after* the base year is finished - a base year simulation writes the summaries before any models have run)
## Optional Slack Messenger
* Install the Slack SDK using `pip install slack_sdk`
* Set environment variable `SLACK_TOKEN = token` (you will need an appropriate slack token from your MTC contact)
* Set environment variable `URBANSIM_SLACK = TRUE`

### Urban Analytics Lab (UAL) Improvements

#### Data schemas
## Optional Model Run Visualizer
* Configure the location that BAUS will write the visualizer files to in `run_setup.yaml` (stored on MTC's Box account for internal visualization)
* Open the visualizer from the BAUS repository to explore the model run, and/or
* Open the visualizer from the BAUS repository and publish it to the web (hosted on using MTC's Tableau). At this time runs can be removed from `model_run_inventory.csv` to select the runs to be shown on the web tool

* Builds out the representation of individual housing units to include a semi-persistent tenure status, which is assigned based on characteristics of initial unit occupants
* Joins additional race/ethnicity PUMS variables to synthetic households [NB: currently missing from the reconciled model, but will be re-added]
* Adds a representation of market rents alongside market sale prices

#### Model steps

* Residential hedonics predict market rents and sale prices separately, with rents estimated from Craigslist listings
* Household move-out choice is conditional on tenure status
* Household location choice is modeled separately for renters and owners, and includes race/ethnicity measures as explanatory variables
* Developer models are updated to produce both rental and ownership housing stock

Notebooks, work history, code samples, etc are kept in a separate [bayarea_urbansim_work](https://github.com/ual/bayarea_urbansim_work) repository.

#### Current status (August 2016)

* All of the UAL alterations have been refactored as modular orca steps
* This code is contained in `baus/ual.py`, `configs/ual_settings.yaml` and individual `yaml` files as needed for regression models that have been re-estimated
* There are *no* changes to `urbansim`, `urbansim_defaults`, or MTC's orca initialization and model steps
* MTC and UAL model steps can be mixed and matched by passing different lists to orca; see `run.py` for examples
* The UAL model steps document and test for required data characteristics, using the [orca_test](https://github.com/udst/orca_test) library

### Outputs from Simulation (written to the runs directory)

ALL OUTPUT IN THIS DIRECTORY IS NOT OFFICIAL OUTPUT. PLEASE CONTACT MTC FOR OFFICIAL OUTPUTS OF THE LAST PLAN BAY AREA.

`[num]` = a positive integer used to identify each successive run. This number usually starts at 1 and increments each time baus.py is called.

Many files are output to the `runs/` directory. They are described below.

filename |description
----------------------------|-----------
run[num]\_topsheet\_[year].csv | An overall summary of various housing and employment outcomes summarized by very coarse geographies.
run[num]_parcel_output.csv | A csv of all new built space in the region. This has a few thousand rows and dozens of columns which contain various inputs and outputs, as well as debugging information which helps explain why each development was picked by UrbanSim.
run[num]\_parcel_data\_[year].csv |A CSV with parcel level output for *all* parcels with lat, lng and includes change in total_residential_units and change in total_job_spaces, as well as zoned capacity measures.
run[num]\_building_data\_[year].csv |The same as above but for buildings.
run[num]\_taz\_summarie\s_[year].csv |A CSV for [input to the MTC travel model](http://analytics.mtc.ca.gov/foswiki/UrbanSimTwo/OutputToTravelModel)
run[num]\_pda_summaries\_[year].csv, run[num]\_juris_summaries\_[year].csv, run[num]\_superdistrict_summaries\_[year].csv | Similar outputs to the taz summaries but for each of these geographies. Used for understanding the UrbanSim forecast at an aggregate level.
run[runnum]_dropped_buildings.csv | A summary of buildings which were redeveloped during the simulated forecast.
run[runnum]_simulation_output.json | Used by the web output viewer.


### Directory structure

* baus/ contains all the Python code which runs the BAUS model.
* data/ contains BAUS inputs which are small enough to store and render in GitHub (large files are stored on Amazon S3) - this also contains lots of scenario inputs in the form of csv files. See the readme in the data directory for detailed docs on each file.
* configs/ contains the model configuration files used by UrbanSim. This also contains settings.yaml which provides simulation inputs and settings in a non-tabular form.
* scripts/ these are one-off scripts which are used to perform various input munging and output analysis tasks. See the docs in that directory for more information.
## Documentation
* See the repository's `gh-pages` branch for instructions on installing the BAUS documentation packages and submittings documentation
19 changes: 0 additions & 19 deletions all.py

This file was deleted.

22 changes: 22 additions & 0 deletions baus-env-2023.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This environment pins dependencies at specific versions, to ensure consistent model
# behavior. It also pins some of the more important sub-dependencies.

# Install this environment by running `conda env create -f baus-env-2023.yml`

name: baus-env-2023

channels:
- conda-forge

dependencies:
- python=3.6
- numpy=1.17
- orca=1.5
- orca_test=0.1
# - pandana=0.4
- pandas<1.0
- scikit-learn=0.22
- statsmodels=0.11
- urbansim=3.2
- urbansim_defaults=0.2
- pyyaml<6.0
Loading