Case Study 4.1 (M)
LECTURE 5: Customization and Python Scripting
2
GIS Customization
• Interface
• Toolbars
• Operations
• Commands
• Context
3
Python
•Free •cross-platform •open-source programming language
•Powerful
4
Python. Basic Rules • Code runs in a linear fashion – from top to bottom
• Includes variables, which can contain a variety of data types (numbers, strings, lists, and objects with properties);
• Variables types DO NOT need to be declared - Python determines type based on input
• Variables Names are case sensitive – “MyFeatureClass”;
• Either single or double quotation marks CAN be used to create string-type variables;
• Indentation IS IMPORTANT. Indenting is a way to group tools and operations to a set of code within your script, such as a code block associated with an IF or WHILE statement.
Indentations are typically Two or FOUR spaces (you can use tabs, too)
5
Python. Example
• streetName = “Candy Lanes”
• addressNumber = 313
• percentOccupied = 45.35
• ownerName = “Brown, Charles”
Names are Camel Case
6
Python. Example
• Practice!
7
PRACTICAL GIS PROJECT - 1 PROJECT Layout:
Title/Cover Page 1) Introduction (or Executive Summary)
2) ABOUT your GIS Project o Goals and Objectives. What will you analyze? o Data (where did you get it from, what type of attributive and spatial data (vector or raster-based or
both); troubles & challenges to get, convert, transfer, download, etc.;
3) GIS analysis that you have done o Steps o What type of analysis and why o Maps to demonstrate each type of GIS analysis/operation
4) RESULTS & Conclusion. What did you prove/get?
5) Future Strategy. Final thoughts – what can be done to enhance the outcome, what else can be analyzed to make better prediction, etc.
ALSO, Design and Be READY with Power Point presentation! (see next slide)
PRACTICAL GIS PROJECT - 1 PROJECT Layout:
Problem definition and solution approach Submit a short introduction that includes the following: • Clearly stated problem, opportunity, issue, or objective • Approach to the solution • Scope or limitations of the project
Data Describe the following as relates to the project data: • Inputs to the project and data sources • Computer folder, subfolders, and file structure for the project
Methodology Include a high-level description of the methodologies used and include the following: • Outline of steps for data preparation • Outline of steps for constructing GIS data • Outline of steps for spatial analysis
Results Present and discuss output maps and tables and also summarize the results or findings of the case study by preparing the following: • Professional-quality map layouts and statistical tables of results • Short descriptions of the results, referring to figure and table numbers Discussion and future work Provide interpretation of the results, recommendations, and suggestions for future work that could be done to remove limitations or expand the scope of analysis.
9
PRACTICAL GIS PROJECT - 2 1) Think and figure out – what will you analyze and use GIS (spatial analysis) for?
Use Internet to give you some thoughts about GIS applications, GIS projects, etc. Google on “GIS Projects” or “GIS Applications” to get some ideas
2) Use available data sources (on Moodle): 1) www.esri.com (they have over 50 different layers for the US, also World) 2) DC Atlas – lots of lyr. For DC area 3) Fairfax County 4) Falls Church data 5) Our GIS Exercise data – US, Canada, etc.
3) When doing GIS Analysis be creative – don’t stick with one type of analysis. Do Selection, Join (to get a Distance field), buffer, clip, maybe merge or dissolve. In a paper and during the presentation – TALK about it!
4) Spend some time to create a nice Final Layout (map with legend, scale bar, compass, special symbols, colors, etc).
5) Export maps and insert them into Power Point. BUT make the slides look nice (with titles, a few MAJOR sentences together with an inserted map)
6) DON’T READ the slides when presenting. TALK it through! PRACTICE TALKING through slides!!!
7) End presentation with RESULTS and thoughts how GIS enhances our abilities. DEMONSTRATE GIS Power! Also, talk about the future (maybe advising where to get money for completing/doing this Project in real life)
POTENTIAL PROJECTS
• Enhancing Real Estate Application Abbasi
• Ebola Crisis Rhaba
• City of Alexandria Project 1. Pedestrian Network Anita
2. Service Requests Saad
• Small Businesses Growth Viktoriya
• Fairfax Co. Public Health AnalysisKhaleed
• ACCT Admission Package Sara
• Oil/Gas Faustin
• Media & News Nabeel
Let’s Practice