"Before you turn this problem in, make sure everything runs as expected. First, **restart the kernel** (in the menubar, select Kernel$\\rightarrow$Restart) and then **run all cells** (in the menubar, select Cell$\\rightarrow$Run All).\n",
"\n",
"Make sure you fill in any place that says `YOUR CODE HERE` or \"YOUR ANSWER HERE\", as well as your name and collaborators below:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"NAME = \"\"\n",
"COLLABORATORS = \"\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"---"
]
},
{
"cell_type": "markdown",
"metadata": {
"deletable": false,
"editable": false,
"nbgrader": {
"checksum": "90bb5fda6dd3442c48e7fdec3924c030",
"grade": false,
"grade_id": "cell-e343ad28d6c9dacd",
"locked": true,
"schema_version": 1,
"solution": false
}
},
"source": [
"# Part 3 - Python\n",
"\n",
"Determine the percentage of water on some parcels at the campus. Can you help?\n",
"\n",
"### Determine how much area **(m2 and percentage)** of the combined WUR parcels are covered by water by using the BGT WFS (typename = bgt:waterdeel) (40pts)\n",
"\n",
"Wageningen University are specifically interested in parcels with \"perceelnummer\": ['10709', '10905', '10906', '10907', '10908', '10909', '11184', '11185', '11208', '11593']\n",
"\n",
"Work with a project structure, either separate your script into sections using comments, or you may create and import functions from other .py files. You can create these sections/functions:\n",
"\n",
" geocodePlacenameToCoordinate\n",
" reproject\n",
" downloadWFSToGeoDataFrame\n",
" calculatePercentageArea\n",
" makeWebmap or makeMap (for visualization you can choose to make a map with Folium or matplotlib)\n",
" Optional: getBoundingBox\n",
"\n",
"### assign your answers to variables with the name answer_percent (a fraction of 1) and answer_m2\n",
"\n",
"Go easy on webservices! There is no need to use for loops or while statements to call web services multiple times! Upload your documented and well structured Python scripts to a GitLab repository.\n",
"\n",
"Hint: If you need some help how to make functions or how to import modules, have a look at the code in the Python refresher or in the cheat sheets mentioned in the Python refresher.\n",
Before you turn this problem in, make sure everything runs as expected. First, **restart the kernel** (in the menubar, select Kernel$\rightarrow$Restart) and then **run all cells** (in the menubar, select Cell$\rightarrow$Run All).
Make sure you fill in any place that says `YOUR CODE HERE` or "YOUR ANSWER HERE", as well as your name and collaborators below:
%% Cell type:code id: tags:
``` python
NAME=""
COLLABORATORS=""
```
%% Cell type:markdown id: tags:
---
%% Cell type:markdown id: tags:
# Part 3 - Python
Determine the percentage of water on some parcels at the campus. Can you help?
### Determine how much area **(m2 and percentage)** of the combined WUR parcels are covered by water by using the BGT WFS (typename = bgt:waterdeel) (40pts)
Wageningen University are specifically interested in parcels with "perceelnummer": ['10709', '10905', '10906', '10907', '10908', '10909', '11184', '11185', '11208', '11593']
Work with a project structure, either separate your script into sections using comments, or you may create and import functions from other .py files. You can create these sections/functions:
geocodePlacenameToCoordinate
reproject
downloadWFSToGeoDataFrame
calculatePercentageArea
makeWebmap or makeMap (for visualization you can choose to make a map with Folium or matplotlib)
Optional: getBoundingBox
### assign your answers to variables with the name answer_percent (a fraction of 1) and answer_m2
Go easy on webservices! There is no need to use for loops or while statements to call web services multiple times! Upload your documented and well structured Python scripts to a GitLab repository.
Hint: If you need some help how to make functions or how to import modules, have a look at the code in the Python refresher or in the cheat sheets mentioned in the Python refresher.