https://github.com/Active-Travel-Academy/ata-traffic-recorder
https://github.com/Active-Travel-Academy/ata-traffic-recorder
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/Active-Travel-Academy/ata-traffic-recorder
- Owner: Active-Travel-Academy
- License: mit
- Created: 2021-02-24T21:16:10.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-10-27T19:18:36.000Z (6 months ago)
- Last Synced: 2024-12-01T21:33:47.567Z (5 months ago)
- Language: Ruby
- Size: 721 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - Active-Travel-Academy/ata-traffic-recorder - (Ruby)
README
# Active Travel Academy (ATA) - Traffic recorder
We want to pull live traffic data from google for specific routes around Low Traffic Neighbourhoods (LTNs)
to identify any impacts of LTNs on journey times. The code to call Google's direction
API is in R and the data is stored in a SQL database (postgres - as we might want to
store geographical data using postgis later).The database has quite tight access control as there is no graphical interface.
# Setup
Create a postgres database and create the three roles:
```sql
CREATE DATABASE ltns;
CREATE ROLE shared_role NOLOGIN;
CREATE ROLE r_program IN ROLE shared_role PASSWORD "..." LOGIN;
CREATE ROLE asker IN ROLE shared_role PASSWORD "..." LOGIN;
```
then import the schema:
```
psql -U postgres ltns < ata.sql
```
(assuming you're superuser is postgres)Copy the `.Renviron.sample` to `.Renviron` and fill in with correct details.