Pokedex - Shiny Contest Submission


Authors: Mateo Graciano

Abstract: A pokedex with some extra data!

If you are a pokemon fan you have to try this out! Select the pokemon that you want to see and explore some stats! Navigate through different visualizations using the row control.

Full Description: I build this app with 6 purposes:

  1. Make a great front: I wanted to learn a bit of css. I have used shiny for several years but i ve never used css before!
  2. Make something with JavaScript
  3. Create a computer vision model using transfer learning
  4. Serve a model with cloud run (google free tier for 90 days)... to be honest, I did this because the free tier in shinyapps did not allowed me to deploy the app because it consumed so much memory creating the python env... At the end this part was pretty useful to my understanding of serverless so it was a great problem to solve.
  5. Make use of shiny modules. I knew how the shiny modules worked but I haven't use them until I started this app.
  6. Have fun building the app!

The app has the following visualizations:


Here we have the basic stats of the selected pokemon or we can upload an image (You can try any of the images from the test set: pokemon - Google Drive ):

Then we can click the button to make a guess about who is in the picture:

The first run of the API might be to slow but then all the trials run pretty fast:

In this case we found out that Pikachu was in the image.

This model was made using transfer learning, if you want to run the model you can see the jupyter notebook in shinypoke/tf at main · magralo/shinypoke · GitHub. i run the model only for my 20 favourite pokemons because i trained the model in my machine.

The validation accuracy is pretty high but i see that when the models fails is because of it gets confused because of similar colors... in a new iteration i would generate the images with random changes on the colors!

Evolution Chain

Find out what you should expect of a pokemon evolution

For example you should expect a better attack but not a fast pokemon if you get a Gyarados

Poke 5-mean

Here you will make 5 clusters using the selected features, then you will see a projection of the 2 main PCA components of every pokemon:


Choose your opponent and see how good (or bad) would be a fight against that pokemon:

Aditional comments

Please feel free to contact me if you have any feedback or new ideas o for this app, I did this thinking about the contest but I want to make a better app in the following months.

Keywords: pokemon, css, javascript
Shiny app: http://mateodii.shinyapps.io/shinypoke
Repo: GitHub - magralo/shinypoke
RStudio Cloud: Posit Cloud

If you run the app in rstudio cloud just type shiny::runApp('shinypoke') in the console. I have encountered some difficulty creating the python virtual env, if you have trouble because of that go to the global file and run the last lines by yourself.



Full image: