Geog 375 Individual Final Programming Project: Automated Thematic Maps

Slides:



Advertisements
Similar presentations
NW Mapbook Application ftp.esri.com, login: nwmapbook password: nwma1456 ftp.esri.com April 18, 2006.
Advertisements

Creating Map Books ArcMap 10 Data Driven Pages
Why python? Automate processes Batch programming Faster Open source Easy recognition of errors Good for data management What is python? Scripting programming.
Annotation & Nomenclature By Corey Fortezzo for PG&G GIS Workshop, 2010.
Geodatabase basic. The geodatabase The geodatabase is a collection of geographic datasets of various types used in ArcGIS and managed in either a file.
Map Display Tools Layers (Themes) Adding Layers  Click.
Technical Support: (989) GIS and Mapping Procedures in ArcMap 9.x Creating an ArcMap Project Editing an ArcMap Project Printing an ArcMap Project.
Tuesday Session 2 – Intro to ArcMap Starting Arc Map – Empty Map – Map Template – Project Data View – Display – Source – Selection Layout View – Draft.
School of Geography FACULTY OF ENVIRONMENT Using ArcMap 1.
Layouts: Creating maps and figures using ArcMap 1 GIS for Planetary Mappers June 2012, Planetary Mappers Meeting.
Introduction To ArcMap ArcMa p. ArcMap is a Map-centric GUI tool used to perform map-based tasks Mapping –Create maps by working geographically and interactively.
Introduction to ArcGIS for Environmental Scientists Module 2 – Fundamentals Lecture 6 – Table Functions.
ArcGIS Overview Lecture 1: Software Layer characteristics Thematic maps.
Technical Workshops | Esri International User Conference San Diego, California ArcMap: Tips and Tricks Miriam Schmidts Jorge Ruiz-Valdepena July 23 – 27,
Working with cursors in Python GISDE Python Workshop Qiao Li.
1/36. 2/36 Something cool …
Python Map Automation: Introduction to arcpy.mapping / arcpy.mp
Geodetic Institute of Slovenia Map presentations of data collection for the indicators 4th National Stakeholder involvement workshop Anita Ipša, Vesna.
Best Practices for Designing Effective Map Services Tanu Hoque.
Data Visualization Francisco Olivera, Ph.D., P.E. Srikanth Koka Department of Civil Engineering Texas A&M University.
La Plata, MD | Virginia | South Carolina | Washington, DC Automating Quicklook Products for Emergent Events using Python.
MXD, Maps, Layers arcpy.mapping Classes.
Esri UC 2014 | Technical Workshop | Python Map Automation – Beyond the Basics of arcpy.mapping Jeff Barrette Jeff Moulds.
Return to Outline Copyright © 2011 by Maribeth H. Price 3-1 Labeling and annotation.
Module 4: Creating a Quick Map Sarah Hartsburg GIS Tech, Contractor for NPS Fire GIS
Desktop Mapping: Building Map Books Jeff Barrette Michael Grossman.
Juanita Cano City of Sacramento Spring 2014 Geography 375.
Esri UC2013. Technical Workshop. Technical Workshop 2013 Esri International User Conference July 8–12, 2013 | San Diego, California Python Map Automation.
Esri UC 2014 | Technical Workshop | Python Map Automation – Introduction to arcpy.mapping Michael Grossman Jeff Barrette.
Learning the Basics of ArcMap 3.3 Updated 4/27/2010 Using Arc/View pt. 1 1.
Introduction to GIS Programming Final Project Submitted by Todd Lenkin Geography 375 Spring of 2011 American River College.
Using ArcGIS Layout View
Release Numbers MATLAB is updated regularly
Lecture 3 Interacting with Data.
Desktop Mapping: Building Map Books
Lab 1 Introduction to ArcGIS Feb 17, 2016
Creating LOVs and Editors
Improving Georeferencing Workflow with Python
Geography 385 Introduction to ArcGIS Web Application Design
Hazards Planning and Risk Management INTRODUCTION TO ARCGIS
Cartography and Labeling
Hazards Planning and Risk Management INTRODUCTION TO ARCGIS
Unit Six: Labels In this unit… Review Adding Text to Maps
String several geoprocessing processes
Preliminaries: -- vector, raster, shapefiles, feature classes.
Geography 375 Introduction to Python May 15, 2015
Python I/O.
File Handling Programming Guides.
This presentation has been prepared by Vault Intelligence Limited (“Vault") and is intended for off line demonstration, presentation and educational purposes.
Authoring a FieldPro Map
Map Design March 9, 2016 RS & GISc, Institute of Space Technology
Learning the Basics of ArcMap 3.3 Updated 4/27/2010
Introduction To ArcMap
Using the QGIS Layout Manager to create
Building Map Books in ArcGIS
What is it and how do you build one?
Using the Online Compare Tool
Building Map Books in ArcGIS
Exploring Microsoft® Office 2016 Series Editor Mary Anne Poatsy
The Use of Looping Code in Map Production
Virginia Lenvik Geography 375 Spring 2013
Processing of NOAA Precipitation Data and Thematic Map Generation
Identifying Hot Spots for Substance User Disorder (SUD) Treatment-Eligible Populations in Los Angeles County, 2015 Ricardo A Contreras, MPH, MA. Geography.
Clip, Merge, Cluster, and Repeat
Shawn Stiver ARC Fall Semester, 2016 Geography 385 GIS For The Web
Automating Student Yield Data Extraction
Final Project Geog 375 Daniel Hewitt.
Zoning Map Modernization with GIS
GEO 481 Lab Geographical Information Systems Spring 2019
Desktop Mapping: Building Map Books
Presentation transcript:

Geog 375 Individual Final Programming Project: Automated Thematic Maps Courtney Runyan Spring 2017

Purpose The goal of this project was to take a time consuming task, creating a series of thematic maps with different themes, and automate it in a way that takes less time but still produces a finished map. To do this, the project cycles through each layer, then cycles through each smaller region in that layer, to publish a pdf file. Each finished map focuses on one small region and displaying one thematic variable.

Data This example used census data at the block group level for California that was symbolized using three different thematic variables. The layers show population of children 5-17 per capita, the population of people aged 65 and over per capita, and the median age of people in the block group. Block groups where people do not reside were excluded from the dataset. Each map was limited to a single county using a counties layer.

Key Steps Step 1: Defining the thematic layers, creating a “for loop.” Step 2: Defining the layer variable, turning layer visibility on Step 3: Using a search cursor to start another “for loop” Step 4: Performing a definition query on the layer, zooming to extent Step 5: Changing text for each map Step 6: Publishing pdfs, the wrap-up

But First… Prior to coding, map document must be created from the chosen data: Block group polygon layers are added to the map and symbolized according to a theme Background information layers are arranged and labeled Text elements (Title and subtitle) are included and named Legend for each layer is created, stacked on top of each other, and turned on and off with layer.

Step 1: Defining the Thematic Layers, Creating a “for loop.” Arcpy, sys, traceback module are imported arcpy.mapping is imported A few important variables are defined A python list is created with thematic layer names (LayersToExport) A “for loop” is created for each LayerName in the list LayersToExport Required Variables: python list “LayersToExport”

Step 2: Defining the Layer, Turning Layer On Continuing in the for loop, the program finds the correct layer with the ListLayers command, and assigns it to the variable “Layer” Layer is turned on with the .visible command. Effectively, this is like turning on a layer using the TOC in ArcMap Required variables: mxd, dataframe

Step 3: The Search Cursor and Another “for loop” A search cursor finds all attributes in the “NAME” field of the “counties” attribute table. A sorted function is included in case of repeated attributes, so the same county isn’t processed twice. Another for loop iterates through each county in the county name list. Required variables: table, field The “counties” layer attribute table

Step 4: The Definition Query Query statement is defined using the CTrows variable from the search cursor/sorted function Current layer is queried to a single county using definition query dataframe.extent and dataframe.scale zoom to that county, then pan back a bit Layer with definition query “NAME” = ‘Sacramento’

Step 5: Changing Text for Each Map Variable tElements is defined as all text type layout elements using ListLayoutElements command Map title is changed to LayerName (from original python list) Map subtitle is changed to county name plus the year data was published Required variables: mxd (used previously) Map title changed to layer name, subtitle to county name

Step 6: Publishing PDFs, the Wrap-Up PDF folder and name specified using county name and layer name ExportToPDF command publishes PDFs Print statement tells you what layers and counties have been processed/published Layer turned back off so next layer in list is visible del mxd used to remove data lock Print statements

The Final Product Folder of descriptively named PDFs created Each PDF has a completed thematic map focused on one region and displaying one theme.

Conclusion Code takes a just a few minutes to run, which is a huge decrease in time compared to doing all functions by hand, one by one The program worked as intended, the few challenges that arose after the design phase were worked out through research and experimentation. Though the final product is simple, it can be made more complex easily by changing more design elements, etc. Current program both stands on its own and can act as a basic structure for a larger product. Using this program, maps can be not only quickly constructed, but quickly edited in large quantities when data is updated or needs changed.