https://github.com/a-b-street/ltn
Design low-traffic neighbourhoods in your web browser
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.9%) to scientific vocabulary
Repository
Design low-traffic neighbourhoods in your web browser
Basic Info
- Host: GitHub
- Owner: a-b-street
- License: apache-2.0
- Language: Rust
- Default Branch: main
- Homepage: https://a-b-street.github.io/ltn/
- Size: 113 MB
Statistics
- Stars: 14
- Watchers: 4
- Forks: 3
- Open Issues: 84
- Releases: 0
Metadata Files
README.md
Low-traffic neighbourhood tool v2
LTNs are a traffic management measure to stop excessive through-traffic cutting through residential streets. This is an interactive web app for rapidly exploring their design.
- Global version: https://a-b-street.github.io/ltn (import anywhere from OpenStreetMap)
- England: https://a-b-street.github.io/ltn/england.html
- Scotland: https://cnt.scot
- Read the user guide: https://a-b-street.github.io/ltn/user_guide.html
Developer docs
Installation
You'll need: npm, wasm-pack, and cargo.
cd web, and then:
npm cito install dependencies (cito make sure the versions inpackage-lock.jsonare used)npm run wasmto rebuild the Rust backend- vite doesn't automatically rebuild when you edit things
npm run devto run locally- Changes to the Svelte/CSS usually auto-reload in your browser
npm run fmtto auto-format codenpm run checkto see TypeScript errors
Faster local development
The tool operates on fixed study areas, generated from clips of OSM data. Custom areas imported by the user are always retrieved from the Overpass API, with the latest OSM data. For speed and for deterministic tests, there are also "built-in" study areas, consisting of pre-clipped osm.pbf files that do not automatically use the latest OSM data. These are manually managed and hosted by Dustin on assets.od2net.org and assets.cnt.scot.
If you're developing locally, you can cache assets locally by running
bin/download-local-dev-data.sh.
Translations
If you're translating the app, you'll be editing .po files in
web/src/locales/. You have to refresh the entire page to see changes. If
you're using a tool to edit the .po file that's handy, please share it so we
can list it here! And don't forget to add yourself to the credits in
web/src/About.svelte.
When the app changes and new strings to translate appear, they should be
detected and added to the .po automatically. Run npx wuchale init if
something goes wrong.
Tests
(Don't spend too much time looking after these particular tests; they've been helpful to spot unexpected changes in calculating existing modal filters, but they're often just noisy when cell geometry slightly changes.)
The tests directory has some diff-based tests. cd backend; cargo test
--release will run them. You'll need to follow the instructions above to
ensure you have bristol and strasbourg areas set up. To accept the diffs,
just commit the changed files.
There's a few ways to understand / verify the diffs.
First, you can manually try the tool
before and after (running locally). You
can load a .geojson file from tests/ as a project, then click the
neighbourhood boundary (Bristol has two tests, Strasbourg just one). Then just
visually compare things -- cells, shortcuts, and existing filters.
You can also try just diffing the output GeoJSON file as text. They're stored
without pretty-printed newlines/indentation to save size in git, but you can do
something like this to view, assuming you have jq and meld (or another diff
tool):
``` function json_diff { cat $1 | jq > /tmp/after.json git show HEAD^:./$1 | jq > /tmp/before.json meld /tmp/before.json /tmp/after.json }
cd tests/output jsondiff bristolwest.geojson ```
Finally, if you have the before and after output GeoJSON file (json_diff
creates /tmp/before.geojson and /tmp/after.geojson), then you can try
exploring in GeoDiffr. You'll want to
"remove unchanged features", then try to understand the remaining changes. This
tool is not very sophisticated; it's only helpful sometimes when filters
change, but it's less useful if big cell polygons change.
Architecture
The Rust backend crate gets compiled to WASM, with generally type-unsafe APIs
in lib.rs. On the frontend side, wasm.ts wraps these APIs in nicer TS APIs.
The Svelte frontend calls APIs in the main thread (though moving to web workers
later is a possibility). The "important" state is kept in the backend, while
the frontend has more ephemeral UI state. The main state is serialized as
GeoJSON and kept in the user's browser local storage. The frontend is
effectively a single page app, with the Mode toggling between different
pages.
Owner
- Name: A/B Street
- Login: a-b-street
- Kind: organization
- Email: dabreegster@gmail.com
- Location: Seattle, WA
- Website: abstreet.org
- Twitter: CarlinoDustin
- Repositories: 14
- Profile: https://github.com/a-b-street
Transportation planning and traffic simulation software for creating cities friendlier to walking, biking, and public transit
Committers
Last synced: about 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| Dustin Carlino | d****r@g****m | 445 |
| Michael Kirk | m****e@e****e | 204 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 207
- Total pull requests: 209
- Average time to close issues: 2 months
- Average time to close pull requests: 1 day
- Total issue authors: 8
- Total pull request authors: 2
- Average comments per issue: 1.36
- Average comments per pull request: 0.6
- Merged pull requests: 176
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 149
- Pull requests: 206
- Average time to close issues: 21 days
- Average time to close pull requests: 1 day
- Issue authors: 7
- Pull request authors: 2
- Average comments per issue: 1.13
- Average comments per pull request: 0.61
- Merged pull requests: 173
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- michaelkirk (74)
- dabreegster (71)
- TFCx (13)
- XioNoX (9)
- rouelibre1 (3)
- XaranDeBruregor (2)
- Kandico (1)
- Carantouhil (1)
Pull Request Authors
- michaelkirk (118)
- dabreegster (88)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- actions/cache v3 composite
- actions/checkout v2 composite
- actions/setup-node v3 composite
- jetli/wasm-pack-action v0.4.0 composite
- peaceiris/actions-gh-pages v3 composite
- 112 dependencies
- 257 dependencies
- @ianvs/prettier-plugin-sort-imports ^4.0.2 development
- @sveltejs/vite-plugin-svelte ^2.4.2 development
- @tsconfig/svelte ^4.0.1 development
- prettier ^2.8.8 development
- prettier-plugin-svelte ^2.10.1 development
- svelte ^4.0.0 development
- svelte-check ^3.4.4 development
- tslib ^2.6.0 development
- typescript ^5.1.3 development
- vite ^4.3.9 development
- vite-plugin-wasm-pack 0.1.11 development
- @mapbox/mapbox-gl-draw ^1.4.3
- @turf/bbox ^6.5.0
- @types/geojson ^7946.0.13
- svelte-maplibre ^0.7.3