Skip to content

Commit

Permalink
[skip-ci] update with s3 bucket link
Browse files Browse the repository at this point in the history
  • Loading branch information
isVoid committed Mar 11, 2023
1 parent 095440d commit 39f3d7c
Showing 1 changed file with 69 additions and 44 deletions.
113 changes: 69 additions & 44 deletions notebooks/ZipCodes_Stops_PiP_cuSpatial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,36 @@
"Datasets used:\n",
"1. Stops (Signs and Stop lines) Dataset from OpenStreetMap: [Tag Page](https://wiki.openstreetmap.org/wiki/Tag:highway%3Dstop)\n",
"2. USA ZipCode: [Download](https://catalog.data.gov/dataset/tiger-line-shapefile-2019-2010-nation-u-s-2010-census-5-digit-zip-code-tabulation-area-zcta5-na)\n",
"3. USA States boundaries: [link](https://wiki.openstreetmap.org/wiki/Tag:boundary%3Dadministrative)\n",
"\n",
"Download the datasets and save as:\n",
"1. USA_Stops_Vertices.csv\n",
"2. USA_Zipcodes_2019_Tiger.csv\n",
"3. USA_States.csv"
"3. USA States boundaries: [link](https://wiki.openstreetmap.org/wiki/Tag:boundary%3Dadministrative)"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "597750fe-518e-4944-8cbe-b84aea22481e",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"USA_States.csv found\n",
"USA_Stops_Vertices.csv found\n",
"USA_Zipcodes_2019_Tiger.csv found\n"
]
}
],
"source": [
"# Download the datasets and save as:\n",
"# 1. USA_Stops_Vertices.csv\n",
"# 2. USA_Zipcodes_2019_Tiger.csv\n",
"# 3. USA_States.csv\n",
"\n",
"!if [ ! -f \"USA_States.csv\" ]; then curl \"https://data.rapids.ai/cuspatial/benchmark/USA_States.csv\" -o USA_States.csv; else echo \"USA_States.csv found\"; fi\n",
"!if [ ! -f \"USA_Stops_Vertices.csv\" ]; then curl \"https://data.rapids.ai/cuspatial/benchmark/USA_Stops_Vertices.csv\" -o USA_Stops_Vertices.csv; else echo \"USA_Stops_Vertices.csv found\"; fi\n",
"!if [ ! -f \"USA_Zipcodes_2019_Tiger.csv\" ]; then curl \"https://data.rapids.ai/cuspatial/benchmark/USA_Zipcodes_2019_Tiger.csv\" -o USA_Zipcodes_2019_Tiger.csv; else echo \"USA_Zipcodes_2019_Tiger.csv found\"; fi"
]
},
{
Expand All @@ -45,7 +69,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 2,
"id": "b2892e9a-ce32-4e5a-94a9-dd121d2a6ea3",
"metadata": {},
"outputs": [],
Expand All @@ -63,15 +87,16 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 3,
"id": "086eda5a-8eda-46d8-8e90-54a2616799f8",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"# Root folder for datasets\n",
"DATASET_ROOT=\"/datasets/zipcodes\"\n",
"DATASET_ROOT = \"./\"\n",
"\n",
"def path_of(dataset):\n",
" return os.path.join(DATASET_ROOT, dataset)"
]
Expand All @@ -88,7 +113,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 4,
"id": "fcb48a9c-f968-486c-8cb8-7e0de6cc7f1c",
"metadata": {},
"outputs": [],
Expand All @@ -99,7 +124,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 5,
"id": "b12cfa00-ad8d-4b9c-93cf-c1a511f8d513",
"metadata": {},
"outputs": [],
Expand All @@ -114,7 +139,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 6,
"id": "583856a2-0b29-48c1-ade7-3840f640c5e7",
"metadata": {},
"outputs": [],
Expand All @@ -130,7 +155,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 7,
"id": "a13b228d-9a60-4f32-b548-fa6f4240e75e",
"metadata": {
"tags": []
Expand All @@ -144,7 +169,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 8,
"id": "33da801e-01a3-4c9f-bbba-0c61dc7677d9",
"metadata": {
"tags": []
Expand Down Expand Up @@ -299,7 +324,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 9,
"id": "c0cadafb-acae-41d6-bbca-c10a8201699c",
"metadata": {
"tags": []
Expand Down Expand Up @@ -334,7 +359,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 10,
"id": "d2571a4a-a898-4e04-9fd2-21eb6b7a7f3e",
"metadata": {
"tags": []
Expand All @@ -346,7 +371,7 @@
"(1762, 33144)"
]
},
"execution_count": 11,
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -375,7 +400,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 11,
"id": "370ee37c-1311-4f54-9b0c-afd862c489aa",
"metadata": {
"tags": []
Expand Down Expand Up @@ -405,7 +430,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 12,
"id": "5674f74a-9315-4e1f-ac0d-c45a1b97ae3e",
"metadata": {
"tags": []
Expand Down Expand Up @@ -440,49 +465,49 @@
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>-121.754300</td>\n",
" <td>36.907553</td>\n",
" <td>95076</td>\n",
" <td>-121.858094</td>\n",
" <td>37.280787</td>\n",
" <td>95136</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>-121.754349</td>\n",
" <td>36.907813</td>\n",
" <td>95076</td>\n",
" <td>-121.856648</td>\n",
" <td>37.278295</td>\n",
" <td>95136</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>-121.755085</td>\n",
" <td>36.906892</td>\n",
" <td>95076</td>\n",
" <td>-121.855441</td>\n",
" <td>37.280375</td>\n",
" <td>95136</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>-121.755309</td>\n",
" <td>36.906738</td>\n",
" <td>95076</td>\n",
" <td>-121.856343</td>\n",
" <td>37.283195</td>\n",
" <td>95136</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>-121.756839</td>\n",
" <td>36.908334</td>\n",
" <td>95076</td>\n",
" <td>-121.856604</td>\n",
" <td>37.281005</td>\n",
" <td>95136</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" x y ZCTA5CE10\n",
"0 -121.754300 36.907553 95076\n",
"1 -121.754349 36.907813 95076\n",
"2 -121.755085 36.906892 95076\n",
"3 -121.755309 36.906738 95076\n",
"4 -121.756839 36.908334 95076\n",
"0 -121.858094 37.280787 95136\n",
"1 -121.856648 37.278295 95136\n",
"2 -121.855441 37.280375 95136\n",
"3 -121.856343 37.283195 95136\n",
"4 -121.856604 37.281005 95136\n",
"(GPU)"
]
},
"execution_count": 13,
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -503,7 +528,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 13,
"id": "247d716c-4718-4aba-8d4f-5f816852194d",
"metadata": {
"tags": []
Expand All @@ -521,7 +546,7 @@
"Name: stop_count, dtype: int32"
]
},
"execution_count": 14,
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -534,7 +559,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 14,
"id": "ccf31694-275d-4987-a318-79bc1ea79e73",
"metadata": {
"tags": []
Expand Down Expand Up @@ -568,7 +593,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 15,
"id": "6a9cb2d6-c7d3-4063-9b24-47101dba0044",
"metadata": {},
"outputs": [],
Expand Down

0 comments on commit 39f3d7c

Please sign in to comment.