address yongyao rev suggests
"source": [
"## HTML table to Pandas Data Frame to Portal Item\n",
"\n",
- "Often we read informative articles that present data in a tabular form. If such data contained location information, it would be much more insightful if presented as a cartographic map. Thus this sample shows how Pandas can be used to extract data from a table within a web page (in this case, a Wikipedia article) and how it can be then brought into the GIS for further analysis and visualization.\n",
+ "Often we read informative articles that present data in a tabular form. If such data contains location information, it would be much more insightful if presented as a cartographic map. Thus this sample shows how Pandas can be used to extract data from a table within a web page (in this case, a Wikipedia article) and how it can be then brought into the GIS for further analysis and visualization.\n",
"\n",
"**Note**: to run this sample, you need a few extra libraries in your conda environment. If you don't have the libraries, install them by running the following commands from cmd.exe or your shell\n",
"\n",
"metadata": {},
"source": [
"### Plot as a map\n",
- "Let us connect to our GIS to geocode this data and present it as a map"
+ "Let us connect to our GIS to geocode this data and present it as a map, either by specifying username and password, e.g. in `gis = GIS(\"https://www.arcgis.com\", \"arcgis_python\", \"P@ssword123\")` or via an existing profile:"
]
},
{
"from arcgis.gis import GIS\n",
"import json\n",
"\n",
- "gis = GIS(\"https://www.arcgis.com\", \"arcgis_python\", \"P@ssword123\")"
+ "gis = GIS(profile=\"your_online_profile\")"
]
},
{
"source": [
"## PDF table to Pandas Data Frame to Portal Item\n",
"\n",
- "Also, PDF files can contain useful information presented in a tabular form. If such data contained location information, it would be much more insightful if presented as a cartographic map. Thus this sample shows how Pandas can be used to extract data from a table within a PDF file (in this case, a PDF accessible from `California Department of Forestry & Fire Protection (CAL FIRE)` website) and how it can be then brought into the GIS for further analysis and visualization.\n",
+ "Also, PDF files can contain useful information presented in a tabular form. If such data contains location information, it would be much more insightful if presented as a cartographic map. Thus this sample shows how Pandas can be used to extract data from a table within a PDF file (in this case, a PDF accessible from `California Department of Forestry & Fire Protection (CAL FIRE)` website) and how it can be then brought into the GIS for further analysis and visualization.\n",
"\n",
"**Note**: to run this sample, you need a few extra libraries in your conda environment. If you don't have the libraries, install them by running the following commands from cmd.exe or your shell\n",
"\n",
"metadata": {},
"outputs": [],
"source": [
- "from tabula import wrapper\n",
"df = wrapper.read_pdf(pdf_url_list[0])"
]
},
