Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/foursixnine/ishkur
An app just to visualize generated power
https://github.com/foursixnine/ishkur
dataviz strava strava-api strava-oauth
Last synced: 5 days ago
JSON representation
An app just to visualize generated power
- Host: GitHub
- URL: https://github.com/foursixnine/ishkur
- Owner: foursixnine
- Created: 2019-09-26T21:41:07.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-10-06T22:26:26.000Z (about 5 years ago)
- Last Synced: 2023-03-12T03:02:14.032Z (almost 2 years ago)
- Topics: dataviz, strava, strava-api, strava-oauth
- Language: Go
- Homepage: https://Ishkur.foursixnine.io
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Another data visualisation app for strava
Just because I'm curious and I want to... I've decided to show how the KJ that I've generated, can be transformed into power, while I know it might not be
entirely perfect, the idea would be a nice approximationSee for better details on how the authentication is done http://developers.strava.com/docs/authentication/
For now, pick and axe solution:
```
source production.env
export APP_SCOPES="activity:read_all,profile:read_all,activity:write,read_all,read"
#this returns an URL, go there, extract code and put it as AC
curl -X GET "http://www.strava.com/oauth/authorize?client_id=$CID&response_type=code&redirect_uri=http://localhost/exchange_token&approval_prompt=force&scope=$APP_SCOPES"
export AC="RESULT OF REDIRECTION's URL"#this returns json, get the token from here
curl -X POST https://www.strava.com/oauth/token -F client_id=$CID -F client_secret=$CS -F code=$AC -F grant_type=authorization_code
echo export STRAVA_TOKEN="TOKEN_GIVEN" > production.env
source production.env
curl -D /dev/stderr -X GET -H "Authorization: Bearer $STRAVA_TOKEN" 'https://www.strava.com/api/v3/athlete/activities' | tee activities.json | jq " map(. + {kwh: ( (.kilojoules // 0) / 3.6)} ) "
```## What to represent?
* Ideally I want to show how many light bulbs (90w or some fancy LED) can be powered in an hour
### further reading
* https://m.wikihow.com/Calculate-Kilowatts-Used-by-Light-Bulbs
* https://insights.regencylighting.com/kw-vs-kwh-how-much-energy-is-my-lighting-using
* http://energyusecalculator.com/electricity_cfllightbulb.htm
* https://www.arcadiapower.com/energy-101/energy-bills/how-to-visualize-one-kwh/