An open API service indexing awesome lists of open source software.

https://github.com/danp/bird-map


https://github.com/danp/bird-map

Last synced: 10 days ago
JSON representation

Awesome Lists containing this project

README

          

# Bird Halifax Parking Map

This repo generates a GitHub Pages site showing:

- designated Bird parking zones in Halifax
- vehicles outside designated parking zones
- the top 20 vehicles furthest from any designated parking zone
- how long each vehicle has remained in the same spot

## Local run

```sh
go run .
```

Generated files land in `output/`:

- `output/index.html`
- `output/vehicles_outside_parking.geojson`
- `output/top_20_furthest_vehicles.geojson`
- `output/vehicle_state.json`
- `output/outside_zone_history.json`

For local runs, the generator reuses `output/vehicle_state.json` and `output/outside_zone_history.json` when present. On GitHub Pages builds, the app derives the current Pages URL from the repository metadata and merges the last published files into the new snapshot. Dwell tracking matches each current vehicle to the nearest prior vehicle within 2 meters, using fuel percent and range as tie-breakers when multiple prior vehicles are nearby. The outside-zone history records the total and outside-zone vehicle count for each feed update. Set `PUBLISHED_SITE_URL`, `PUBLISHED_STATE_URL`, or `PUBLISHED_HISTORY_URL` if you need to override the published artifact locations, such as with a custom domain.

## GitHub Pages deployment

The repo includes a GitHub Actions workflow at `.github/workflows/pages.yml` that:

- builds the site on pushes to `main`
- deploys to GitHub Pages
- refreshes the published page every hour at minute 17
- supports manual runs from the Actions tab

One-time GitHub setup:

1. Push the repo to GitHub.
2. In `Settings -> Pages`, set `Source` to `GitHub Actions`.
3. Keep the default branch as `main`, or update the workflow if you use a different branch.