Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

A collection of tools relevant to locally-oriented dashboards. This is intended to run as an atlasboard submodule.

Notifications You must be signed in to change notification settings

jlongman/atlasboard-localdash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 

Repository files navigation

atlasboard-localdash

A collection of tools relevant to locally-oriented dashboards supporting car2go, biki bike sharing and the Montreal metro. This is intended to run as an atlasboard submodule.

Note the shown dashboard includes altlasboard-social for twitter, atlasboard-weather and a slightly modified google-calendar job/widget from the atlasboard-demo package. (middle-right, bottom-middle and middle-bottom, respectively.)

Creates a table showing the current Montreal metro line status and the current message from the STM. Non-normal conditions are highlighted. This works best as a 1-column, 2-row element.

Configuration:

All configuration options are optional.

  "metro514": {
    "language": "english"
  }

Values

The language configuation option can be either english or french.

Creates a static image Google Map which is themeable and can have bixi-style bike sharing stations with bike availability added as markers. At this time only bixi bike sharing and Car2Go car sharing services are supported. General Bikeshare Feed Specification (GBFS) is not supported.

The motivation to use a static map is that the ChromeCast is slow to render JavaScript maps (e.g. add a webanimation showing a glowing point around your origin and watch it crash!)

The jobs code has the bike sharing-parsing portion and theming portion separable. (My node/atlasboard knowledge doesn't know how to break this out, PRs welcome).

Configuration:

  "mystaticmap": {
     "lat": 40.76727,
     "lon":-73.99392888,
     "limit": 600,
     "count": 20,
     "maptype": "terrain",
     "size": "640x640",
     "zoom": 16,
     "theme": "midnightcommander"
     "bixi":{
       "city": "montreal"
     },
     "car2go":{
       "loc": "montreal",
       "apikey": "Your Car2GoConsumerKey"
     }
  }

Mandatory

  • lat and lon are mandatory
  • if you use bixi you must set a city
  • if you use car2go you must set a loc and apikey

Values

Supported city bike sharing service values: montreal, ottawa, boston, chicago, nyc, toronto, columbus, chattanooga, sf

All car2go values for car2go.loc are supported.

limit is the distance in meters from the lat and lon position.

count is the max number of stations to gather independent of distance.

size is limited to 640x640 without a premium account

zoom is optional, but I find the default guess is pretty wide angle.

theme is detailed below.

maptype can be roadmap, satellite, hybrid or terrain

transitcolor is any valid Google Maps API colour and highlights non-specified links. E.g. if a leg has no specified colour it will use the transitcolor. Most useful with themes.

Google Static Maps API Key

Adding a Static Maps API Key permits access to higher resolution and more features, at a premium. It also permits them to track by API key instead of by IP address. It is mandatory if you want a map larger than 640x640.

In your globalAuth.json you should add:

    "staticmap": {
        "apikey" : "YourGoogleStaticMapAPIKey"
    }

Theming

Full credit goes to:

Themes are files in the jobs/themes/ directories and are JSON files as in the Snazzymaps JSON format. (Unfortunately at this time I don't have an easier way than cut and paste to get these files. I've looked at their dev API and it doesn't immediately do what I want.)

Show a travel time a specific origin and destination.

Configuration:

  "mystaticmap": {
     "origin_lat": 40.76727,
     "origin_lon":-73.99392888,
     "destination_lat": 40.0,
     "destination_lon":-73.0,
     "mode": "bicycling",
  }

Also valid:

  "mystaticmap": {
     "origin": "4200 Saint Laurent, Montreal, PQ, Canada",
     "destination": "Old Montreal, Montreal, PQ, Canada",
     "mode": "driving"
  }

Mandatory

  • origin_lat and origin_lon (together) OR origin are mandatory
  • destination_lat and destination_lon(together) OR destination are mandatory

Values

mode can be driving, walking, bicycling, transit. Default is driving.

Google API Key

Adding a Google API Key permits access more features, at a premium. It also permits them to track by API key instead of by IP address.

In your globalAuth.json you should add:

    "traveltime": {
        "apikey" : "YourGoogleAPIKey"
    }

TODO: confirm distinction with static map and directions api keys, possibly distinguish

Show a travel time and route for a specific origin and destination.

Configuration:

  "mystaticmap": {
     "origin_lat": 40.76727,
     "origin_lon":-73.99392888,
     "destination_lat": 40.0,
     "destination_lon":-73.0,
     "mode": "bicycling",
     "maptype": "terrain",
     "size": "200x200",
     "transitcolor": "red",
  }

Also valid:

  "mystaticmap": {
     "origin": "4200 Saint Laurent, Montreal, PQ, Canada",
     "destination": "Old Montreal, Montreal, PQ, Canada",
  }

Mandatory

  • origin_lat and origin_lon (together) OR origin are mandatory
  • destination_lat and destination_lon(together) OR destination are mandatory

Values

mode can be driving, walking, bicycling, transit

size is limited to 640x640 without a premium account

zoom is optional, but the default guess works

theme is detailed below.

maptype can be roadmap, satellite, hybrid or terrain

transitcolor is any valid Google Maps API colour and highlights non-specified links. E.g. if a leg has no specified colour it will use the transitcolor. Most useful with themes.

Google Static Maps API Key

Adding a Static Maps API Key permits access to higher resolution and more features, at a premium. It also permits them to track by API key instead of by IP address. It is mandatory if you want a map larger than 640x640.

In your globalAuth.json you should add:

    "traveltimemap": {
        "apikey" : "YourGoogleStaticMapAPIKey"
    }

TODO: confirm distinction with static map and directions api keys, possibly distinguish

Theming

(!) At this time themes are only static strings. Once I understand how to share themes with [Staticmap] I will add this.

  "themeString": "&style=feature:all|element:labels.text.fill|color:0xffffff|weight:0.20|lightness:28|saturation:23|visibility:off&style=feature:all|element:labels.text.stroke|color:0x494949|lightness:13|visibility:off&style=feature:all|element:labels.icon|visibility:off&style=feature:administrative|element:geometry.fill|color:0x000000&style=feature:administrative|element:geometry.stroke|color:0x144b53|lightness:14|weight:1.4&style=feature:landscape|element:all|color:0x08304b&style=feature:poi|element:geometry|color:0x0c4152|lightness:5&style=feature:road.highway|element:geometry.fill|color:0x000000&style=feature:road.highway|element:geometry.stroke|color:0x0b434f|lightness:25&style=feature:road.arterial|element:geometry.fill|color:0x000000&style=feature:road.arterial|element:geometry.stroke|color:0x0b3d51|lightness:16&style=feature:road.local|element:geometry|color:0x000000&style=feature:transit|element:all|color:0x146474&style=feature:water|element:all|color:0x021019"

About

A collection of tools relevant to locally-oriented dashboards. This is intended to run as an atlasboard submodule.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published