https://github.com/cxmrykk/waze-heatmap
Store and display Waze alerts on a Heatmap (SQLite, OpenStreetMap)
https://github.com/cxmrykk/waze-heatmap
javascript leaflet rust sqlite waze
Last synced: about 2 months ago
JSON representation
Store and display Waze alerts on a Heatmap (SQLite, OpenStreetMap)
- Host: GitHub
- URL: https://github.com/cxmrykk/waze-heatmap
- Owner: Cxmrykk
- Created: 2024-01-10T04:07:21.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-25T23:49:32.000Z (over 2 years ago)
- Last Synced: 2025-04-02T10:20:00.107Z (about 1 year ago)
- Topics: javascript, leaflet, rust, sqlite, waze
- Language: Rust
- Homepage:
- Size: 1.83 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Waze Heatmap
Figure 1: Police reports in Sydney, Australia
### Dependencies
- [NodeJS](https://nodejs.org/en) and [NPM](https://nodejs.org/en) (Latest)
- [Rust](https://www.rust-lang.org/) and [Cargo](https://www.rust-lang.org/)
Server (Rust/Cargo)
- [Diesel](https://diesel.rs/guides/getting-started.html) (Dependencies required, see below)
> By default diesel CLI depends on the following client libraries:
>- **libpq** for the PostgreSQL backend
>- **libmysqlclient** for the Mysql backend
>- **libsqlite3** for the SQLite backend
### Installation
```sh
# Clone the project directory
git clone https://github.com/Cxmrykk/Waze-Heatmap.git
cd Waze-Heatmap/
```
#### Server
```sh
# Run Diesel setup (Make sure cargo is in $PATH for Diesel to work)
cd server/
cargo install diesel_cli
diesel setup
# Modify Config.toml (Alternative editors: nano, code, etc)
vim Config.toml
cd ../ # Exit server directory
```
#### Client
```sh
cd client/
npm install
cd ../ # Exit client directory
```
### Execution (Using `screen`)
```sh
#!/bin/bash
export HEATPATH=/path/to/project/source
screen -dmS heatmap-client bash -c 'cd $HEATPATH/client && exec node server.js'
screen -dmS heatmap-server bash -c 'cd $HEATPATH/server && exec cargo run'
```
### Configuration (`Config.toml`)
- Alert: `POLICE` by default (Inspect element on [waze.com](https://www.waze.com/live-map/) and reverse engineer the geolocation API response in the network tab)
- Top/Bottom: Longitude range (South)
- Left/Right: Latitude range (East)
```toml
alert = "POLICE"
interval = 1200
top = -10.683
bottom = -43.633
left = 113.15
right = 153.633
```