DEV Community

Cover image for Housing Flask App
Corey
Corey

Posted on • Updated on

Housing Flask App

This project was completed for my internship at Data Glacier.

Hello everyone!

This project included several new aspects I have never done before. It is my first time using Flask, APIs, and Heroku. It includes a simple Linear Regression model to predict housing prices in King County, Washington from 2014-2015. However, the model isn't the important part, I just used it since I am from that area and I needed to create a model for the assignment. My focus was on implementing a Flask app that could take API requests.

Flask app -

I had never created a Flask app before this project. In order to to learn how, I used information from my internship and lesson from CodeCademy.com. My focus is not on HTML and CSS, so that code is taken from a previous project I completed and edited for this app.

I wanted to make my app work with an API request and using the app UI. Unfortunately, I was unable to do so due to my lack of experience with Flask. My solution was to create a page for the app and a page for the API. I would love to hear how I could have accomplished this though.

Another feature that I had to remove was using flask_wtf to use the date from the app. Due to the deadline for the project I had to ditch this after not being able to make it work after some hours.

Heroku -

This was also my first time putting an app on Heroku. The biggest hurdle for me was getting the requirements.txt file working. I now understand the benefit of using a digital environment for this purpose, but before I used the command to create the file using all the dependencies on the machine. However, this added way too many libraries and they couldn't be found to upload them. I also tried using a Heroku python package, but for some reason none of them worked. I just ended up adding them manually which is what I should have done in the beginning since there are so few of them.

Conclusion -

Overall, this was a great experience with features I was not familiar with. The model building was really the only step I had familiarity with, but I was able to do what I needed to complete the project. I have linked the app and the repository below.

https://shrouded-meadow-77059.herokuapp.com/

https://github.com/TheHamhams/DG-Housing

Discussion (0)