Skip to content

cityofasheville/ecovisio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ecovisio

Connect to Eco-Visio API and load pedestrian and bicycle counts into db.

Run daily to pull bicycle and pedestrian counts and load them into database.

Plan is to publicly display on a dashboard.

Date parameters:

Run without parameters for yesterday's data. These parameters can be added to Lambda in test mode:

Set specific start or end date

{ "begin": "2023-02-17T00:00:00.000Z", "end": "2023-02-18T00:00:00.000Z" }

If getall, begin date is set to firstData for each counter. For initial load.

{ "getall": true }

Secrets

The secret eco-visio is added to AWS Secrets Manager { "api_url": "https://apieco.eco-counter-tools.com/", "auth_endpoint": "token", "api_key": '', "list_sites_endpoint": "api/1.0/site", "data_endpoint": "api/1.0/data/site", "db_host": "", "db_user": "", "db_port": "5432", "db_password": "", "db_database": "", }

deploy

A file named .env is required in the root dir. The format required is shown in env.example.

Commands

  • Test Locally: npm start
  • Deploy:
    • npm run deploy prod
    • npm run deploy dev
  • Destroy: (removes all objects from AWS)
    • npm run destroy prod
    • npm run destroy dev
  • Clean: npm run clean (removes local temp files)

About

Connect to Eco-Visio API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published