The Land Use Lookup tool is intended to make use allowance rules clear and accessible to business and property owners, city staff, and the public in the wake of changes adopted through City of Yes.
This simple web tool allows a user to instantly check whether any particular commercial, residential, or other use is allowed in any zoning district per the Zoning Resolution, without having to navigate the text directly. Use allowances can be queried by their official Zoning-defined use names, associated/underlying NAICS indices, or by selecting a zoning district and seeing a full list of what’s allowed there.
The app is a marimo notebook hosted on GitHub Pages.
A github action converts the notebook to WASM HTML and deploys the page. The action is triggered by changes to the main branch but can be configured to use other branches via the repo's Environment settings.
Important
uv is the preferred python environment and package manager (install docs) but everything here is possible with pip. See Data Engineering wiki page on Python management with uv for more details.
- Create a virtual environment with
uv venv - (Optional) Recompile python package requirements with
uv pip compile --upgrade requirements.in -o requirements.txt - Run
uv pip sync requirements.txtto ensure virtual environment has desired packages and their versions - Activate the virtual environment with
source .venv/bin/activate
- Create a new branch to modify data or code files
- If data files in
input/have been modified, runmarimo run process_data.pyto update files used by the app - (Optional) Run the app locally with
marimo run query_app.pyto confirm changes have the expected results - Open a Pull Request to request review of changes (emergency fixes may have to be merged without review)
- Once approved, merge the Pull Request
- Once the GitHub action automatically updates and redeploys the app, confirm the changes have the expected results
marimo docs
# Open a notebook
marimo edit process_data.py
# Open a notebook in app mode
marimo run query_app.py# Export to WASM HTML
uvx --verbose marimo export html-wasm --mode run a_notebook.py --output _site_a_notebook
# Run exported notebook
python -m http.server --directory _site_a_notebookFormatting files:
# Format all files in a folder
ruff format utils/
# Format a specific file
ruff format utils/query.pyRunning tests:
# Run all tests
python -m pytest
# Run all tests in a file
python -m pytest test/test_utils.py
# Run a specific test
python -m pytest test/test_utils.py::test_query_naics_codesmarimo - WebAssembly Notebooks marimo - Publish to GitHub Pages