-
Download the repository
-
From the root folder run the command:
docker-compose up
The following chain of events will happen:
- docker-compose.yml will be executed
- Postgres will start and inicialize a database
- The api service will wait for the database to become active
- After the all clear, the manhattan excel data will be downloaded and inserted into the database
- A flask api service will start on port 6001
Send a post request to the endpoint: http://localhost:6001/api/get-properties-sold
Example post request json:
{ "low": "0", "high": "1000000000" }
utils.py contains fill_database(). The manhattan excel data will be downloaded and inserted into the database
utils.py contains the plot function show_avg_sale_by_year(). It queries the database and plots the information on a bar graph.