User:Erwin Madelung/Scripts to generate ship stat plots

From EVE University Wiki
< User:Erwin Madelung
Revision as of 10:01, 13 August 2022 by Erwin Madelung (talk | contribs) (Created page with "I created a number of plots to visualize ship stats. You can see some on the cruisers page for example. Here, I share the code for the scripts to generate them so that peo...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

I created a number of plots to visualize ship stats. You can see some on the cruisers page for example. Here, I share the code for the scripts to generate them so that people can easily update them when ship stats are changed. You are free to use the code as you like. Be aware that it's not especially great code but just meant to get the job done. Any input for improvements is welcome on the talk page. Please do not edit this page.

The scipts are written in python. The data is pulled from CCP through the ESI API by using EsiPy. I then use pandas' dataframe as a datatype to store the data. I save the dataframe in a file so that I don't have to pull the data from CCP everytime I want to make a plot. The plots are mostly done with seaborn.

I created a csv table of 'normal' ship hulls with my own defined subgroups named "eve_ships_list.csv". I felt this was necessary as the ship groups and meta levels are not well maintained in CCP's database. So I manually created this list:

The following script named "import_data_from_ESI.py" pulls the data from CCP and saves it to the file "eve_ships.pkl" in the same folder. This is a dataformat by pandas to store dataframes.

The scripts for the plots themselves are each for one hull class:

The following rather compares ship classes and doesn't color by faction but by meta group. The plots are currently not here on the wiki but I add the code in case one finds a place for them: