Collections:
From VSCode using SQLite3 Editor, show your unique collection/table in database, display rows and columns in the table of the SQLite database. This table displays a list of all the tournaments a user saves.
From VSCode model, show your unique code that was created to initialize table and create test data. This code initializes a table with the columns uid, id, and tournament name, the test values are passed with the tournament name of clash 1 and clash 2. It creates a relationship between the user id to the tournament name.
Lists and Dictionaries
In VSCode using Debugger, show a list as extracted from database as Python objects. When I step through the debugger it starts here where the tournament list is being extracted as a python json object.
In VSCode use Debugger and list, show two distinct example examples of dictionaries, show Keys/Values using debugger. This shows two dictionaries of the data with attributes like uid and tournament name.
APIs and JSON:
In VSCode, show Python API code definition for request and response using GET, POST, UPDATE methods. Discuss algorithmic condition used to direct request to appropriate Python method based on request method.
This code snippet shows a part of a web API for managing “tours” within a system. The post method adds a new tour with an ID and name to a database when called. The get method retrieves all tours from the database and formats them into a JSON response.
In VSCode, show algorithmic conditions used to validate data on a POST condition. These are the parameters required to make a user as there is a minimum characters on the username and password.
In Postman, show URL request and Body requirements for GET, POST, and UPDATE methods.
In Postman, show the JSON response data for 200 success conditions on GET, POST, and UPDATE methods.
In Postman, show the JSON response for error for 400 when missing body on a POST request.
In Postman, show the JSON response for error for 404 when providing an unknown user ID to a UPDATE request.
Postman is used to test API requests between a user and the backend. Based on what data is being ran with POST, GET, UPDATE, or DELETE, different errors or success will occur.
Frontend:
In Chrome inspect, show response of JSON objects from fetch of GET, POST, and UPDATE methods. This response happens when the user searches for a tournament. Based on the name a GET request will be sent to a clash royale API that will send back JSON objects matching what the user wants. In the Chrome browser, show a demo (GET) of obtaining an Array of JSON objects that are formatted into the browsers screen. I will demo getting the leaderboard data from the clash royale API An array of json objects that has information on different tournaments is obtained using a GET request to a clash royale API. This information is formatted into a table so a user can see it.
In JavaScript code, describe fetch and method that obtained the Array of JSON objects. This code fetches JSON data from the clash royale API so it can be through interactions in order to be displayed.
In JavaScript code, show code that performs iteration and formatting of data into HTML. This code loops through the array of JSON objects and displays them in an HTML table based on what the data is representing. For example players, name duration, and rewards.
In the Chrome browser, show a demo (POST or UPDATE) gathering and sending input and receiving a response that show update. Repeat this demo showing both success and failure.
I will demo searching the leaderboard without the backend running for failure and a demo for success. Without the backend running the requests can’t be sent causing errors.
In JavaScript code, show and describe code that handles success. Describe how code shows success to the user in the Chrome Browser screen. Upon success, a table with information will be displayed, and if data is saved it will be sent to the backend database. 200 code in terminal/console.
In JavaScript code, show and describe code that handles failure. Describe how the code shows failure to the user in the Chrome Browser screen. This code does error handling notifying the user when an error occurs and in console outputs wether the code(400,403,404,500)
Extras:
Show algorithms and preparation of data for analysis. This includes cleaning, encoding, and one-hot encoding. When an instance of the datamodel class is created, it tries to load a machine learning model from a file using Python’s pickle module; if the model file isn’t found or isn’t a logistic regression model, it initializes a new logistic regression model. It also reads data from a CSV file into a pandas DataFrame. The class includes methods to display the head of the data, preprocess the data.
Show algorithms and preparation for predictions. The preprocess_data method prepares the data for modeling by setting certain columns as features and a target variable. The train_model method invokes data preprocessing and then presumably trains the logistic regression model. The predict method uses the trained model to make predictions given new input data, and there are also methods to add new data to the existing dataset (add_data) and retrieve the current dataset (get_data).
Discuss concepts and understanding of Linear Regression algorithms.
Linear regression is a statistical method used to model the relationship between a dependent variable and one or more independent variables by fitting a linear equation to observed data. The main goal is to find a straight line that best predicts the dependent variable based on the values of the independent variables. Discuss concepts and understanding of Decision Tree analysis algorithms.
Decision tree analysis is a machine learning method that models decisions and their possible consequences as a tree-like structure, where each branch represents a choice between alternatives. The algorithm splits the data into branches at decision nodes, based on feature values that lead to the most distinct subsets, aiming to classify or predict the outcome accurately.
Summary: My feature uses API requests from clash royales database to display data the user wants, tournaments/challanges, and a user can save a tornament and it will be stored in my own database under the users account.