Click here to load reader

Harnessing Python

  • View

  • Download

Embed Size (px)


2013 Esri International User Conference Lightning Talk

Text of Harnessing Python

  • 1.Harnessing Python Blue Raster @blueraster - Brendan Collins @brendancol -

2. Gui do van Rossum | Cr eat or of Pyt hon | Benevol ent Di ct at or f or Li f e 3. Pr ogr ammi ng f or ever ybody Designed as a teaching language Heavily influenced by ABC (dead language) Perfect language for beginners and non- programmers Adopted by MIT as primary course language Integrated into ArcGIS Suite in the 9.x series Matured nicely in ArcGIS 10.x series 4. You Al r eady Use Pyt hon 5. Hello C# using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace { class Hello { static void Main() { System.Console.WriteLine( Hello C#! ); } } } 6. print Hello Python! 7. open(C:fileName.txt, r) 8. Visit documentation 9. 8. A language for all seasons Object-oriented; functional; procedural Desktop; Web; Mobile; 10. School Boundaries Geodatabase US Department of Education Effort to collect every school attendance polygon in the country Using Python for: Fuzzy joining of attributes (fuzzy wuzzy library) Standardizing boundary geometry (arcpy) QA/QC (arcpy) 11. Emammal Smithsonian Institute Tool to assist citizen scientists collect and analyze wildlife photo Uses Python to combine: EXIF metadata read/write (exiftool) Thumbnail generation (PIL) Database connections (django) Amazon Web Services (boto) 12. Spatial Data Repository Measure DHS / USAID Tool to dynamically create compressed, downloadable packages of spatial data Use Python for: Fancy clip, zip, ship (arcpy) Automation of ArcGIS tools (arcpy) Enrichment with using legacy database. (urllib2) Published as Geoprocessing Service (ArcGIS Server) 13. In conclusion If you work with data, work w/Python Esris arcpy library has matured: data access module is fast Python toolboxes rock Python Resources: Core Python by Wesley Chun Follow @pypi on twitter! 14. Thank You. Visit us at! Blue Raster @blueraster - Brendan Collins @brendancol -