Coder Social home page Coder Social logo

oatzcharts's Introduction

Charts for Stats of OATZ Rocket League Tuesdays

OATS Rocket League

OATS Rocket League - All data

Github Pages

Requirements

  1. Linux OS or WSL to access bash commands like sed, cat, echo, ...

  2. bash-package jq

    sudo apt install jq
  3. Microsoft Excel for Proof of Concept Graphics

Development

  1. load requirements of oatz-charts and dev-server project

    # from ./oatz-charts
    npm install
    # and
    # from ./dev-server
    npm install
  2. start dev-server

    # from ./dev-server
    npm run run
    #or from ./oatz-charts
    npm run dev-server
  3. start react in ./oatz-charts

    npm run start
    #or
    yarn start

Note: see ./dev-server/ReadMe.md on details of served json files, if dev-server is not available, will use offline data from ./oatz-charts/src/lib/data.json

Deployment

powershell .\deploy.ps1

Note: returns Everything up-to-date in case the build does not contain any changes

Note: script was created using guideline Gist cobyism/gh-pages-deploy.md with replacing bash's && with ; if ($?) {...} as pointed out at this stackoverflow response. Also note that -and is not a valid replacement for && and that && should be supported by Powershell v7+ according to that stackoverflow response.

Note: Call Powershell scripts from Windows Command Prompt either with powershell .\script.ps1 (see response at stackoverflow) or PowerShell -File .\script.ps1 (see petri.com - How to Write and Run a PowerShell Script File on Windows 11)

Troubleshooting

initially had to fix gh-pages branch with guideline from stephenlee.info - Force Push a Git Subtree as gh-pages branch was previously maintained with committing manual copies of build directory content, leading to non-mergeable scenario for git subtree push with

# push build-dir content into new local `gh-pages` branch
git subtree split --prefix oatz-charts/build -b gh-pages
# force push the local gh-pages branch over the remote one
git push -f origin gh-pages:gh-pages
# delete the local gh-pages branch
git branch -D gh-pages

Create Graphics

  1. get all JSON data from OATS Rocket League API

    curl https://www.oatz.net/rocketleague/api/all | jq "." > ./oatz-charts/src/lib/data.json
  2. create Excel-importable csv table from data.json

    bash json2csv.sh

    creates

    • data.csv extracted stats in tabular format: date | username | ...stats
    • data_ger.csv for opening with German MS Excel (',' comma)
  3. open data.csv in Excel and copy data into first Tab of data.xslx (+ extend first column in this tab to the new table size)

Proof of Concept

17.8.2021

Spider-Charts 17.8.2021

27.7.2021

Spider-Charts 27.7.2021

dev-server

run dev server on each npm start, see stackoverflow

npm --prefix /path/to/project run build

oatzcharts's People

Contributors

mjhalwa avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.