Skip to content

Commit

Permalink
Merge pull request #52 from MoenMi/fix-uscb-geocoding
Browse files Browse the repository at this point in the history
Fix UCSB Geocoding tutorial error
  • Loading branch information
vfscalfani authored Jun 7, 2024
2 parents 0162fbf + 51760c0 commit fd268dd
Showing 1 changed file with 29 additions and 29 deletions.
58 changes: 29 additions & 29 deletions src/python/us-census-geocoding.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"\n",
"This product uses the Census Bureau Data API but is not endorsed or certified by the Census Bureau.\n",
"\n",
"*These recipe examples were tested on February 29, 2024.*"
"*These recipe examples were tested on June 6, 2024.*"
]
},
{
Expand All @@ -28,7 +28,7 @@
},
{
"cell_type": "code",
"execution_count": 49,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -52,7 +52,7 @@
},
{
"cell_type": "code",
"execution_count": 50,
"execution_count": 2,
"metadata": {},
"outputs": [
{
Expand All @@ -61,7 +61,7 @@
"200"
]
},
"execution_count": 50,
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -94,7 +94,7 @@
},
{
"cell_type": "code",
"execution_count": 51,
"execution_count": 3,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -125,7 +125,7 @@
" 'matchedAddress': '425 STADIUM DR, TUSCALOOSA, AL, 35401'}]}}"
]
},
"execution_count": 51,
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -136,23 +136,23 @@
},
{
"cell_type": "code",
"execution_count": 52,
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(-87.54970041625674, 33.21105403378043)"
"(33.21105403378043, -87.54970041625674)"
]
},
"execution_count": 52,
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"latitude = response.json()['result']['addressMatches'][0]['coordinates']['x']\n",
"longitude = response.json()['result']['addressMatches'][0]['coordinates']['y']\n",
"latitude = response.json()['result']['addressMatches'][0]['coordinates']['y']\n",
"longitude = response.json()['result']['addressMatches'][0]['coordinates']['x']\n",
"\n",
"# Display coordinates\n",
"latitude, longitude"
Expand All @@ -167,7 +167,7 @@
},
{
"cell_type": "code",
"execution_count": 53,
"execution_count": 6,
"metadata": {},
"outputs": [
{
Expand All @@ -176,7 +176,7 @@
"200"
]
},
"execution_count": 53,
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -207,23 +207,23 @@
},
{
"cell_type": "code",
"execution_count": 54,
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(-87.54970041625674, 33.21105403378043)"
"(33.21105403378043, -87.54970041625674)"
]
},
"execution_count": 54,
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"latitude = response.json()['result']['addressMatches'][0]['coordinates']['x']\n",
"longitude = response.json()['result']['addressMatches'][0]['coordinates']['y']\n",
"latitude = response.json()['result']['addressMatches'][0]['coordinates']['y']\n",
"longitude = response.json()['result']['addressMatches'][0]['coordinates']['x']\n",
"\n",
"# Display coordinates\n",
"latitude, longitude"
Expand All @@ -242,7 +242,7 @@
},
{
"cell_type": "code",
"execution_count": 55,
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -264,7 +264,7 @@
},
{
"cell_type": "code",
"execution_count": 56,
"execution_count": 9,
"metadata": {},
"outputs": [
{
Expand All @@ -273,7 +273,7 @@
"200"
]
},
"execution_count": 56,
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -297,7 +297,7 @@
},
{
"cell_type": "code",
"execution_count": 57,
"execution_count": 10,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -347,7 +347,7 @@
},
{
"cell_type": "code",
"execution_count": 58,
"execution_count": 11,
"metadata": {},
"outputs": [
{
Expand All @@ -356,7 +356,7 @@
"200"
]
},
"execution_count": 58,
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -402,7 +402,7 @@
},
{
"cell_type": "code",
"execution_count": 59,
"execution_count": 12,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -430,7 +430,7 @@
},
{
"cell_type": "code",
"execution_count": 60,
"execution_count": 13,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -470,7 +470,7 @@
},
{
"cell_type": "code",
"execution_count": 61,
"execution_count": 14,
"metadata": {
"tags": []
},
Expand Down Expand Up @@ -498,7 +498,7 @@
" 'COUNTY': '125'}]"
]
},
"execution_count": 61,
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -524,7 +524,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.1"
"version": "3.11.3"
},
"orig_nbformat": 4
},
Expand Down

0 comments on commit fd268dd

Please sign in to comment.