The NYC Department of City Planning has updated the Zoning Resolution to ...
There are two paths a user might take:
- They know what their business will be and want to know where it can be
- They know where their business will be and want to know what it can be
A user can select a NAICS category and determine which zoning districts allow that land use.
- Find an appropriate NAICS code description
- Using the 6-digit NAICS code, find the DCP use associated with that code
- If the 6-digit code is not in the DCP uses, repeat with the 5-digit code
- If the 5-digit code is not in the DCP uses, repeat with the 4-digit code
- ...
- Note the zoning districts in which this use is allowed and any special ...
A user can select a zoning district and determine which NAICS categories are allowed on that land.
- ...
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.
- 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
marimo docs
# Open a notebook
marimo edit process_data.py
# Open a notebook in app mode
marimo app 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