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

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)

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
```