All Projects → yihong0618 → Running_page

yihong0618 / Running_page

Licence: mit
Make your own running home page

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Running page

Raio X
📊 Análise de dados das mulheres do curso de Ciência da Computação na UFCG
Stars: ✭ 18 (-98.33%)
Mutual labels:  data-analysis, data-visualization
Data Science Lunch And Learn
Resources for weekly Data Science Lunch & Learns
Stars: ✭ 49 (-95.45%)
Mutual labels:  data-analysis, data-visualization
Football Data
football (soccer) datasets
Stars: ✭ 18 (-98.33%)
Mutual labels:  data-analysis, data-visualization
Cookbook 2nd
IPython Cookbook, Second Edition, by Cyrille Rossant, Packt Publishing 2018
Stars: ✭ 704 (-34.69%)
Mutual labels:  data-analysis, data-visualization
Kepler.gl
Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.
Stars: ✭ 8,231 (+663.54%)
Mutual labels:  mapbox, data-visualization
Awesome Python Data Science
Probably the best curated list of data science software in Python.
Stars: ✭ 812 (-24.68%)
Mutual labels:  data-analysis, data-visualization
Socrat
A Dynamic Web Toolbox for Interactive Data Processing, Analysis, and Visualization
Stars: ✭ 26 (-97.59%)
Mutual labels:  data-analysis, data-visualization
Cookbook 2nd Code
Code of the IPython Cookbook, Second Edition, by Cyrille Rossant, Packt Publishing 2018 [read-only repository]
Stars: ✭ 541 (-49.81%)
Mutual labels:  data-analysis, data-visualization
Data Forge Ts
The JavaScript data transformation and analysis toolkit inspired by Pandas and LINQ.
Stars: ✭ 967 (-10.3%)
Mutual labels:  data-analysis, data-visualization
Data Science On Gcp
Source code accompanying book: Data Science on the Google Cloud Platform, Valliappa Lakshmanan, O'Reilly 2017
Stars: ✭ 864 (-19.85%)
Mutual labels:  data-analysis, data-visualization
Metabase
The simplest, fastest way to get business intelligence and analytics to everyone in your company 😋
Stars: ✭ 26,803 (+2386.36%)
Mutual labels:  data-analysis, data-visualization
Vue Data Board
A Data Analysis Board in Vue.
Stars: ✭ 1,046 (-2.97%)
Mutual labels:  data-analysis, data-visualization
Qs ledger
Quantified Self Personal Data Aggregator and Data Analysis
Stars: ✭ 559 (-48.14%)
Mutual labels:  data-analysis, data-visualization
Visualization Of Global Terrorism Database
📊 Visualization of GTD with py Plotly lib, including amazing graphs and animation 📼
Stars: ✭ 16 (-98.52%)
Mutual labels:  data-analysis, data-visualization
Data Science With Ruby
Practical Data Science with Ruby based tools.
Stars: ✭ 549 (-49.07%)
Mutual labels:  data-analysis, data-visualization
Model Describer
model-describer : Making machine learning interpretable to humans
Stars: ✭ 22 (-97.96%)
Mutual labels:  data-analysis, data-visualization
Courses
Quiz & Assignment of Coursera
Stars: ✭ 454 (-57.88%)
Mutual labels:  data-analysis, data-visualization
Antd Umi Sys
企业BI系统,数据可视化平台,主要技术:react、antd、umi、dva、es6、less等,与君共勉,互相学习,如果喜欢请start ⭐。
Stars: ✭ 503 (-53.34%)
Mutual labels:  data-analysis, data-visualization
Vectorbt
Ultimate Python library for time series analysis and backtesting at scale
Stars: ✭ 855 (-20.69%)
Mutual labels:  data-analysis, data-visualization
Drugs Recommendation Using Reviews
Analyzing the Drugs Descriptions, conditions, reviews and then recommending it using Deep Learning Models, for each Health Condition of a Patient.
Stars: ✭ 35 (-96.75%)
Mutual labels:  data-analysis, data-visualization

running_page

Create a personal running home page

简体中文 | English

GIF SHOW

running_page

Runner's Page Show

Runner page App
shaonianche https://run.duangfei.org Nike
yihong0618 https://yihong.run/running Nike
superleeyom https://running.leeyom.top Nike
geekplux https://activities.geekplux.com Nike
guanlan https://grun.vercel.app Strava
tuzimoe https://run.tuzi.moe Nike
ben_29 https://running.ben29.xyz Strava
kcllf https://running-tau.vercel.app Garmin-cn
mq https://running-iota.vercel.app Keep
zhaohongxuan https://running-page-psi.vercel.app Keep
yvetterowe https://run.haoluo.io Strava
love-exercise https://run.kai666666.top Keep
zstone12 https://running-page.zstone12.vercel.app Keep
Lax https://lax.github.io/running Keep
lusuzi https://running.lusuzi.vercel.app Nike
wh1994 https://run4life.fun Garmin
liuyihui https://run.foolishfox.cn Keep
FrankSun https://hi-franksun.github.io/running_page Nike
AhianZhang https://running.ahianzhang.com Keep
L1cardo https://run.licardo.cn Nike
luckylele666 https://0000928.xyz Strava

How it works

image

Features

  1. GitHub Actions manages automatic synchronization of runs and generation of new pages.
  2. Gatsby-generated static pages, fast
  3. Support for Vercel (recommended) and GitHub Pages automated deployment
  4. React Hooks
  5. Mapbox for map display
  6. Supports most sports apps such as nike strava...

automatically backup gpx data for easy backup and uploading to other software.

Support

Download

Clone or fork the repo.

git clone https://github.com/yihong0618/running_page.git

Installation and testing

pip3 install -r requirements.txt
yarn install
yarn develop

Open your browser and visit http://localhost:8000/

Local sync data

Modifying Mapbox token in src/utils/const.js

If you use English please change IS_CHINESE = false in src/utils/const.js

Suggested changes to your own Mapbox token

const MAPBOX_TOKEN = 'pk.eyJ1IjoieWlob25nMDYxOCIsImEiOiJja2J3M28xbG4wYzl0MzJxZm0ya2Fua2p2In0.PNKfkeQwYuyGOTT_x9BJ4Q';

Custom your page

avatar

Modify export const AVATAR = 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQTtc69JxHNcmN1ETpMUX4dozAgAN6iPjWalQ&usqp=CAU'; Replace it with the link to the image you want.

NAVS

Change NAVS in src/utils/const.js to the link you want, just like:

export const NAVS = [
  { text: 'Blog', link: 'https://yihong.run/running' },
  { text: 'About', link: 'https://github.com/yihong0618/running_page/blob/master/README-CN.md' },
];

You can also add multiple links, just like the above.

Title and site link

Find gatsby-config.js in the repository directory, find the following content, and change it to what you want.

siteMetadata: {
  title: 'Running page',
  siteUrl: 'https://yihong.run',
  description: 'Personal site and blog',
},

Download your running data and do not forget to generate svg in total page.

GPX

Make your GPX data

Copy all your gpx files to GPX_OUT or new gpx files

python3(python) scripts/gpx_sync.py

Garmin

Get your Garmin data
python3(python) scripts/garmin_sync.py ${your email} ${your password}

example:

python3(python) scripts/garmin_sync.py example@gmail.com example

Garmin-CN(China)

Get your Garmin-CN data
python3(python) scripts/garmin_sync.py ${your email} ${your password} --is-cn

example:

python3(python) scripts/garmin_sync.py example@gmail.com example --is-cn

Runtastic(Adidas Run)

Get your Runtastic data
python3(python) scripts/runtastic_sync.py ${your email} ${your password}

example:

python3(python) scripts/runtastic_sync.py example@gmail.com example

Nike Run Club

Get your Nike Run Club data

Get Nike's refresh_token

  1. Login Nike website
  2. In Develop -> Application-> Storage -> https:unite.nike.com look for refresh_token

image

  1. Execute in the root directory:
python3(python) scripts/nike_sync.py ${nike refresh_token}

example:

python3(python) scripts/nike_sync.py eyJhbGciThiMTItNGIw******

example img

Strava

Get your Strava data
  1. Sign in/Sign up Strava account

  2. Open after successful Signin Strava Developers -> Create & Manage Your App

  3. Create My API Application: Enter the following information


My API Application Created successfully:


  1. Use the link below to request all permissions: Replace ${your_id} in the link with My API Application Client ID
https://www.strava.com/oauth/authorize?client_id=${your_id}&response_type=code&redirect_uri=http://localhost/exchange_token&approval_prompt=force&scope=read_all,profile:read_all,activity:read_all,profile:write,activity:write

get_all_permissions

  1. Get the code value in the link

example:

http://localhost/exchange_token?state=&code=1dab37edd9970971fb502c9efdd087f4f3471e6e&scope=read,activity:write,activity:read_all,profile:write,profile:read_all,read_all

code value:

1dab37edd9970971fb502c9efdd087f4f3471e6

get_code

  1. Use Client_idClient_secretCode get refresch_token: Execute in Terminal/iTerm
curl -X POST https://www.strava.com/oauth/token \
-F client_id=${Your Client ID} \
-F client_secret=${Your Client Secret} \
-F code=${Your Code} \
-F grant_type=authorization_code

example:

curl -X POST https://www.strava.com/oauth/token \
-F client_id=12345 \
-F client_secret=b21******d0bfb377998ed1ac3b0 \
-F code=d09******b58abface48003 \
-F grant_type=authorization_code

get_refresch_token

  1. Sync Strava data
python3(python) scripts/strava_sync.py ${client_id} ${client_secret} ${refresch_token}

References:
https://developers.strava.com/docs/getting-started
https://github.com/barrald/strava-uploader
https://github.com/strava/go.strava

Nike_to_Strava

Get your Nike Run Club data and upload to strava
  1. follow the nike and strava steps
  2. Execute in the root directory:
python3(python) scripts/nike_to_strava_sync.py ${nike_refresh_token} ${client_id} ${client_secret} ${strava_refresch_token} 

example:

python3(python) scripts/nike_to_strava_sync.py eyJhbGciThiMTItNGIw******  xxx xxx xxx

Total Data Analysis

Running data display
python scripts/gen_svg.py --from-db --title "${{ env.TITLE }}" --type github --athlete "${{ env.ATHLETE }}" --special-distance 10 --special-distance2 20 --special-color yellow --special-color2 red --output assets/github.svg --use-localtime --min-distance 0.5
python scripts/gen_svg.py --from-db --title "${{ env.TITLE_GRID }}" --type grid --athlete "${{ env.ATHLETE }}"  --output assets/grid.svg --min-distance 10.0 --special-color yellow --special-color2 red --special-distance 20 --special-distance2 40 --use-localtime

Generate year circular svg show

python3(python) scripts/gen_svg.py --from-db --type circular --use-localtime

For more display effects, see:
https://github.com/flopp/GpxTrackPoster

server(recommendation vercel)

Use vercel deploy
  1. vercel connects to your GitHub repo.

image 2. import repo


image

  1. Awaiting completion of deployment
  2. Visits
Deploy to GitHub Pages
  1. If you are using a custom domain for GitHub Pages, open .github/workflows/gh-pages.yml, change fqdn value to the domain name of your site.

  2. (Skip this step if you're NOT using a custom domain) Modify gatsby-config.js, change pathPrefix value to the root path. If the repository name is running_page, the value will be /running_page.

  3. Go to repository's Actions -> Workflows -> All Workflows, choose Publish GitHub Pages from the left panel, click Run workflow. Make sure the workflow runs without errors, and gh-pages branch is created.

  4. Go to repository's Settings -> GitHub Pages -> Source, choose Branch: gh-pages, click Save.

GitHub Actions

Modifying information in GitHub Actions

Actions source code The following steps need to be taken

  1. change to your app type and info

image Add your secret in repo Settings > Secrets (add only the ones you need).


image My secret is as follows


image 3. add your GitHub secret and have the same name as the GitHub secret in your project.


image

TODO

  • [x] Complete this document.
  • [x] Support Garmin, Garmin China
  • [x] support for nike+strava
  • [x] Support English
  • [x] Refine the code
  • [x] add new features
  • [ ] support the world map
  • [ ] support multiple types, like hiking, biking~

Contribution

  • Any Issues PR welcome.
  • You can PR share your Running page in README I will merge it.

Before submitting PR:

  • Format Python code with Black

Special thanks

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].