Submission for the Riot April 2016 api challenge, the Riot2016Submission
branch is for you while the master branch will be our on going effect to improve this website.
This is our submission for the April 2016 api challenge! We wanted to make an app that helps the community, no matter a player’s rank. We love playing around counters during champion select, so we created a tool to help us determine the best champion in our arsenal to pick.
Lol Personal Counters is a website that determines both popular and personal win rates. With this information, it helps you figure out which champion you already play (and do well with), that you should pick to counter your lane opponent. The website is simple to use and understand but provides huge insight! There are other sites that determine counter matchups, but none of these sites restrict their lists to champions we actively play. For example, if you don't own Karthus, it’s not helpful for you to find out that he is the best counter to Katarina. With our site however, a champion you do own, like Orianna, is a logical counter to show.
The biggest hurdle for this api challenge, from a technical standpoint, was to combine personal win rates of champion matchups (and getting enough data for it!) with third party website win rates. After creating the website, we were a little disappointed about champion diversity (there are a few champions who are played most often). We decided to keep personal win rates and third party win rates separate because we didn’t have a good algorithm to properly weigh both win rates. When we continue this project, we would rate personal win rates higher than third party ones. Third party win rates are biased because they are so heavily weighted by platinum+ player performance, which not everyone in the community can live up to.
In conclusion, we would like to thank Riot for giving us the opportunity to show off our skills and give back to the community we love. Thanks!
- Proper loading page when users first check a matchup. Please be patient!! We are getting your rank stats! (little hack is to just refresh the page after a few second and the win rates will be determined in the background)
- Proper algorithm to combine personal win rates and third party win rates
- Install golang by following these steps exaclty on the golang website
- Ensure you have
$GOPATH
environment variable and that you can rungo
andgo get
from the command line. - Run
mkdir -p $GOPATH/src/github.com/yawhide
to setup the workspace - Clone the git repo by running
git clone https://github.com/yawhide/Lol-personal-counters.git %GOPATH/src/github.com/yawhide/Lol-personal-counters
(must be inside the%GOPATH/src/github.com/yawhide/Lol-personal-counters
directory) and ensure you are on theRiot2016Submission
branch - Install postgres 9.5
- Please leave the port on 5432
- On windows you can download this installer, ensure you choose v9.5
- On ubuntu, you can follow this guide to setup postgres9.5: guide
- On mac, you can download Postgres.app
- Ensure postgres is running
- Run
psql
on the command line and it should start the command line version of postgres - Run
\du
and find out which role has superuser - Copy the config.json.sample to config.json and edit the file
- Add the postgres
superuser
username/password into the config.json under thepostgres
key - Add the riot api key and the champion.gg api key (the champion.gg api key will be provided in the notes on the application)
- cd to
%GOPATH/src/github.com/yawhide/Lol-personal-counters
and rungo get github.com/tools/godep
- Run
$GOPATH\bin\godep restore
- If you get an error talking about "error downloading dep (launchpad.net/go-xdg): exec "brz" blah blah blah
- run
go get -u -insecure github.com/yawhide/go-lol
- run
- Run
go run main.go api.go analytics.go
from the github root folder - If all goes well, the application starts with no errors, you should see
Server started
and you can navigate tolocalhost:8080
- Hit
ctrl-c
orcmd-c
to stop the server - Navigate to
scripts/
inside the github folder and rungo run data.go api.go analytics.go
- If you see a bunch of urls hitting champion.gg, that is good. We are getting the latest win rates for the current patch. wait until its done (it should exit)
- Now we are ready to go! run
cd ..
to go back to the root directory and rungo install .
- Now finally run
$GOPATH/bin/Lol-personal-counters
and navigate tolocalhost:8080
. Please play around and enjoy the app! - If you experience any issues, please email me us at
[email protected]
or write down an app note on my application. Thanks!
If you are getting an error talking about some brz
command, try installing bazaar and adding it to your path
You may need to manually go get
these to make the app work, please run go get
then enter the github link below
- github.com/tools/godep
- github.com/spf13/viper
- gopkg.in/pg.v4
- github.com/yawhide/go-lol
"pg_ctl" -D datafolderpath -l log\logfile start
sudo -i -u postgres