One of the great things about our ArcGIS Runtime SDK for Qt is that we provide an API that seamlessly plugs into a rich framework that is platform agnostic and has nearly endless possibilities for what you can create. This allows you to bring the power of location and ArcGIS into larger projects that take full advantage of the framework and its multitude of APIs and plug-ins. One of my favorite modules from the Qt Framework is called Qt Charts, which is an enterprise add-in that allows you to easily create visually appealing charts and graphs. These charts and graphs, coupled with beautifully designed maps from ArcGIS, allow you to create data exploration tools and infographics that are extremely valuable when trying to tell a story about your data.
As an example, I created a data exploration tool for Los Angeles County. I wanted to explore how demographics, crime rates, and income were related in the LA Area. To do this, I used the Esri data and maps block group level demographic data, along with some CSV crime data from the LA County Sheriff’s Department over the last 30 days. Using some analysis tools in ArcMap, I was able to quickly aggregate the data by block group, and publish it as a feature service to ArcGIS Online. Now to the fun part – writing code!
I envisioned my app as an interactive tool for a user to explore the map and obtain summarized data as they navigated to new areas of the map. To do this, the user clicks on the map, and a buffer around that point is created using the geometry engine that is built-in to the Runtime API. This buffer acts as a cookie cutter, and all of the demographic and crime data for blocks that intersect with the buffer is summarized quickly and represented on the graphs. Here is my QML code for listening for a mouseClicked() signal from the map, and creating the buffer and graphic.
The coding was straightforward, and revolved largely around executing Query Tasks against the Feature Service, and feeding the results to the different elements in the charts. The Query Tasks takes advantage of a concept called Out Statistics, which allows you to specify a field and a statistic type. Instead of returning all of the features inside of your input geometry, Out Statistics will return one feature with all of your summarized statistics. Here is an example of the code written in QML.
Once the Query task completes, the data is fed into some bar and pie charts for easy data visualization.
Finally, all of this is overlaid on an Esri-provided Median Household income dynamic map service. I chose this specific dynamic map so the user can see trends and correlations between the demographic, income, and crime related data. Here is what the final product looks like.
This project can be found on ArcGIS Online, so please feel free to download the source code and explore the application on your own. If you’re interested in the ArcGIS Runtime SDK for Qt and haven’t already downloaded and started developing, please visit the Developers Page or visit us on GeoNet to learn more.