Upgrade to Pro — share decks privately, control downloads, hide ads and more …

GEOG 315, GIS Programming, Fall 2020; Lecture 2

Avatar for alan.kasprak alan.kasprak
September 04, 2020

GEOG 315, GIS Programming, Fall 2020; Lecture 2

Avatar for alan.kasprak

alan.kasprak

September 04, 2020
Tweet

More Decks by alan.kasprak

Other Decks in Education

Transcript

  1. GEOG 315: GIS Programming and Web Mapping Lecture 2 –

    A Python Basics Review Office Hours Update! Mondays 9 AM – 12 PM Thursdays 9 AM – 12 PM Zoom @ fortlewis.zoom.us/my/alankasprak
  2. GEOG 315: GIS Programming and Web Mapping Lecture 2 –

    A Python Basics Review For Today… A review of Jupyter basics [follow along on your computer if you’d like] Variables Numbers and Strings A Review of Week 1 Homework Booleans
  3. GEOG 315: GIS Programming and Web Mapping Lecture 2 –

    A Python Basics Review Let’s run through a Jupyter notebook demo together. If you’re watching online, please follow along on your own computer!
  4. GEOG 315: GIS Programming and Web Mapping Lecture 2 –

    A Python Basics Review Variables Variable: a named unit of data that is assigned a value. the name of the variable [equals sign] the value of the variable
  5. GEOG 315: GIS Programming and Web Mapping Lecture 2 –

    A Python Basics Review Variables Variable: a named unit of data that is assigned a value. the name of the variable [equals sign] the value of the variable
  6. GEOG 315: GIS Programming and Web Mapping Lecture 2 –

    A Python Basics Review Variables Variable: a named unit of data that is assigned a value. the name of the variable [equals sign] the value of the variable
  7. GEOG 315: GIS Programming and Web Mapping Lecture 2 –

    A Python Basics Review Variables Variable: a named unit of data that is assigned a value. the name of the variable [equals sign] the value of the variable
  8. GEOG 315: GIS Programming and Web Mapping Lecture 2 –

    A Python Basics Review Variables, continued… Variable: a named unit of data that is assigned a value. the name of the variable [equals sign] the value of the variable What will this return?
  9. GEOG 315: GIS Programming and Web Mapping Lecture 2 –

    A Python Basics Review Variables, continued… Variable: a named unit of data that is assigned a value. the name of the variable [equals sign] the value of the variable What will this return? What will this return?
  10. GEOG 315: GIS Programming and Web Mapping Lecture 2 –

    A Python Basics Review Variables Variable: a named unit of data that is assigned a value. the name of the variable [equals sign] the value of the variable What is the value of my_answer?
  11. GEOG 315: GIS Programming and Web Mapping Lecture 2 –

    A Python Basics Review Variables, continued… Variable: a named unit of data that is assigned a value. Re-assigning variables and assigned to this variable [equals sign] this gets evaluated first
  12. GEOG 315: GIS Programming and Web Mapping Lecture 2 –

    A Python Basics Review Variables, continued… Variable: a named unit of data that is assigned a value. Re-assigning variables and assigned to this variable [equals sign] this gets evaluated first What’s x?
  13. GEOG 315: GIS Programming and Web Mapping Lecture 2 –

    A Python Basics Review Variables, continued… Variable: a named unit of data that is assigned a value. Re-assigning variables and assigned to this variable [equals sign] this gets evaluated first What’s x? What’s x?
  14. GEOG 315: GIS Programming and Web Mapping Lecture 2 –

    A Python Basics Review Variables, continued… Variable: a named unit of data that is assigned a value. Re-assigning variables and assigned to this variable [equals sign] this gets evaluated first What’s x? What’s x? What’s x?
  15. GEOG 315: GIS Programming and Web Mapping Lecture 2 –

    A Python Basics Review Numbers Floating point numbers are numbers that contain decimal points. Integers are all positive and negative whole numbers, including 0.
  16. GEOG 315: GIS Programming and Web Mapping Lecture 2 –

    A Python Basics Review Numbers Floating point numbers are numbers that contain decimal points. Integers are all positive and negative whole numbers, including 0. WE WON’T DEAL WITH COMPLEX NUMBERS IN THIS CLASS
  17. GEOG 315: GIS Programming and Web Mapping Lecture 2 –

    A Python Basics Review Numbers two Converting between these is possible …but makes more sense in one direction than the other.
  18. GEOG 315: GIS Programming and Web Mapping Lecture 2 –

    A Python Basics Review Numbers two One kind of peculiar behavior to note though!
  19. GEOG 315: GIS Programming and Web Mapping Lecture 2 –

    A Python Basics Review Strings Numbers are a variable type that store uh, numbers. Strings are a variable type that stores text. …but you can’t just throw some letters into a variable and hope for the best!
  20. GEOG 315: GIS Programming and Web Mapping Lecture 2 –

    A Python Basics Review Strings Numbers are a variable type that store uh, numbers. Strings are a variable type that stores text. …rather, you need to enclose your string in quotes! Single or double, it doesn’t matter. ‘a string’ “a string”
  21. GEOG 315: GIS Programming and Web Mapping Lecture 2 –

    A Python Basics Review Strings Numbers are a variable type that store uh, numbers. Strings are a variable type that stores text.
  22. GEOG 315: GIS Programming and Web Mapping Lecture 2 –

    A Python Basics Review Strings Numbers are a variable type that store uh, numbers. Strings are a variable type that stores text.
  23. GEOG 315: GIS Programming and Web Mapping Lecture 2 –

    A Python Basics Review Strings Numbers are a variable type that store uh, numbers. Strings are a variable type that stores text.
  24. GEOG 315: GIS Programming and Web Mapping Lecture 2 –

    A Python Basics Review Strings Numbers are a variable type that store uh, numbers. Strings are a variable type that stores text.
  25. GEOG 315: GIS Programming and Web Mapping Lecture 2 –

    A Python Basics Review Strings Numbers are a variable type that store uh, numbers. Strings are a variable type that stores text.
  26. GEOG 315: GIS Programming and Web Mapping Lecture 2 –

    A Python Basics Review Strings Numbers are a variable type that store uh, numbers. Strings are a variable type that stores text.
  27. GEOG 315: GIS Programming and Web Mapping Lecture 2 –

    A Python Basics Review Strings Numbers are a variable type that store uh, numbers. Strings are a variable type that stores text.
  28. GEOG 315: GIS Programming and Web Mapping Lecture 2 –

    A Python Basics Review Strings Numbers are a variable type that store uh, numbers. Strings are a variable type that stores text.
  29. GEOG 315: GIS Programming and Web Mapping Lecture 2 –

    A Python Basics Review Booleans Named after the nineteenth-century mathematician George Boole, Boolean logic is a form of algebra in which all values are reduced to either TRUE or FALSE.
  30. GEOG 315: GIS Programming and Web Mapping Lecture 2 –

    A Python Basics Review Booleans Named after the nineteenth-century mathematician George Boole, Boolean logic is a form of algebra in which all values are reduced to either TRUE or FALSE.
  31. GEOG 315: GIS Programming and Web Mapping Lecture 2 –

    A Python Basics Review Booleans Named after the nineteenth-century mathematician George Boole, Boolean logic is a form of algebra in which all values are reduced to either TRUE or FALSE.
  32. GEOG 315: GIS Programming and Web Mapping Lecture 2 –

    A Python Basics Review Functions: blocks of code that performs an action
  33. GEOG 315: GIS Programming and Web Mapping Lecture 2 –

    A Python Basics Review Functions: blocks of code that performs an action Modules provide additional functions; they must be imported.
  34. GEOG 315: GIS Programming and Web Mapping Lecture 2 –

    A Python Basics Review Modules provide additional functions; they must be imported.
  35. GEOG 315: GIS Programming and Web Mapping Lecture 2 –

    A Python Basics Review Modules provide additional functions; they must be imported.
  36. GEOG 315: GIS Programming and Web Mapping Lecture 2 –

    A Python Basics Review Important Advice #1… Read the documentation when you’re AT ALL unsure.
  37. GEOG 315: GIS Programming and Web Mapping Lecture 2 –

    A Python Basics Review Important Advice #1… Read the documentation when you’re AT ALL unsure.
  38. GEOG 315: GIS Programming and Web Mapping Lecture 2 –

    A Python Basics Review Important Advice #2… If you’re having a problem with your code The odds are 99.99% that you’re not the only one!
  39. GEOG 315: GIS Programming and Web Mapping Lecture 2 –

    A Python Basics Review Important Advice #3… Help one another (and not only at 1:29pm on Fridays!) This is a much, much better way than email to get a hold of me in this class!
  40. GEOG 315: GIS Programming and Web Mapping Lecture 2 –

    A Python Basics Review Week 1 Homework! “Set x to 7 and run all of your code again”
  41. GEOG 315: GIS Programming and Web Mapping Lecture 2 –

    A Python Basics Review Week 1 Homework!
  42. GEOG 315: GIS Programming and Web Mapping Lecture 2 –

    A Python Basics Review Week 1 Homework!
  43. GEOG 315: GIS Programming and Web Mapping Lecture 2 –

    A Python Basics Review Week 1 Homework!