{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Exercise 4"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"For this exercise you are given a database containing information about real estate around\n",
"Uppsala. You are also given a Python module that helps working the database.\n",
"\n",
"- The database (`uppsala.sqlite`) and the code (`db.py` and `homes.py`) are found in the `download` directory.\n",
"- Read the module's [documentation](../../files/db_module_documentation.html)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The module `db.py` will help you produce a HTML file whit your results plotted on a map. This set-up uses OpenStreetMap. \n",
"\n",
"![result](../../img/mapOSM.png)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The center is defined as the point:\n",
"\n",
"`latitude: 59.865795990339876`\n",
"\n",
"`longitude: 17.64583576202392`\n",
"\n",
"\n",
"- Open `homes.py` and use it to solve the exercise"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Questions:\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"a) What is the price of the cheapest house around the given center and within 2 kilometers?"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"b) Plot the 100 cheapest houses in this area."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"c) Find the most expensive house that has an area larger than 10, and print its price and area."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"d) Print or plot this house."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"----\n",
"
\n",
"