In this class, you’ll learn how to automate tasks in GIS with computer code We’ll cover: • Basic programming in Python • Getting Python and ArcGIS to play nicely together • Developing your own toolboxes in ArcGIS • Making maps for the web using open-source, free toolkits This is a timely course, for all the wrong reasons…
“Here are 500 polygon shapefiles. Make a single Excel spreadsheet that lists the area of each one.” 3. Can you reproject these 5,000 shapefiles from UTM to Web Mercator, please? 2. Tell me the watershed area of the Animas River, the San Juan River, the Colorado River, Junction Creek, the Dolores River, the San Miguel River, and…actually, just tell me the watershed area of every stream longer than 5 miles in Colorado
“Here are 500 polygon shapefiles. Make a single Excel spreadsheet that lists the area of each one.” 2. Tell me the watershed area of the Animas River, the San Juan River, the Colorado River, Junction Creek, the Dolores River, the San Miguel River, and…actually, just tell me the watershed area of every stream longer than 5 miles in Colorado 3. Can you reproject these 5,000 shapefiles from UTM to Web Mercator, please? EVERY ONE OF THESE THINGS CAN BE DONE IN 15 MINUTES WITH PYTHON
2009 - 2019 Main channel sand mapped with multibeamsonar Riparian sand mapped with total station Channel margin sand mapped with singlebeam sonar Upland sand mapped with remote sensing/field surveys Multibeam Sonar (Channel Bed) Singlebeam Sonar (Eddies) Total Station (Riparian) Remote Sensing/Field Surveys (Uplands)
upon is the ancestral land and territory of the Nuuchiu (Ute) people who were forcibly removed by the United States Government. We also acknowledge that this land is connected to the communal and ceremonial spaces of the Jicarilla Abache (Apache), Pueblos of New Mexico, Hopi Sinom (Hopi), and Diné (Navajo) Nations. It is important to acknowledge this setting because the narratives of the lands in this region have long been told from dominant perspectives, without full recognition of the original land stewards who continue to inhabit and connect with this land. Thank you for your attention and respect in acknowledging this important legacy. "
upon is the ancestral land and territory of the Nuuchiu (Ute) people who were forcibly removed by the United States Government. We also acknowledge that this land is connected to the communal and ceremonial spaces of the Jicarilla Abache (Apache), Pueblos of New Mexico, Hopi Sinom (Hopi), and Diné (Navajo) Nations. It is important to acknowledge this setting because the narratives of the lands in this region have long been told from dominant perspectives, without full recognition of the original land stewards who continue to inhabit and connect with this land. Thank you for your attention and respect in acknowledging this important legacy. " There is no lecture next Monday (9/6); 10 am – 12pm ceremony to remove Clocktower panels
I mean by this? Mainly, that we’re not in high school anymore, and we’re all adults. 1. I’m going to treat you as colleagues, not students • I expect that you’ll put forward your best effort throughout the semester • You can expect that I’ll do the same • You can expect to learn from me, and I’ll expect to learn from you • Yes, college grades are important; no, they’re not more important than actually learning the material
I mean by this? Mainly, that we’re not in high school anymore, and we’re all adults. 1. I’m going to treat you as colleagues, not students • I expect that you’ll put forward your best effort throughout the semester • You can expect that I’ll do the same • You can expect to learn from me, and I’ll expect to learn from you • Yes, college grades are important; no, they’re not more important than actually learning the material 2. We’ll hold each other accountable • I expect that you’ll come to class each meeting • I won’t waste your time in class • I’ll give you the benefit of the doubt if you tell me you need to miss a class or need extra time on an assignment • You don’t need to tell me why, just know what constitutes a valid reason (see syllabus) • …and let me know well in advance • Likewise, if I need to cancel/reschedule/move class online, I’ll let you know well in advance
I mean by this? Mainly, that we’re not in high school anymore, and we’re all adults. 1. I’m going to treat you as colleagues, not students • I expect that you’ll put forward your best effort throughout the semester • You can expect that I’ll do the same • You can expect to learn from me, and I’ll expect to learn from you • Yes, college grades are important; no, they’re not more important than actually learning the material 2. We’ll hold each other accountable • I expect that you’ll come to class each meeting • I won’t waste your time in class • I’ll give you the benefit of the doubt if you tell me you need to miss a class or need extra time on an assignment • You don’t need to tell me why, just know what constitutes a valid reason (see syllabus) • …and let me know well in advance • Likewise, if I need to cancel/reschedule/move class online, I’ll let you know well in advance 3. We’ll be communicative • If you’re struggling/need help with the material, due dates, or are completely overwhelmed, talk to me • In turn, I’ll let you know if I think you could use extra instruction on concepts • There won’t be any surprises at the end of the semester
What you’re studying at FLC 3. Other GIS classes you’ve taken? 4. Any prior experience writing computer code? I’d like to hear from you! How many of you are here… - Because you have to be? - Because you want to be? - Because you’re actually in the wrong class but you don’t want to just get up and leave
– 12:10 1 lab/week, also Mondays @ 1:25 – 4:30 Week Topic(s) We’ll Cover 1 Introduction to Computers and Jupyter 2 Introduction to Python 3 Control Flow: Looping Over Data, Logic Statements 4 Geoprocessing the Hard Way 5 Big Data Geoprocessing, Made Easy 6 Working with Geometries CSVs 7 Selecting Features 8 Editing and Iterating through Attribute Tables 9 Working with Rasters 10 Making your own Toolboxes 11 Data Vis: Matplotlib and Pandas 12 Web Mapping in Python 13 Web Mapping in Python 14 Web Mapping in R
determined? 60% is homework problems - 3ish coding problems per week - Upload them as a .zip folder to Canvas 10% is feedback to your colleagues - 3 substantive posts/week on our class StackOverflow board - Two off weeks per semester – email me! 10% is a final project - A chance for you to showcase your skills - Prompt assigned in our last class meeting 20% is Jupyter Notebooks - 5-ish comprehension files to work through per week - Upload them as a .zip folder to Canvas
determined? 60% is homework problems - 3ish coding problems per week - Upload them as a .zip folder to Canvas 10% is feedback to your colleagues - 3 substantive posts/week on our class StackOverflow board - Two off weeks per semester – email me! 10% is a final project - A chance for you to showcase your skills - Prompt assigned in our last class meeting 20% is Jupyter Notebooks - 5-ish comprehension files to work through per week - Upload them as a .zip folder to Canvas
I’ve created a private GEOG 315 Team… Use it! stackoverflow.com/c/flc-geog-315 Questions! If you're having trouble, getting errors, don't know what a function does, ask, and ask some more. Answers! If you know the answer to someone's question, post that! Cool Code! There are many, many ways to do the same thing and get the right answer. Post those if you find a clever hack! Other stuff I haven't even thought about!
Option 1: Install ArcPro on your own computer [it comes pre-packaged with Python] It’s not the easiest thing to install, but it’s very doable – and I’m here to help!
Option 2: Install VPN and remotely access any lab computer on campus (they’ve all got ArcPro and Python) This is easy to do and will be fine for this class – as long as you’ve got a reliable internet connection.
- be frustrating - be stressful - be a lot of work - just be downright difficult and kind of infuriating What I promise you: 1. I will be here to help you (but not hand-hold) 2. If you put in the effort, you will learn a TON of valuable skills and your GIS life will be easier My advice: worry less about your grade in this class and more about actually learning the material
much longer introduction in lab next week] Python is a programming language Programming language: a vocabulary and set of grammatical rules for instructing a computer or computing device to perform specific tasks. First developed in 1990, Python emphasizes human readability of code (i.e., it’s not just 1’s and 0’s) From Tim Peter’s The Zen of Python
much longer introduction in lab next week] Python is a programming language Programming language: a vocabulary and set of grammatical rules for instructing a computer or computing device to perform specific tasks. Python is interpreted Interpreted: your code will run as-is. You don’t need to first compile it into an executable file, or program, to run it. As long as Python is installed, you can run code – no matter which OS you’re in.
much longer introduction in lab] Python is a programming language Programming language: a vocabulary and set of grammatical rules for instructing a computer or computing device to perform specific tasks. Python is object-oriented Object-oriented: python uses objects (or classes) that have certain properties (or attributes) and which do certain things (behaviors) BourneToCode Kidsonthegenius.com
much longer introduction in lab next week] Python is a programming language Programming language: a vocabulary and set of grammatical rules for instructing a computer or computing device to perform specific tasks. Python is high-level High-level: you can read your code (it’s not 1’s and 0’s), and it can be run on a variety of computers. TechDotMatrix
Science 6500. It is. Python is the language we use to talk to ArcGIS so we can automate tasks ArcGIS understands Python through a module called ArcPy Write Python Code ArcGIS Does Things ArcPy
majorrdsBuffered.shp, use a 100 foot buffer,…” An example of ArcPy in action… You’re all familiar with the buffer tool…right? The code below is Python – but we’re using ArcPy to get ArcPro to understand that Python code You will see (and get familiar with) python examples For lots of geoprocessing tools.