Get and graph smogon stats project

Hi. I'm pileoflemons.

https://github.com/PileOfLemons/PileOfLemons-graphs

This is just me sharing a little python project I made and wanted to show it off. It doesn't do anything too fancy.
It prompts for a date range. a format. and a ranking. goes and gets the usage, leads, and moveset json files from Smogon.com/stats/ for the stuff that involves those inputs.

Then pretties them up a bit taking them from the easy to read but hard to parse formatted versions into just simple json files. I even combine the three files into one to make it easier to use later. It then does this for every month.

Last thing it does is graph them simply. It just takes the usage_perc value from those files for each month. and graphs the pokemon and usage percentage per month so you can see who the top pokemon were used for each month. And it gathers a whole years worth of graphs and puts them on one page and displays that. It will display all the graphs but can also save them into a jpg if you tell it to.

It also just grabs a list of every pokemon that was involved in the graphs at all and displays that with the amount of times it was ranked in the top 10. This was included so people can have an easy to grab way to see who all the pokemon were in case they wanted extra analysis or write about them without having to look at every graph.

I will keep updating and making it better. I will take any suggestions, requests or problems here or on discord at pileoflemons.

I'm not sure if this is anything anybody will be interested in. But it should work for most any format/ranking and time period. It's very flimsy so if its not doing what you want it to do thats kind of expected. let me know and ill try to fix or explain it

Top10_Pokemon_Year2015_Page1.jpg
 
I will be putting suggestions and stuff here for me to keep open and so I don't lose it.


Replay kill thing.
Take a replay and announce which pokemon got which kills and amount of kills.

Edge cases.
Death by hazards goes to hazard setter. Unless the pokemon was phased into it then it goes to the phaser.
Revival Blessing. A Mon that is ressurected by this should not be counted as two kills if it's K.O'd twice. For that, its death, and the kill given on the killing Pokémon, should be removed whenever a Pokémon is revived like this.

If a Pokémon dies from a self destructing move, the kill should be given on the Pokémon that got targeted (neutral, super effective, immune, protected, don't really care) by the move.
 
Last edited:

RoiDadadou

Nothing less... from a king.
is a Pre-Contributor
Hi. I'm pileoflemons.

https://github.com/PileOfLemons/PileOfLemons-graphs

This is just me sharing a little python project I made and wanted to show it off. It doesn't do anything too fancy.
It prompts for a date range. a format. and a ranking. goes and gets the usage, leads, and moveset json files from Smogon.com/stats/ for the stuff that involves those inputs.

Then pretties them up a bit taking them from the easy to read but hard to parse formatted versions into just simple json files. I even combine the three files into one to make it easier to use later. It then does this for every month.

Last thing it does is graph them simply. It just takes the usage_perc value from those files for each month. and graphs the pokemon and usage percentage per month so you can see who the top pokemon were used for each month. And it gathers a whole years worth of graphs and puts them on one page and displays that. It will display all the graphs but can also save them into a jpg if you tell it to.

It also just grabs a list of every pokemon that was involved in the graphs at all and displays that with the amount of times it was ranked in the top 10. This was included so people can have an easy to grab way to see who all the pokemon were in case they wanted extra analysis or write about them without having to look at every graph.

I will keep updating and making it better. I will take any suggestions, requests or problems here or on discord at pileoflemons.

I'm not sure if this is anything anybody will be interested in. But it should work for most any format/ranking and time period. It's very flimsy so if its not doing what you want it to do thats kind of expected. let me know and ill try to fix or explain it

View attachment 625055
I think it can be quite cool to have a quick way of accessing this data, for example as a showcase in newer Gen of meta tendencies once DLC and all stabilizes, for newer players. Just work a bit on the overall esthetic, maybe with some automatic spriting I don't really know, but can definitely be interesting. As a captain in teamtours, I know it could helper newer folks acclimate to a tier seeing the usages of the last months/years or so.

A nice contribution in meta visualization and graphics, I for one can only ask you to go further and beyond, and make it a dream tool, keep it up ! :swole::boi::blobthumbsup:
 
I think it can be quite cool to have a quick way of accessing this data, for example as a showcase in newer Gen of meta tendencies once DLC and all stabilizes, for newer players. Just work a bit on the overall esthetic, maybe with some automatic spriting I don't really know, but can definitely be interesting. As a captain in teamtours, I know it could helper newer folks acclimate to a tier seeing the usages of the last months/years or so.

A nice contribution in meta visualization and graphics, I for one can only ask you to go further and beyond, and make it a dream tool, keep it up ! :swole::boi::blobthumbsup:
Thank you so much. This encouragement means a lot. I am already on the spriting right now. I am downloading all the sprites and assigning them a color palette so that the graphs can have consistent colors instead of being assigned randomly. So soon I will have the sprites on the graph, probably above the bar. or in a legend or something. However I can get it to look good and be consistent. I thought I had responded when you posted this but I got excited and started working on the sprites.

Then my next plan is to add more graphs/visualizations. If you or anybody can think of graphs that would be interesting to see/have let me know.
Easy ones I have thought of will be more specific to individual pokemon. Like tracking a pokemon's usage stat across months/years. And then also tracking move/spread/item usage as well for that pokemon to get it easy to visualize.

Helping with team tours and tournaments is my original goal here so any things you can think of that would be helpful for new/older players would be great.

Other projects I've worked on is replay scrapers and then making those pretty and doing stats on that. But that would be more involved but not the worst. You could put in a format and this will go try to find every replay it can and get them.

The stats folder doesn't tell me movesets. Like it tells me stats about individual moves but not moves that are used together. I can only get that info from replays.

And another idea I have had is to make a type of damage calculator, but still based off these stats so when you pick an opponent pokemon in a format it will calculate the 5 most likely spreads of ability/evs and calculate the damage against that. So you could quickly see if there are meta sets on a pokemon that you can/cannot handle.

Edit. Getting the sprites is going well. I am making a version of the website pokemonpalette.com in python so I can save good color codes for every pokemon. Working on getting sprites for all the different forms of pokemon.
 
Last edited:

RoiDadadou

Nothing less... from a king.
is a Pre-Contributor
Thank you so much. This encouragement means a lot. I am already on the spriting right now. I am downloading all the sprites and assigning them a color palette so that the graphs can have consistent colors instead of being assigned randomly. So soon I will have the sprites on the graph, probably above the bar. or in a legend or something. However I can get it to look good and be consistent. I thought I had responded when you posted this but I got excited and started working on the sprites.

Then my next plan is to add more graphs/visualizations. If you or anybody can think of graphs that would be interesting to see/have let me know.
Easy ones I have thought of will be more specific to individual pokemon. Like tracking a pokemon's usage stat across months/years. And then also tracking move/spread/item usage as well for that pokemon to get it easy to visualize.

Helping with team tours and tournaments is my original goal here so any things you can think of that would be helpful for new/older players would be great.

Other projects I've worked on is replay scrapers and then making those pretty and doing stats on that. But that would be more involved but not the worst. You could put in a format and this will go try to find every replay it can and get them.

The stats folder doesn't tell me movesets. Like it tells me stats about individual moves but not moves that are used together. I can only get that info from replays.

And another idea I have had is to make a type of damage calculator, but still based off these stats so when you pick an opponent pokemon in a format it will calculate the 5 most likely spreads of ability/evs and calculate the damage against that. So you could quickly see if there are meta sets on a pokemon that you can/cannot handle.
Haha, good mentality.
The usage of a single Mon, or its item/Tera could be cool for example, a nice one if you can pull it out, and especially if it's in a nice graph, with visual tips. I'll tag Alkione Wait2Seconds Le Don and Uxilon if they have any stat/utility that comes to mind, as we're all deep into prep for tournaments sometimes, so maybe they'll have an input that I don't currently have writing this.

Something that I think could help in tour orga (I know this would help me at least, and a few), would be a very small tool where you enter the replay, and it indicates which Pokémon got KO'd on each side, and how many KOs one Mon dealt. I'd have more specificities, but don't know yet if that'd be an interesting thing for you.

The calc idea would be cool, but looks a bit fuzzy rn, at least to me, so I'd wait to make better progress on the rest.

Very cool mindset as a whole tho :blobthumbsup:
 
Last edited:
Haha, good mentality.
The usage of a single Mon, or its item/Tera could be cool for example, a nice one if you can pull it out, and especially if it's in a nice graph, with visual tips. I'll tag Alkione Wait2Seconds Le Don and Uxilon if they have any stat/utility that comes to mind, as we're all deep into prep for tournaments sometimes, so maybe they'll have an input that I don't currently have writing this.

Something that I think could help in tour orga (I know this would help me at least, and a few), would be a very small tool where you enter the replay, and it indicates which Pokémon got KO'd on each side, and how many KOs one Mon dealt. I'd have more specificities, but don't know yet if that'd be an interesting thing for you.

The calc idea would be cool, but looks a bit fuzzy rn, at least to me, so I'd wait to make better progress on the rest.

Very cool mindset as a whole tho :blobthumbsup:
that replay thing I think wouldn't take to long. Especially if its a tool where you put the replay in yourself. Ill get on that after I get these sprites all done. And this is interesting to me so as many specificities as you have would be great. I'm interested kind of in anything.
 

RoiDadadou

Nothing less... from a king.
is a Pre-Contributor
that replay thing I think wouldn't take to long. Especially if its a tool where you put the replay in yourself. Ill get on that after I get these sprites all done. And this is interesting to me so as many specificities as you have would be great. I'm interested kind of in anything.
Regarding the count of 'kills', I'd probably count the last Mon that dealt damage to the Pokémon being KO'd, or the setter if it's an entry hazard. If a Mon dies from a self inflicted status, then the kill is given to the last Mon it was facing before dying.
 
Regarding the count of 'kills', I'd probably count the last Mon that dealt damage to the Pokémon being KO'd, or the setter if it's an entry hazard. If a Mon dies from a self inflicted status, then the kill is given to the last Mon it was facing before dying.
Does an entry setter get the kill if the pokemon was roared into the hazards?
 
I'd say the Roar user gets it.
okay. That makes sense. If i come up with more edge cases ill ask.

What would be helpful is a big stack of replays to look through. From as many different formats and gens as you can think of. So i can like make sure I catch everything and don't miss because I've like only dealt with gen3ou i forgot about stealth rocks being a thing.

And if you have a list of any way you can think a pokemon can faint especially the weird ones.

I do not play much comp pokemon like at all so I don't know all the things.
 

RoiDadadou

Nothing less... from a king.
is a Pre-Contributor
okay. That makes sense. If i come up with more edge cases ill ask.

What would be helpful is a big stack of replays to look through. From as many different formats and gens as you can think of. So i can like make sure I catch everything and don't miss because I've like only dealt with gen3ou i forgot about stealth rocks being a thing.

And if you have a list of any way you can think a pokemon can faint especially the weird ones.

I do not play much comp pokemon like at all so I don't know all the things.
I'd recommend checking the SPL replays, you'll have all Gens to study there, and a lot of interactions.


As for two particular thing:

Revival Blessing: A Pokémon that is ressurected by this should not be counted as two kills if it's K.O'd twice. For that, its death, and the kill given on the killing Pokémon, should be removed whenever a Pokémon is revived like this.

If a Pokémon dies from a self destructing move, the kill should be given on the Pokémon that got targeted (neutral, super effective, immune, protected, don't really care) by the move.
 
I'd recommend checking the SPL replays, you'll have all Gens to study there, and a lot of interactions.


As for two particular thing:

Revival Blessing: A Pokémon that is ressurected by this should not be counted as two kills if it's K.O'd twice. For that, its death, and the kill given on the killing Pokémon, should be removed whenever a Pokémon is revived like this.

If a Pokémon dies from a self destructing move, the kill should be given on the Pokémon that got targeted (neutral, super effective, immune, protected, don't really care) by the move.
If you can send me a link to a spreadsheet or forum that has lists of spl replays that would be excellent. I'll look around in a bit but im never sure where to start.
 

RoiDadadou

Nothing less... from a king.
is a Pre-Contributor
If you can send me a link to a spreadsheet or forum that has lists of spl replays that would be excellent. I'll look around in a bit but im never sure where to start.
OST, OSDT and SPL.

Replays are in the threads.

Rule of thumbs should be: there's always the same number of deaths on side A than kills on side B, and reciprocally. That should help you check for some anomalies.
 
OST, OSDT and SPL.

Replays are in the threads.

Rule of thumbs should be: there's always the same number of deaths on side A than kills on side B, and reciprocally. That should help you check for some anomalies.
I am downloading spl 15 rn and will start work on this later today or tomorrow. I have got all the sprites and colors I want for the graph thing so next step is to try and put those colors and sprites onto the graphs then update that exe on my github.

Then ill work on this replay thing
 

Users Who Are Viewing This Thread (Users: 1, Guests: 0)

Top