Collections - Total ___ / 3, Grade __/1
- Blog Python Model code and SQLite Database.
Stated with sleep.csv file and then created initialization and SQL schema. Used Python model code to send the SQL sleep data into frontend. Each user has inputs for duration of sleep, quality of sleep, or any sleep disorders.
- From VSCode using SQLite3 Editor, show your unique collection/table in database, display rows and columns in the table of the SQLite database.
Displays the schema for the sleep.csv table with the columns for different categories like heart rate or hours of sleep gotten.
- From VSCode model, show your unique code that was created to initialize table and create test data.
Defines the init_sleep function that initializes the database. The db.create.all funciton helps create the SQL table if it doesn’t exist already. There is tester data underneath, and the code under it initializes the data to populate the table. We can run migrate.sh to run the code that creates the table.
Lists and Dictionaries Displays code to initalize the sleep.db database. Uses a couple lines of example code and defines each of the columns that should be created as part of the schema.
Lists and Dictionaries - Total __/3, Grade __/1
- Blog Python API code and use of List and Dictionaries.
Creates the API endpoint that calls to the fitness ML. predicted_calories was defined in the model code for fitness, and when main.py is run, the person inputs the BPM, intensity, and duration in order to get a predicted number of calories burnt.
- In VSCode using Debugger, show a list as extracted from database as Python objects.
- In VSCode use Debugger and list, show two distinct example examples of dictionaries, show Keys/Values using debugger. APIs and JSON The first one is an example with the sleep data, which gets all the SQL data related to sleep. By adding a breakpoint there, we can see the query that gets all the data and the post function that requests the json data.
APIs and JSON - Total __/7, Grade __/1
-
Blog Python API code and use of Postman to request and respond with JSON. The python code creates an ednpoint that requires a input from the body for BPM, Duration, and Intensity.
-
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. The POST function requires all the necessary parts of the body to be present, like gender, BPM, or etc. Similarly, this is also implemented in teh fitness code, where BPM, Duration, and Intensity all have to be inputted in order for the predict_calories funciton to work.
- In VSCode, show algorithmic conditions used to validate data on a POST condition. The 400 error shows up if the user doesnt’ provide a body for the API to use to predict calorie count.
- 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.
Frontend - Total __/8, Grade __/1
- Blog JavaScript API fetch code and formatting code to display JSON.
The fetch code connects to the API specified in the backend, and displays the sleep data in a table, and the fitness data as a number rounded to 2 decimals. It is displayed as bolded text in a statement, and another sleep or fitness related fact is displayed below the input.
- In Chrome inspect, show response of JSON objects from fetch of GET, POST, and UPDATE methods.
- In the Chrome browser, show a demo (GET) of obtaining an Array of JSON objects that are formatted into the browsers screen.
- In JavaScript code, describe fetch and method that obtained the Array of JSON objects.
The code gets all the records from the database, formats it as a json object, and presents it in postman when the API is called. it reads through each row of the json and then inputs it into the table created by HTML.
- In JavaScript code, show code that performs iteration and formatting of data into HTML. Iterates over each row of the sleep data and then uses the displayitems function to format it as a table.
-
In JavaScript code, show and describe code that handles success. Describe how code shows success to the user in the Chrome Browser screen. Sucess will print a bolded sentence telling the user their predicted calorie burn as well as a fact abotu fitness to encourage the user to continue exerciseing.
-
In JavaScript code, show and describe code that handles failure. Describe how the code shows failure to the user in the Chrome Browser screen. The error message appears when there are issues with the API, and the frontend is unable to get a predicted calorie count from the backend. This can come from not running backend, forgetting to input certain values, etc.
Optional/Extra, ML Algorithm Analysis - Total __/5, Grade __/1
-
In the ML projects, there is a great deal of algorithm analysis. Think about preparing data and predictions.
-
Show algorithms and preparation of data for analysis. This includes cleaning, encoding, and one-hot encoding.
-
Show algorithms and preparation for predictions.
- Discuss concepts and understanding of Linear Regression algorithms.
- Discuss concepts and understanding of Decision Tree analysis algorithms.