Pokemon Stats Review Shiny Application RPresentation

Paolo G. Hilado | Github UserName: Dcroix
January 26, 2018

Background

Hi! I feel ecstatic to share with you this application I have made via RStudio and Shiny. The app is named Pokemon Stats Review. As the name states, this is expected to help out people who are into online Pokemon competitive battles. It lets pokemon trainers compare all the existing pokemon released from its very first title, Generation One, to its latest release which is Generation Seven. Here is what the app delivers:

  • Create Boxplots to compare Pokemon Stats for each Attribute (e.g. Attack,Defense, Speed and etc.) when grouped by their Main Type (e.g. Psychic, Dark, Grass and etc.).
  • Generate tables that contain the names of the Pokemon for the selected type and ranked from highest to lowest based on the attribute chosen.

How to Use & Details on Outputs

  • First view, the application processes a boxplot comparing Total Attributes across pokemon types. Clicking on the radiobutton will compare pokemon types for your chosen Attribute. Example, you want to compare which pokemon type would be great in terms of Speed. Click the radiobutton for Speed and the corresponding boxplot will be processed. Boxplots color fills are consistent to their Pokemon type (e.g. orchid4 for Psychic, goldenrod2 for dragon and etc.). They are also interactive so when hovering the cursor on it, the min, median and the max statistics for each pokemon type given the selected attribute will be shown.
  • Tables are reactive, Inputs will subset the data into the chosen Pokemon type and Attribute. Depending on the type and attribute selected, a table is generated showing the best pokemon. Example, using the boxplots you get to know that Psychic are great in terms of Special Attacks with a max of 194. You can then generate a table by selecting Type Psychic and clicking on the Special Attack Attribute. The table will inform users that Mega Mewtwo will be the best pokemon to use if you wish to build a mono Psychic team with focus on Special Attacks. The slider also adjusts the number of pokemon shown.

Behind the Functionality

The application gets inputs via the radiobuttons, selectInput, checkboxInput and sliderInput which are all embedded on the user interface. The process of generating the tables is reactive. The data is subset depending on the selected type and then ranked from highest to lowest. The output is displayed via renderTable function and is displayed given certain conditions depending on the chosen attribute of the user. The boxplots are generated via plotly and the output is displayed via the renderPlotly function. The boxplots being generated by the application depends on the chosen attribute of the user. Besides creating the boxplots, plotly also processes the data to determine the minimum, 1st quartile, median, 3rd quartile and maximum values. Both outputs (calculations), tables and boxplots, derived by running the codes are presented on the main panel of the user interface. To see more of the codes, I have uploaded them to my github as instructed by our professors. Here is the link: https://github.com/Dcroix/PokeStatsReview

Code for the Boxplots

As instructed in this project, here a code is ran to generate a sample boxplot. Considering that Rpresentation doesn't run like Shiny, there is a slight modification in the said code (particularly in the inputs) and had to use ggplot instead of plotly.If you want to see the codes, refer to the link previously given.

plot of chunk unnamed-chunk-1