Skip to content

Latest commit

 

History

History
14 lines (8 loc) · 4.48 KB

File metadata and controls

14 lines (8 loc) · 4.48 KB

Project Writeup and Reflection

Team Members:

Andrea Baumgartner & Alejandro Wills

Writeup:

In this Project was a fun and interesting way of testing the skills we learned when working on Assignment 2 indiviually especially when it came to exploring differnt Python packages in order to access information on the web. The first thing we did was requst our API developer keys which we learned are basically a code that is used to identify and recognize a person or application. We then requested the response in JSON format in order to decode it. In order to extract the information we need for the app (latitudes and logitudes) we wrote a function to access these fields that we want and obtained our output using tuple. Next, we used this function in a second function we wrote that took the latitudes and logitudes obtained with the previous function and returns the name of the nearest MBTA stop and also if it is accessible by wheelchairs. Lastly for part 1, we wrote another function that embedded all previously written functions to build a tool that takes a location name or address as input, calculates its latitude/longitude, and produces the closest MBTA station as well as if it is wheelchair friendly. Next was Part 2, the Webapp. In part 2 we installed and read up on Flask in order to get familiar with it before using it to build our webapp which uses the python file with all the functions in part 1. In this website we created a home page where the user types a name of a place and clicks a 'submit' button via a form where it is sent via POST request to the Flask backend which will pass the request to POST /nearest mbta. Then our app provides the user an mbta station display, which will show them the closest MBTA stop as well as whether or not it is wheelchair friendly. If the persons' input is invalid, it directs them to a 404 error page with an option to go to the home page and try again.

Reflection:

Overall this project was very fun and challenging. It was a useful way of learning on our own and going through a lot of trial and error. Prior to starting this project together, we wished we would've had more practice with creating a webapp, perhaps something more challenging than the calculator webapp and somewhat similar to this assignment in order to have a better idea on how to execute and scope our plan. We did have a nice plan for testing as we wrote our code, we made sure to constantly test in order for it to be easier for us to track down any errors along the way although we did have a few slips but thankfully we were able to fix them. Our plan for testing our units was to create a set of places where we knew MBTA stations would be as well as places where they would not be. This would ensure that we are getting the right information from each unit that we tested. In the process of creating our code we got off to a great start but then got stumped with loading the information from the MBTA API. After doing extensive research and having the professing help us we were able to address the problem and get the code to work. As well as this we struggled in getting the results to load in within our website. To address this we, on our own, looked at various Youtube videos that explained the concept of Flask and its implementation. We also spent a lot of time reading carefully the links presented in the instructions such as w3schools to know how to create aform for our webpageI also think we could of been better in using VS Code between the two of us. Various times we had our work done but when we tried to commit, we had our work deleted. If we had more knowledge on how to navigate Github and VSCode we couldve collaborated better.

Overall, as a team we helped each other a lot throughout the whole process. Alejandro provided a lot of insight and help when working in the mbta_helper file, he knew a lot about writing those functions. Although we did do some work on our own we did spend more than 5 hours working together through zoom or in person to collaborate as we progressed. At first we split the work but when we would run into trouble we would ask each other for help and end up working on it together naturally a lot of the time. We did struggle a lot in the beginning with figuring out how to collaborate under the same repository on github as we got confused between cloning and forking so we had to work a lot together through one person typing since every time we would merge files it would delete things or create new errors but thankfully we were able to move past this together.