FPLController module
Source file that holds the controller of the application. All the logic of the application and the use of the GUI elements lies here.
- Classes in the source file:
Controller(): Class that holds all the logic of the application and the manipulation of the GUI elementsthat the
FPLViewersource file holds.
- class FPLController.Controller(main_window)
Bases:
objectClass that holds all the logic of the application and the manipulation of the GUI elements that the
FPLViewersource file holds.- calculate_best_15_players()
Calculate and display the best 15 players selection based on the criteria selected by the user.
- display_most_valuable_position()
Display a table view with the most valuable positions.
- display_most_valuable_teams()
Display a table view with the most valuable teams.
- display_sorted_statistics()
Sort the table view with the player statistics.
- get_fpl_database_in_json()
Get the FPL database.
- load_database_from_file()
Load Offline the FPL data from a JSON file selected by the user.
- process_data()
Extract the parts that we want to keep from the downloaded data and process them.
- save_database_to_file()
Save the downloaded FPL data to a JSON in a selected directory by the user.
- save_df_for_view_to_csv()
Save the table view dataframe to a CSV in a selected directory by the user.
- save_useful_player_attributes_df_to_csv()
Save the useful player attributes dataframe to a CSV in a selected directory by the user.
- show_player_statistics()
Create a table view with the player statistics.