Skip to content

Commit

Permalink
Created using Colaboratory
Browse files Browse the repository at this point in the history
  • Loading branch information
spatialthoughts committed Jun 21, 2023
1 parent 698725c commit 0dec9f6
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions code/python_foundation/assignment
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"provenance": [],
"authorship_tag": "ABX9TyNlT/Gt+1vUAQv2YvOvlDbj"
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"language_info": {
"name": "python"
}
},
"cells": [
{
"cell_type": "markdown",
"source": [
"# Assignment\n",
"\n",
"Your assignment is to geocode the addresses given below using [GeoPy](https://geopy.readthedocs.io/en/stable/). This assignment is designed to help you practice your coding skills learnt in the course so far."
],
"metadata": {
"id": "ErX4L9CVntt2"
}
},
{
"cell_type": "markdown",
"source": [
"## Part 1\n",
"\n",
"You have been given a list containing 5 tuples of place names along with their address. You need to use the [Nominatim](https://geopy.readthedocs.io/en/stable/#module-geopy.geocoders) geocoder and obtain the latitude and longitude of each address."
],
"metadata": {
"id": "RmZLGvLaoGgL"
}
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"id": "WGNIodilnc9I"
},
"outputs": [],
"source": [
"# List of Hurricane Evacuation Centers in New York City with Addresses\n",
"# Each item is a tuple with the name of the center and its address\n",
"locations = [\n",
" ('Norman Thomas HS (ECF)', '111 E 33rd St, New York, NY'),\n",
" ('Midtown East Campus', '233 E 56 Street, New York'),\n",
" ('Louis D. Brandeis HS', '145 W 84 Street, New York'),\n",
" ('Martin Luther King, Jr. HS', '122 Amsterdam Avenue, New York'),\n",
" ('P.S. 48', '4360-78 Broadway, New York')\n",
"]"
]
}
]
}

0 comments on commit 0dec9f6

Please sign in to comment.