Skip to content

Commit 55503a9

Browse files
authored
Merge pull request #227 from DavidJVitale/master
Removed all references to 'find_business()' and 'business' in geoenrichment notebook
2 parents d4b517d + 264c54b commit 55503a9

File tree

1 file changed

+5
-299
lines changed

1 file changed

+5
-299
lines changed

guide/12-enrich-data-with-thematic-information/performing-geoenrichment.ipynb

Lines changed: 5 additions & 299 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
}
2020
},
2121
"source": [
22-
"GeoEnrichment provides the ability to get facts about a location or area. Using GeoEnrichment, you can get information about the people, places, and businesses in a specific area or within a certain distance or drive time from a location. It enables you to query and use information from a large collection of data sets including population, income, housing, consumer behavior, and the natural environment.\n",
22+
"GeoEnrichment provides the ability to get facts about a location or area. Using GeoEnrichment, you can get information about the people and places in a specific area or within a certain distance or drive time from a location. It enables you to query and use information from a large collection of data sets including population, income, housing, consumer behavior, and the natural environment.\n",
2323
"\n",
24-
"This module enables you to answer questions about locations that you can't answer with maps alone. For example: What kind of people live here? What do people like to do in this area? What are their habits and lifestyles? What kind of businesses are in this area?\n",
24+
"This module enables you to answer questions about locations that you can't answer with maps alone. For example: What kind of people live here? What do people like to do in this area? What are their habits and lifestyles?\n",
2525
"\n",
2626
"\n",
2727
"The `enrich()` method to can be used retrieve demographics and other relevant characteristics associated with the area surrounding the requested places. You can also use the `arcgis.geoenrichment` module to obtain additional geographic context (for example, the ZIP Code of a location) and geographic boundaries (for example, the geometry for a drive-time service area).\n",
@@ -47,7 +47,6 @@
4747
" - [Finding named statistical areas](#Finding-named-statistical-areas)\n",
4848
" - [Searching for named areas within a country](#Searching-for-named-areas-within-a-country)\n",
4949
" - [Filtering named areas by geography level](#Filtering-named-areas-by-geography-level)\n",
50-
" - [Finding businesses](#Finding-businesses)\n",
5150
" - [Working with study areas](#Working-with-study-Areas)\n",
5251
" - [Accepted forms of study areas](#Accepted-forms-of-study-areas)\n",
5352
" - [Creating Reports](#Creating-Reports)\n",
@@ -1288,295 +1287,6 @@
12881287
"usa.search(query='Riverside', layers=['US.Counties'])"
12891288
]
12901289
},
1291-
{
1292-
"cell_type": "markdown",
1293-
"metadata": {
1294-
"slideshow": {
1295-
"slide_type": "subslide"
1296-
}
1297-
},
1298-
"source": [
1299-
"## Finding businesses\n",
1300-
"The `find_businesses()` method returns business points matching a given search criteria. Business points can be selected using any combination of three search criteria: \n",
1301-
" * search string, \n",
1302-
" * spatial filter \n",
1303-
" * business type. \n",
1304-
"\n",
1305-
"A business point will be selected if it matches all search criteria specified.\n",
1306-
"\n",
1307-
"The snipped below finds all **Starbucks** in 4 different geographical areas."
1308-
]
1309-
},
1310-
{
1311-
"cell_type": "code",
1312-
"execution_count": 36,
1313-
"metadata": {
1314-
"slideshow": {
1315-
"slide_type": "fragment"
1316-
}
1317-
},
1318-
"outputs": [
1319-
{
1320-
"data": {
1321-
"text/html": [
1322-
"<div>\n",
1323-
"<table border=\"1\" class=\"dataframe\">\n",
1324-
" <thead>\n",
1325-
" <tr style=\"text-align: right;\">\n",
1326-
" <th></th>\n",
1327-
" <th>ADDR</th>\n",
1328-
" <th>CITY</th>\n",
1329-
" <th>CONAME</th>\n",
1330-
" <th>EMPNUM</th>\n",
1331-
" <th>FRNCOD</th>\n",
1332-
" <th>HDBRCH</th>\n",
1333-
" <th>ISCODE</th>\n",
1334-
" <th>LOCNUM</th>\n",
1335-
" <th>LOC_NAME</th>\n",
1336-
" <th>NAICS</th>\n",
1337-
" <th>...</th>\n",
1338-
" <th>SIC</th>\n",
1339-
" <th>SOURCE</th>\n",
1340-
" <th>SQFTCODE</th>\n",
1341-
" <th>STATE</th>\n",
1342-
" <th>STATE_NAME</th>\n",
1343-
" <th>STATUS</th>\n",
1344-
" <th>STREET</th>\n",
1345-
" <th>ZIP</th>\n",
1346-
" <th>ZIP4</th>\n",
1347-
" <th>SHAPE</th>\n",
1348-
" </tr>\n",
1349-
" </thead>\n",
1350-
" <tbody>\n",
1351-
" <tr>\n",
1352-
" <th>0</th>\n",
1353-
" <td>972 BAXTER AVE</td>\n",
1354-
" <td>LOUISVILLE</td>\n",
1355-
" <td>STARBUCKS</td>\n",
1356-
" <td>16</td>\n",
1357-
" <td>4</td>\n",
1358-
" <td>2</td>\n",
1359-
" <td></td>\n",
1360-
" <td>210648473</td>\n",
1361-
" <td>PointAddress</td>\n",
1362-
" <td>72251505</td>\n",
1363-
" <td>...</td>\n",
1364-
" <td>581228</td>\n",
1365-
" <td>INFOGROUP</td>\n",
1366-
" <td>A</td>\n",
1367-
" <td>KY</td>\n",
1368-
" <td>Kentucky</td>\n",
1369-
" <td>M</td>\n",
1370-
" <td>BAXTER AVE</td>\n",
1371-
" <td>40204</td>\n",
1372-
" <td>2064</td>\n",
1373-
" <td>{'x': -85.7242000003527, 'y': 38.2401999999322}</td>\n",
1374-
" </tr>\n",
1375-
" <tr>\n",
1376-
" <th>1</th>\n",
1377-
" <td>5963 CORSON AVE S # A-184</td>\n",
1378-
" <td>SEATTLE</td>\n",
1379-
" <td>STARBUCKS</td>\n",
1380-
" <td>20</td>\n",
1381-
" <td>4</td>\n",
1382-
" <td>2</td>\n",
1383-
" <td></td>\n",
1384-
" <td>243104437</td>\n",
1385-
" <td>StreetAddress</td>\n",
1386-
" <td>72251505</td>\n",
1387-
" <td>...</td>\n",
1388-
" <td>581228</td>\n",
1389-
" <td>INFOGROUP</td>\n",
1390-
" <td>B</td>\n",
1391-
" <td>WA</td>\n",
1392-
" <td>Washington</td>\n",
1393-
" <td>M</td>\n",
1394-
" <td>CORSON AVE S</td>\n",
1395-
" <td>98108</td>\n",
1396-
" <td>2619</td>\n",
1397-
" <td>{'x': -122.321199999801, 'y': 47.5483999998966}</td>\n",
1398-
" </tr>\n",
1399-
" <tr>\n",
1400-
" <th>2</th>\n",
1401-
" <td>406 PENN ST</td>\n",
1402-
" <td>CAMDEN</td>\n",
1403-
" <td>STARBUCKS</td>\n",
1404-
" <td>15</td>\n",
1405-
" <td>4</td>\n",
1406-
" <td>2</td>\n",
1407-
" <td></td>\n",
1408-
" <td>243189941</td>\n",
1409-
" <td>StreetAddress</td>\n",
1410-
" <td>72251505</td>\n",
1411-
" <td>...</td>\n",
1412-
" <td>581228</td>\n",
1413-
" <td>INFOGROUP</td>\n",
1414-
" <td>A</td>\n",
1415-
" <td>NJ</td>\n",
1416-
" <td>New Jersey</td>\n",
1417-
" <td>M</td>\n",
1418-
" <td>PENN ST</td>\n",
1419-
" <td>08102</td>\n",
1420-
" <td>1400</td>\n",
1421-
" <td>{'x': -75.1212000001827, 'y': 39.9480999999659}</td>\n",
1422-
" </tr>\n",
1423-
" <tr>\n",
1424-
" <th>3</th>\n",
1425-
" <td>326 PENN ST</td>\n",
1426-
" <td>CAMDEN</td>\n",
1427-
" <td>STARBUCKS</td>\n",
1428-
" <td>12</td>\n",
1429-
" <td>4</td>\n",
1430-
" <td>2</td>\n",
1431-
" <td></td>\n",
1432-
" <td>683534911</td>\n",
1433-
" <td>StreetAddress</td>\n",
1434-
" <td>72251505</td>\n",
1435-
" <td>...</td>\n",
1436-
" <td>581228</td>\n",
1437-
" <td>INFOGROUP</td>\n",
1438-
" <td>A</td>\n",
1439-
" <td>NJ</td>\n",
1440-
" <td>New Jersey</td>\n",
1441-
" <td>M</td>\n",
1442-
" <td>PENN ST</td>\n",
1443-
" <td>08102</td>\n",
1444-
" <td>1410</td>\n",
1445-
" <td>{'x': -75.1220000002487, 'y': 39.9482999997207}</td>\n",
1446-
" </tr>\n",
1447-
" <tr>\n",
1448-
" <th>4</th>\n",
1449-
" <td>4502 12TH AVE S</td>\n",
1450-
" <td>SEATTLE</td>\n",
1451-
" <td>STARBUCKS</td>\n",
1452-
" <td>15</td>\n",
1453-
" <td>4</td>\n",
1454-
" <td>2</td>\n",
1455-
" <td></td>\n",
1456-
" <td>714927777</td>\n",
1457-
" <td>PointAddress</td>\n",
1458-
" <td>72251505</td>\n",
1459-
" <td>...</td>\n",
1460-
" <td>581228</td>\n",
1461-
" <td>INFOGROUP</td>\n",
1462-
" <td>A</td>\n",
1463-
" <td>WA</td>\n",
1464-
" <td>Washington</td>\n",
1465-
" <td>M</td>\n",
1466-
" <td>12TH AVE S</td>\n",
1467-
" <td>98108</td>\n",
1468-
" <td>1805</td>\n",
1469-
" <td>{'x': -122.317000000352, 'y': 47.5633000002997}</td>\n",
1470-
" </tr>\n",
1471-
" </tbody>\n",
1472-
"</table>\n",
1473-
"<p>5 rows × 23 columns</p>\n",
1474-
"</div>"
1475-
],
1476-
"text/plain": [
1477-
" ADDR CITY CONAME EMPNUM FRNCOD HDBRCH \\\n",
1478-
"0 972 BAXTER AVE LOUISVILLE STARBUCKS 16 4 2 \n",
1479-
"1 5963 CORSON AVE S # A-184 SEATTLE STARBUCKS 20 4 2 \n",
1480-
"2 406 PENN ST CAMDEN STARBUCKS 15 4 2 \n",
1481-
"3 326 PENN ST CAMDEN STARBUCKS 12 4 2 \n",
1482-
"4 4502 12TH AVE S SEATTLE STARBUCKS 15 4 2 \n",
1483-
"\n",
1484-
" ISCODE LOCNUM LOC_NAME NAICS \\\n",
1485-
"0 210648473 PointAddress 72251505 \n",
1486-
"1 243104437 StreetAddress 72251505 \n",
1487-
"2 243189941 StreetAddress 72251505 \n",
1488-
"3 683534911 StreetAddress 72251505 \n",
1489-
"4 714927777 PointAddress 72251505 \n",
1490-
"\n",
1491-
" ... SIC SOURCE \\\n",
1492-
"0 ... 581228 INFOGROUP \n",
1493-
"1 ... 581228 INFOGROUP \n",
1494-
"2 ... 581228 INFOGROUP \n",
1495-
"3 ... 581228 INFOGROUP \n",
1496-
"4 ... 581228 INFOGROUP \n",
1497-
"\n",
1498-
" SQFTCODE STATE STATE_NAME STATUS STREET ZIP ZIP4 \\\n",
1499-
"0 A KY Kentucky M BAXTER AVE 40204 2064 \n",
1500-
"1 B WA Washington M CORSON AVE S 98108 2619 \n",
1501-
"2 A NJ New Jersey M PENN ST 08102 1400 \n",
1502-
"3 A NJ New Jersey M PENN ST 08102 1410 \n",
1503-
"4 A WA Washington M 12TH AVE S 98108 1805 \n",
1504-
"\n",
1505-
" SHAPE \n",
1506-
"0 {'x': -85.7242000003527, 'y': 38.2401999999322} \n",
1507-
"1 {'x': -122.321199999801, 'y': 47.5483999998966} \n",
1508-
"2 {'x': -75.1212000001827, 'y': 39.9480999999659} \n",
1509-
"3 {'x': -75.1220000002487, 'y': 39.9482999997207} \n",
1510-
"4 {'x': -122.317000000352, 'y': 47.5633000002997} \n",
1511-
"\n",
1512-
"[5 rows x 23 columns]"
1513-
]
1514-
},
1515-
"execution_count": 36,
1516-
"metadata": {},
1517-
"output_type": "execute_result"
1518-
}
1519-
],
1520-
"source": [
1521-
"businesses = find_businesses(search_string=\"Starbucks\",\n",
1522-
" return_geometry=True,\n",
1523-
" spatial_filter={\"Locations\":[\"NY,TONAWANDA,14150\",\n",
1524-
" \"NJ, CAMDEN, 08102\",\n",
1525-
" \"KY,LOUISVILLE,40204\",\n",
1526-
" \"WA,SEATTLE,98108\"]})\n",
1527-
"# print a sample\n",
1528-
"businesses"
1529-
]
1530-
},
1531-
{
1532-
"cell_type": "code",
1533-
"execution_count": 35,
1534-
"metadata": {},
1535-
"outputs": [
1536-
{
1537-
"data": {
1538-
"text/plain": [
1539-
"(5, 23)"
1540-
]
1541-
},
1542-
"execution_count": 35,
1543-
"metadata": {},
1544-
"output_type": "execute_result"
1545-
}
1546-
],
1547-
"source": [
1548-
"# find the total number of starbucks found\n",
1549-
"businesses.shape"
1550-
]
1551-
},
1552-
{
1553-
"cell_type": "markdown",
1554-
"metadata": {},
1555-
"source": [
1556-
"Use the `geometry` module to read the coordinates of a business"
1557-
]
1558-
},
1559-
{
1560-
"cell_type": "code",
1561-
"execution_count": 37,
1562-
"metadata": {},
1563-
"outputs": [
1564-
{
1565-
"data": {
1566-
"text/plain": [
1567-
"{\"x\": -85.7242000003527, \"y\": 38.2401999999322}"
1568-
]
1569-
},
1570-
"execution_count": 37,
1571-
"metadata": {},
1572-
"output_type": "execute_result"
1573-
}
1574-
],
1575-
"source": [
1576-
"import arcgis.geometry\n",
1577-
"arcgis.geometry.Geometry(businesses.iloc[0]['SHAPE'])"
1578-
]
1579-
},
15801290
{
15811291
"cell_type": "markdown",
15821292
"metadata": {
@@ -1613,10 +1323,6 @@
16131323
" + **Example Point Location: ** \n",
16141324
" \n",
16151325
" `arcgis.geometry.Geometry({\"x\":-122.435,\"y\":37.785})`\n",
1616-
" \n",
1617-
" + ** Example Point location obtained using find_businesses() above: **\n",
1618-
" \n",
1619-
" `arcgis.geometry.Geometry(businesses.iloc[0]['SHAPE'])`\n",
16201326
"\n",
16211327
"- **Buffered study areas** - `BufferStudyArea` instances to change the ring buffer size or create drive-time service areas around points specified using one of the above methods. BufferStudyArea allows you to buffer point and street address study areas. They can be created using the following parameters:\n",
16221328
" * area: the point geometry or street address (string) study area to be buffered\n",
@@ -1655,7 +1361,7 @@
16551361
},
16561362
"source": [
16571363
"## Creating Reports\n",
1658-
"The `create_report` method allows you to create many types of high quality reports for a variety of use cases describing the input area. If a point is used as a study area, the service will create a `1` mile ring buffer around the point to collect and append enrichment data. Optionally, you can create a buffer ring or drive time service area around points of interest to generate PDF or Excel reports containing relevant information for the area on demographics, consumer spending, tapestry market, business or market potential.\n",
1364+
"The `create_report` method allows you to create many types of high quality reports for a variety of use cases describing the input area. If a point is used as a study area, the service will create a `1` mile ring buffer around the point to collect and append enrichment data. Optionally, you can create a buffer ring or drive time service area around points of interest to generate PDF or Excel reports containing relevant information for the area on demographics, consumer spending, tapestry market, etc.\n",
16591365
"\n",
16601366
"To find the list of reports available, refer to the section [Available reports](#Available-reports) earlier in this page."
16611367
]
@@ -3121,7 +2827,7 @@
31212827
"\n",
31222828
"The results can be saved back to a GIS as a feature layer \n",
31232829
"\n",
3124-
"#### Example: Save Business Data to a Feature Layer"
2830+
"#### Example: Save Data to a Feature Layer"
31252831
]
31262832
},
31272833
{
@@ -3184,7 +2890,7 @@
31842890
"name": "python",
31852891
"nbconvert_exporter": "python",
31862892
"pygments_lexer": "ipython3",
3187-
"version": "3.6.1"
2893+
"version": "3.6.5"
31882894
},
31892895
"livereveal": {
31902896
"scroll": true

0 commit comments

Comments
 (0)