How to install the ArcGIS API on ArcGIS Pro Python (offline)

Esri has fully embraced Python for ArcGIS and sees Python as the language that fulfills the needs of the user community. Previous versions of ArcGIS Desktop (ArcMap and ArcGIS Pro up to version 1.2) used Python 2. Since the ArcGIS Pro 1.3 release, ArcGIS Desktop has made use of Python 3, bringing with it some changes to the tools.

ArcPy is a Python site package that, when used with Python, provides a useful and productive way to perform geographic data analysis, data conversion, data management, and map automation. By default ArcPy is installed as part of ArcGIS Desktop.

The ArcGIS API is another Python library focused on Web GIS. It provides powerful tools that can be used for vector and raster analysis, geocoding, map making as well as managing an ArcGIS Enterprise system.

In a lot of cases, one might need to use both of these packages in the same script in order to automate a specific workflow.

The online help documentation has a lot of tips, tricks and other bits of information to help you get started, including methods of installing the API. The easiest way to install the ArcGIS API is through the ArcGIS Pro Python Package Manager, however, this needs internet connectivity in order to download the package from the internet. So, what happens when I am in a disconnected environment?

According to the online help, the API can still be installed to the Anaconda instance of Python if you have downloaded the package beforehand. The challenge here is that now one can use the ArcGIS API, but only through the Anaconda Python installation. However, the Anaconda version of Python does not have the ArcPy package installed.

In the same way, I can use the Python instance installed with ArcGIS Pro in order to utilise the ArcPy capabilities, but I will be unable to access the ArcGIS API functionality.

A quick workaround

The default install location for ArcGIS Pro Python is installed at:

C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3

This installation stores and manages all its packages in the folder path below:

C:\Program Files\ArcGIS\Pro\bin\Python\pkgs


In order to be able to use the Python API in the ArcGIS Pro installation of Python, simply copy the package folder from an already installed API into this folder, restart ArcGIS Pro and voila!



Insights for ArcGIS – A new spatial Business Intelligence (BI) tool in ArcGIS 10.5

ArcGIS 10.5 is on its way, with the planned release scheduled for mid-December 2016. One of the big changes coming is a new product being unveiled called Insights for ArcGIS.

So, what exactly is Insights for ArcGIS? I would like to look at it as a map centric BI tool. It allows you to perform analytics which helps you uncover secrets about your data. The data in this app is displayed on “cards”. On each card a user can display a map, chart or table with data.

I have played around with the app at pre–release stage and thought it would be nice to give you a preview before the app is released officially. I summarised some important things to know about insights as well as of my favourite things about the app.

The important things about Insights for ArcGIS:

  • It is only available with ArcGIS Enterprise 10.5.
  • It is a premium extension to Portal for ArcGIS with an additional cost.
  • It is a web application and can be accessed through a web browser.
  • You need to have an identity (Username and password) to use it.

Now for some of my favourite features about the app

1. Location is key

In most BI systems, the map card is there just to visualise data. With Insights, you have similar “mapping & visualisation” power as you would in your ArcGIS Online map viewer. This means you can create heatmaps, change symbology, set transparency etc.

In the example below I have added a card that has carjacking data collected at police stations in Gauteng over 10 years. You will note that smart mapping options included in Insights.


Within the card, I could change several things. The attribute field I choose to style my data by, the symbol type as well as the symbol style. With points data, you can also easily create a heatmap.

2. Multiple data sources

The real power of Insights for ArcGIS is that it allows you to pull data from multiple data sources into one dashboard view.

Currently supported data sources are:

  • Web maps and feature services from your organisation portal.
  • The Esri living atlas
  • Databases (SAP HANA, MS SQL, Teradata …tbc)
  • Excel spreadsheets

Insights is only available on Portal for ArcGIS. One of the limitations for now is that you cannot pull data from your ArcGIS Online organisational account into a card. This may well be on the future development path of the product. We will have to wait and see.

3. Document, share and re-run workflows

This is one of my favourite features on this app. Insights gives you the ability to document and share your analysis workflow with other users.

Remember model builder from ArcGIS Desktop? Insights has a similar tool. The only difference is that the workflow gets created for you. Below are 4 cards with different visualisations, analysing crime in September 2016 around the Johannesburg area.

As you create your visualisations, all your steps are being recorded in the background. You can switch to workflow view to see your workflows. The workflows can be shared and re-run. There is an update button that gives you the option to update the model. Here you can replace data and click update. When you switch to Page view this will then update the graphs and chart on your cards.


 4. Questions that guide your spatial analysis workflows

As I was doing my analysis, I noticed a button at the bottom of my active card. It’s called an action button, circled in red in the image below this tool makes spatial analysis easy. The tool asks a geographical question, and uses geoprocessing tools to then answer the questions. This puts geoprocessing tools in easy to understand everyday language.

Picture3.png5. Easy to use

What I love the most about Insights is the ease of use. I love the fact that tools and functionality are contextual. It’s very modern and uncluttered and has this drag and drop functionality that makes all analysis easy because it suggests tools as you pick data.

In conclusion, we live in an era where timely business information is critical to success. For a lot of our clients, ArcGIS is the system of record and business critical to their operations. Insights for ArcGIS offers a configurable BI tool specifically adapted to combine Esri’s spatial analysis platform with other record systems in your operation.

How does one get access to Insights for ArcGIS? You will need to have ArcGIS Enterprise licensed and installed on your premises. For more information regarding licensing and prices do not hesitate to contact your account manager.



Monitor your assets in real time

As part of the ArcGIS Platform, the GeoEvent Extension for Server enables real time data processing and works seamlessly with your other ArcGIS software. Several of our clients have a need to monitor their business data in real time, and need to track their vehicles / assets to ensure all business processes run smoothly. ArcGIS GeoEvent Extension for Server enables an organisation to filter and process their event data in real-time and this allows them to connect and view virtually any type of streaming data from their device or office.

Setting up the GeoEvent Extension for ArcGIS Server can be tricky and in this blog we hope to cover all the necessary steps to make it work. We have implemented GeoEvent Extension for Server mostly at organisations that need to view the near real time location of their vehicles – consuming telematics data. In our example the data we are using has the following records:

  • vehicle id
  • event time
  • ignition on or off
  • speed of vehicle (km/hr)
  • g-force data

One of the requirements is to send out notifications to both the delivery service manager and to the delivery recipient. Three types of notifications are required for this scenario:

  • when vehicle enters a dangerous zone (e.g. a known hijacking zone)
  • when vehicle is driving above the speed limit
  • when driver is within 5 km of the location where the parcel is being delivered

The driver behaviour warnings are sent to the delivery service manager, while the delivery recipient is notified that the driver is close to delivery.

  1. Create an empty feature class in an enterprise database using the schema of the csv file.

You can download the xlsx file and convert it to csv.

Note: use the coordinates in the csv file to create the feature class and delete all the records using the truncate tool.

2. Create a zoning / geofences feature class in the enterprise geodatabase.

Note: create domains in the geodatabase for the type of zone e.g. Dangerous / Buffer; and style the data accordingly.

3. Publish a map service to ArcGIS Server.

Note: feature access must be enabled (both datasets must be from the same enterprise geodatabase).

2 feature access

4. Import the GeoEvent Definitions using the ArcGIS Server feature service.

Note: Make sure the ArcGIS Server or Portal is registered with GeoEvent Server. Use the tracking layer (step 1).

3 register server5. Import the GeoFences and create GeoFence Synchronization Rules using the ArcGIS server feature service.

Note: Use the zoning / geofences layer (step 2).

4 geofence

5 geofence sync


6. Add and configure the csv file as an input service.

Note: use the Receive Text from a TCP Socket for the Input Connector. The Server Port must match the port that will be used in the simulator.

6 tcp text in

7. Add and configure the tracking layer feature service as an output service.

Note: use the Add a Feature for the Output Connector.

7 car fs out

8. Various notifications can be created to inform the delivery service manager or the delivery recipient. In this example Send an Email was used as an Output Connector.

Note: Access to an SMTP server is required – contact your system administrator for help with this, or you can use gmail for testing purposes.

8 email buffer

9. Create and Publish a GeoEvent Service to connect your inputs (step 6) to the various outputs (step 7 & 8).

Note: txt-to-car is a processor; speed, buffer-zones and dangerous-zones are all filters.

9 geoevent service

txt-to-car:10 txt to car

speed:11 speed

buffer-zones:12 buffer zones

dangerous-zones:13 dangerous zones

10. Upload the csv file in GeoEvent Simulator.

14 load from file

11. Connect to the server and port (step 6). Set all the other settings and play the simulator.

15 simulator

The results can be viewed in a web map or application (Portal) or desktop. Notifications will be received as zones are reached or when the vehicle is speeding.

16 web map

Use the 11 steps above to set up your GeoEvent Extension for Server. The data can now be viewed in a web map from virtually any device.