Unique Collection/Table Display with SQLite3 Editor

Codeimage

The image stored in this database is sent to the frontend. The frontend uses the data to create a song “box” for each unique song, each with it’s own properties defined by the database.

Table Initialization and Test Data Creation

Codeimage

I initialize the database (the image above) by first defining different parameters of each song, defining the id, name, url, etc. of the song, and then I actually intialize the database by assigning each column of the database to a variable so that I can actually use it later in the code.

List Extracted from Database as Python Objects

codeimage

After I set an endpoint in debugger to where the code returns all song data in JSON format, so we can see that the database is correctly setup and that the information is actually being used.

Example Dictionaries

Codeimage Song Database with unique attributes to be used in frontend to create unique song boxes. Codeimage Game database with a unique points system, that updates whenever the user wins a game of any game in our catalog.

Python API Code for Request and Response Handling

Codeimage

In the get request, the code identifies if there is an ID provided. If there is, the code will retrieve the song with that ID from the database and returns its details as JSON.

URL Request and Body Requirements in Postman

Codeimage

The get request is working, and all songs and data stored in database can be correctly retrieved in JSON format to be utilized by frontend.

JSON response data for 200 success conditions on GET, POST, and UPDATE methods, and JSON response for error for 404 when providing an unknown user ID to an UPDATE request.

Codeimage

For our delete function, which allows the user to delete a song from the database, two messages will be sent out, a 200 message for successful deletion, and a 404 error if the song that is trying to be deleted is not found.

Demo of Obtaining an Array of JSON Objects in Chrome Browser

Codeimage

Data is correctly fetched from backend. If backend was not running or broken, there would be no music boxes on the screen.

JavaScript Code for Fetching and Handling Data

Codeimage

Code fetches from the backend and gets specific song data. With success, the code will use the createItemBlock function to create a visual block for the song using the information provided, and display that block on the website. The code will give an “error fetchign data” error message if there is an error encountered.

Understanding Linear Regression Algorithms

Many different datapoints with multiple parameters not limited to x,y,z are plotted on a 3-D graph using computer algorithms. Then, a regression line is plotted. Decisions are usually made where a new point inputted by the user is plotted on the graph. Different sides of the regression line can decide what the outcome is. The regression line is somewhat of a cutoff, or a line that separates different outcomes.

Understanding Decision Tree Analysis Algorithms

The algorithm consists of many nodes and branches, where each node is a feature, and each branch is the outcome of that decision, which decides the next node. Tree starts at the top. Different criteria/rules of each node will change the next node, which will eventually change the answer..