Spatial Analytics with ArcGIS - Eric Pimpler - E-Book

Spatial Analytics with ArcGIS E-Book

Eric Pimpler

0,0
39,59 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

Spatial statistics has the potential to provide insight that is not otherwise available through traditional GIS tools. This book is designed to introduce you to the use of spatial statistics so you can solve complex geographic analysis.

The book begins by introducing you to the many spatial statistics tools available in ArcGIS. You will learn how to analyze patterns, map clusters, and model spatial relationships with these tools. Further on, you will explore how to extend the spatial statistics tools currently available in ArcGIS, and use the R programming language to create custom tools in ArcGIS through the ArcGIS Bridge using real-world examples.

At the end of the book, you will be presented with two exciting case studies where you will be able to practically apply all your learning to analyze and gain insights into real estate data.

Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:

EPUB
MOBI

Seitenzahl: 217

Veröffentlichungsjahr: 2017

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Title Page

Spatial Analytics with ArcGIS 
Use the spatial statistics tools provided by ArcGIS and build your own to perform complex geographic analysis
Eric Pimpler

BIRMINGHAM - MUMBAI

Copyright

Spatial Analytics with ArcGIS

Copyright © 2017 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

First published: April 2017

Production reference: 1200417

Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham 
B3 2PB, UK.

ISBN 978-1-78712-258-1

www.packtpub.com

Credits

Author

Eric Pimpler

Copy Editor

Pranjali Chury

Reviewer

Ken Doman

Project Coordinator

Vaidehi Sawant

Commissioning Editor

Aaron Lazar

Proofreader

Safis Editing

Acquisition Editor

Vinay Argekar

Indexer

Mariammal Chettiyar

ContentDevelopmentEditor

Zeeyan Pinheiro

Graphics

Abhinash Sahu

Technical Editor

Vibhuti Gawde

Production Coordinator

Aparna Bhagat

  

About the Author

Eric Pimpler is the founder and owner of GeoSpatial Training Services (geospatialtraining.com) and has over 20 years of, experience implementing and teaching GIS solutions using open source technology, ESRI and Google Earth/Maps. Currently, he focuses on ArcGIS scripting with Python and the development of custom ArcGIS Server web and mobile applications using JavaScript.

Eric has a bachelor’s degree in geography from Texas A&M University and a master's degree in applied geography with a concentration in GIS from Texas State University.

Eric is the author of Programming ArcGIS with Python Cookbook (https://www.packtpub.com/application-development/programming-arcgis-python-cookbook-second-edition), first and second edition, Building Web (https://www.packtpub.com/application-development/building-web-and-mobile-arcgis-server-applications-javascript) and Mobile ArcGIS Server Applications with JavaScript, and ArcGIS Blueprints (https://www.packtpub.com/application-development/arcgis-blueprints), all by Packt Publishing.

About the Reviewer

Ken Doman is a senior frontend engineer at GEO Jobe, a software development company and ESRI business partner that helps public sector organizations and private sector businesses get the most out of geospatial solutions. Ken has worked with web and geospatial solutions for local and county government, and private industry for over 9 years.

Ken is the author of Mastering ArcGIS Server Development with JavaScript. He has also reviewed several books for Packt Publishing, including Building Web and Mobile ArcGIS Server Applications with JavaScript by Eric Pimpler and ArcGIS for Desktop Cookbook by Daniela Christiana Docan.

I'd like to thank my wife for putting up with the late nights while I reviewed books and videos. I would also like to thank GEO Jobe and all my previous employers, Bruce Harris and Associates, City of Plantation, Florida, and the City of Jacksonville, Texas. You all gave me opportunities to learn and work in a career that I enjoy. I would like to thank Packt Publishing, who found me when I was a simple blogger and social media junkie, and let me have a place to make a positive impact in GIS. Finally, I would like to thank the one from whom all blessings flow.

www.PacktPub.com

For support files and downloads related to your book, please visit www.PacktPub.com.

Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details.

At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.

https://www.packtpub.com/mapt

Get the most in-demand software skills with Mapt. Mapt gives you full access to all Packt books and video courses, as well as industry-leading tools to help you plan your personal development and advance your career.

Why subscribe?

Fully searchable across every book published by Packt

Copy and paste, print, and bookmark content

On demand and accessible via a web browser

Customer Feedback

Thanks for purchasing this Packt book. At Packt, quality is at the heart of our editorial process. To help us improve, please leave us an honest review on this book's Amazon page at https://www.amazon.com/dp/1787122581.

If you'd like to join our team of regular reviewers, you can e-mail us at [email protected]. We award our regular reviewers with free eBooks and videos in exchange for their valuable feedback. Help us be relentless in improving our products!

Table of Contents

Preface

What this book covers

What you need for this book

Who this book is for

Conventions

Reader feedback

Customer support

Downloading the example code

Downloading the color images of this book

Errata

Piracy

Questions

Introduction to Spatial Statistics in ArcGIS and R

Introduction to spatial statistics

An overview of the Spatial Statistics Tools toolbox in ArcGIS

The Measuring Geographic Distributions toolset

The Analyzing Patterns toolset

The Mapping Clusters toolset

The Modeling Spatial Relationships toolset

Integrating R with ArcGIS

Summary

Measuring Geographic Distributions with ArcGIS Tools

Measuring geographic centrality

Preparation

Running the Central Feature tool

Running the Mean Center tool

Running the Median Center tool

The Standard Distance and Directional Distribution tools

Preparation

Running the Standard Distance tool

Running the Directional Distribution tool

Summary

Analyzing Patterns with ArcGIS Tools

The Analyzing Patterns toolset

Understanding the null hypothesis

P-values

Z-scores and standard deviation

Using the Average Nearest Neighbor tool

Preparation

Running the Average Nearest Neighbor tool

Examining the HTML report

Using Spatial Autocorrelation to analyze patterns

Preparation

Running the Spatial Autocorrelation tool

Examining the HTML report

Using the Multi-Distance Spatial Cluster Analysis tool to determine clustering or dispersion

Preparation

Running the Multi-Distance Spatial Cluster Analysis tool

Examining the output

Summary

Mapping Clusters with ArcGIS Tools

Using the Similarity Search tool

Preparation

Running the Similarity Search tool

Interpreting the results

Using the Grouping Analysis tool

Preparation

Running the Grouping Analysis tool

Interpreting the results

Analysing real estate sales with the Hot Spot Analysis tool

Explanation

Preparation

Running the Hot Spot Analysis tool

Using the Optimized Hot Spot Analysis tool in real estate sales

Preparation

Running the Optimized Hot Spot Analysis tool

Interpreting the results

Creating Hot Spot maps from point data using the Optimized Hot Spot Analysis tool

Preparation

Running the Optimized Hot Spot Analysis tool

Finding outliers in real estate sales activity using the Cluster and Outlier Analysis tool

Preparation

Running the Cluster and Outlier Analysis tool

Interpreting the results

Summary

Modeling Spatial Relationships with ArcGIS Tools

The basics of Regression Analysis

Why use Regression Analysis?

Regression Analysis terms and concepts

Linear regression with the Ordinary Least Squares (OLS) tool

Running the Ordinary Least Squares tool

Examining the output generated by the tool

Using the Exploratory Regression tool

Running the Exploratory Regression tool

Examining the output generated by the tool

Using the Geographically Weighted Regression tool

Running the Geographically Weighted Regression tool

Examining the output generated by the tool

Summary

Working with the Utilities Toolset

The Calculate Distance Band from Neighbor Count tool

Running the Calculate Distance Band from Neighbor Count tool

Using the maximum distance as the distance band in the Hot Spot Analysis tool

The Collect Events tool

Data preparation

Executing the Collect Events tool

Using the Collect Events results in the Hot Spot Analysis tool

The Export Feature Attribute to ASCII tool

Exporting a feature class

Summary

Introduction to the R Programming Language

Installing R and the R interface

Variables and assignment

R data types

Vectors

Matrices

Data frames

Factors

Lists

Reading, writing, loading, and saving data

Additional R study options

Summary

Creating Custom ArcGIS Tools with ArcGIS Bridge and R

Installing the R-ArcGIS Bridge package

Building custom ArcGIS tools with R

Introduction to the arcgisbinding package

The arcgisbinding package functionality - checking for licenses

The arcgisbinding package functionality - accessing ArcGIS format data

The arcgisbinding package functionality - shape classes

The arcgisbinding package functionality - progress bar

Introduction to custom script tools in ArcGIS

The tool_exec() function

Creating the custom toolbox and tool

Exercise - creating a custom ArcGIS script tool with R

Summary

Application of Spatial Statistics to Crime Analysis

Obtaining the crime dataset

Data preparation

Getting descriptive spatial statistics about the crime dataset

Using the Analyzing Patterns tool in the crime dataset

Using the Mapping Clusters tool in vehicle theft data

Modeling vehicle theft with Regression Analysis

Data preparation

Spatial Statistical Analysis

Summary

Application of Spatial Statistics to Real Estate Analysis

Obtaining the Zillow real estate datasets

Data preparation

Finding similar neighborhoods

The Similarity Search tool

The Grouping Analysis tool

Finding areas of high real estate sales activity

Running the Hot Spot Analysis tool

Recommendations for the client

Summary

Preface

The Spatial Statistics toolbox in ArcGIS contains a set of tools for analyzing spatial distributions, patterns, processes, and relationships. While similar to traditional statistics, spatial statistics are a unique set of analyses that incorporate geography. These tools can be used with all license levels of ArcGIS Desktop and are a unique way of exploring the spatial relationships inherent in your data. In addition to using ArcBridge, the R programming language can now be used with ArcGIS Desktop to provide customized statistical analysis and tools.

Spatial Analytics in ArcGIS begins with an introduction to the field of spatial statistics. After this brief introduction ,we’ll examine increasingly complex spatial statistics tools. We’ll start by covering the tools found in the Measuring Geographic Distributions toolset, which provide descriptive spatial statistical information. Next, the Analyzing Patterns toolset will teach the reader how to evaluate datasets for clustering, dispersion, or random patterns. As we move on, you will also be introduced to much more advanced and interesting spatial statistical analysis, including hot spot analysis, similarity search, and least squares regression among others.

After an exhaustive look at the Spatial Statistics Tools toolbox, you will be introduced to the R programming language and you'll learn how to use ArcGIS Bridge to create custom R tools in ArcGIS Desktop.

In the final two chapters of the book, you’ll apply the new skills you’ve learned in the book to solve case studies. The first case study will apply spatial statistics tools and the R programming language to the analysis of crime data. The final chapter of the book will introduce you to the application of spatial statistics to the analysis of real estate data.

What this book covers

Chapter 1, Introduction to Spatial Statistics in ArcGIS and R, contains an introduction to spatial statistics, an overview to the Spatial Statistics Tools toolbox in ArcGIS, and an introduction to R and the R-ArcGIS Bridge.

Chapter 2, Measuring Geographic Distributions with ArcGIs Tools, covers the basic descriptive spatial statistics tools available through the Spatial Statistics Tools toolset, including the Mean and Median Feature, Central Feature, Linear Directional Distribution, Standard Distribution, and Directional Distribution tools.

Chapter 3, Analyzing Patterns with ArcGIS Tools, covers tools that evaluate whether features or the values associated with features form clustered, dispersed, or random spatial patterns. They also define the degree of clustering.  These are inferential statistics that define the probability of how confident we are that the pattern is dispersed or clustered.  The output is a single result for the entire dataset. Tools covered in this chapter include Average Nearest Neighbor, High/Low Clustering, Spatial Autocorrelation, Multi-Distance Spatial Cluster Analysis, and Spatial Autocorrelation.

Chapter 4, Mapping Clusters with ArcGIS Tools, covers the use of various clustering tools. Clustering tools are used to answer not only the question of Is there clustering? and Where is the clustering? but also Is the Clustering Statistically Significant? Tools covered in this chapter include Cluster and Outlier Analysis, Grouping Analysis, Hot Spot Analysis, Optimized Hot Spot Analysis, and Similarity Search.

Chapter 5, Modeling Spatial Relationships with ArcGIS Tools, shows how beyond analyzing spatial patterns, GIS analysis can be used to examine or quantify relationships among features. The Modeling Spatial Relationships tools construct spatial weights matrices or model spatial relationships using regression analyses. Tools covered in this chapter include Ordinary Least Squares (OLS), Geographically Weighted Regression, and Exploratory Regression.

Chapter 6, Working with the Utilities Toolset, covers the utility scripts that perform a variety of data conversion tasks. These tools can be used in conjunction with other tools in the Spatial Statistics Tools toolbox. Tools covered in this chapter include Calculate Areas, Calculate Distance Band from Neighbor Count, Collect Events, and Export Feature Attribute to ASCI.

Chapter 7, Introduction to the R Programming Language, covers the basics of the R programming language for performing spatial statistical programming. You will learn how to create variables and assign data to variables, create and use functions, work with data types and data classes, read and write data, load spatial data, and create basic plots.

Chapter 8, Creating Custom ArcGIS Tools with the ArcGIS Bridgeand R, covers the R-ArcGIS Bridge, which is a free, open source package that connects ArcGIS and R. Using the Bridge allows developers to create custom tools and toolboxes in ArcGIS that integrate R with ArcGIS to build spatial statistical tools. In this chapter, you will learn how to install the R-ArcGIS Bridge and build custom ArcGIS Tools using R.

Chapter 9, Application of Spatial Statistics to Crime Analysis, shows you how to apply the Spatial Statistics tools and R programming language to the analysis of crime data.  After finding and downloading a crime dataset for a major U.S. city, you will perform a variety of spatial analysis techniques using ArcGIS and R.

Chapter 10, Application of Spatial Statistics to Real Estate Analysis,  teaches you how to apply the Spatial Statistics tools and R programming language to the analysis of real estate data.  After downloading a real estate dataset for a major U.S. city, you will perform a variety of spatial analysis techniques.

What you need for this book

To complete the exercises in this book, you will need to have installed ArcGIS for Desktop 10.2 or higher with the Basic, Standard, or Advanced license level. We recommend that you use ArcGIS Desktop 10.4 or 10.5. In addition to this, you will also need to install R. Instructions for installing R are provided in Chapter 7, Introduction to the R Programming Language.

Who this book is for

Spatial Analytics with ArcGIS is written for intermediate to advanced level GIS professionals who want to use spatial statistics to resolve complex geographic questions.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book-what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of. To send us general feedback, simply e-mail [email protected], and mention the book's title in the subject of your message. If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for this book from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

You can download the code files by following these steps:

Log in or register to our website using your e-mail address and password.

Hover the mouse pointer on the

SUPPORT

tab at the top.

Click on

Code Downloads & Errata

.

Enter the name of the book in the

Search

box.

Select the book for which you're looking to download the code files.

Choose from the drop-down menu where you purchased this book from.

Click on

Code Download

.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

WinRAR / 7-Zip for Windows

Zipeg / iZip / UnRarX for Mac

7-Zip / PeaZip for Linux

The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Spatial-Analytics-with-ArcGIS. We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Downloading the color images of this book

We also provide you with a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output. You can download this file from http://www.packtpub.com/sites/default/files/downloads/SpatialAnalyticswithArcGIS_ColorImages.pdf.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books-maybe a mistake in the text or the code-we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at [email protected] with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at [email protected], and we will do our best to address the problem.

Introduction to Spatial Statistics in ArcGIS and R

Spatial statistics are a set of exploratory techniques for describing and modeling spatial distributions, patterns, processes, and relationships. Although spatial statistics are similar to traditional statistics, they also integrate spatial relationships into the calculations. In spatial statistics, proximity is important. Things that are closer together are more related.

ArcGIS includes the Spatial Statistics Tools toolbox available for all license levels of its desktop software. Included with this toolbox are a number of toolsets that help analyze spatial distributions, patterns, clustering, and relationships in GIS datasets. This book will cover each of the toolsets provided with the Spatial Statistics Tools toolbox in ArcGIS to provide a comprehensive survey of the spatial statistics tools available to ArcGIS users.

The R platform for data analysis is a programming language and software platform for statistical computing and graphics, and it is supported by the R Foundation for Statistical Computing. The R language is widely used among statisticians and data analysts for developing statistical software and data analysis. In addition, R can be used for spatial statistical analysis and can also be integrated with ArcGIS through the R-ArcGIS Bridge.

This book also contains an introductory chapter for the R programming language as well as a chapter that covers the installation of the R-ArcGIS Bridge and the creation of custom ArcGIS script tools written with R.

In this chapter, we will cover the following topics:

Introduction to spatial statistics

An overview of the Spatial Statistics Tools toolbox in ArcGIS

An overview of the integration between R and ArcGIS

Introduction to spatial statistics

Let's start with a definition of spatial statistics. The GIS dictionary (http://gisgeography.com/gis-dictionary-definition-glossary/) defines spatial statistics as the field of study concerning statistical methods that use space and spatial relationships (such as distance, area, volume, length, height, orientation, centrality, and/or other spatial characteristics of data) directly in their mathematical computations. Spatial statistics are used for a variety of different types of analyses, including pattern analysis, shape analysis, surface modeling and surface prediction, spatial regression, statistical comparisons of spatial datasets, statistical modeling and prediction of spatial interaction, and more. The many types of spatial statistics include descriptive, inferential, exploratory, geostatistical, and econometric statistics.

Spatial statistics are applicable across a wide range of environmental disciplines, including agriculture, geology, soil science, hydrology, ecology, oceanography, forestry, meteorology, and climatology, among others. Many socio-economic disciplines including epidemiology, crime analysis, real estate, planning, and others also benefit from spatial statistical analysis.

Spatial statistics can give answers to the following questions:

How are the features distributed?

What is the pattern created by the features?

Which are the clusters?

How do patterns and clusters of different variables compare to one another?

What is the relationship between sets of features or values?

An overview of the Spatial Statistics Tools toolbox in ArcGIS

The ArcGIS Spatial Statistics Tools toolbox is available for all license levels of ArcGIS Desktop, including basic, standard, and advanced. The toolbox includes a number of toolsets, which are as follows:

The

Analyzing Patterns

toolset

The

Mapping Clusters

toolset

The

Measuring Geographic Distributions

toolset

The

Modeling Spatial Relationships

toolset

The Measuring Geographic Distributions toolset

The Measuring Geographic Distributions toolset in the Spatial Statistics Tools toolbox contains a set of tools that provide descriptive geographic statistics, including the Central Feature, Directional Distribution, Linear Directional Mean, Mean Center, Median Center, and Standard Distance tools. Together, this toolset provides a set of basic statistical exploration tools. These basic descriptive statistics are used only as a starting point in the analysis process. The following screenshot displays the output from the Directional Distribution tool for an analysis of crime data:

The Central Feature, Mean Center, and Median Center tools all provide similar functionality. Each creates a feature class containing a single feature that represents the centrality of a geographic dataset.

The Linear Directional Mean tool identifies the mean direction, length, and geographic center for a set of lines. The output of this tool is a feature class with a single linear feature.

The Standard Distance and Directional Distribution tools are similar, in that they both measure the degree to which features are concentrated or dispersed around the geometric center, but the Directional Distribution tool, also known as the Standard Deviational Ellipse, is superior as it also provides a measure of directionality in the dataset.

The Analyzing Patterns toolset

The Analyzing Patterns toolset in the Spatial Statistics Tools toolbox contains a series of tools that help evaluate whether features or the values associated with features form a clustered, dispersed, or random spatial pattern. These tools generate a single result for the entire dataset in question. In addition, the result does not take the form of a map, but rather statistical output, as shown in the following screenshot:

Tools in this category generate what is known as inferential statistics or the probability of how confident we are that the pattern is either dispersed or clustered. Let's examine the following tools found in the Analyzing Patterns toolset:

Average Nearest Neighbor