Python for Geospatial Data Analysis | Spatial E. | Skillshare

Playback Speed


  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x

Python for Geospatial Data Analysis

teacher avatar Spatial E., Geospatial Data Science

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

1 Lessons (14m)
    • 1. 2 PlottingMatplotlib Final

      14:08
  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.

383

Students

--

Projects

About This Class

This Python for beginner course will get you up and running with using Python for data analysis and visualization. You will learn how to download and access a Jupyter Notebook environment. You will have sample Python scripts and example data so that you will get a chance to practice manipulating GIS data. Additionally, you will get HD videos to guide you through out the course.

The course assumes you have no prior knowledge of Python, so you also get to learn the basics of Python in the first two sections of the course. However, if you already know Python, the first two sections can serve as a refresher before you jump into the data analysis and visualization part. In the course, you will learn how to install conda and various libraries that are necessary for geospatial data analysis such as basemap, geopandas, pandas, matplotlib, and seaborn. We will also use the popular open source tool, the Jupyter Notebook.

You will learn how to integrate different spatial libraries within your Python code. We will walk you step by step to apply various Python packages to manipulate GIS data, visualize geospatial data to get better insights. I will provide you with all the data that I demonstrate in the course. By the end of this course, you will be able to download Jupyter Notebook, install conda, and perform various spatial analysis including manipulating, aggregating, and visualizing GIS datasets using Python.

Meet Your Teacher

Teacher Profile Image

Spatial E.

Geospatial Data Science

Teacher

Dr. Alemayehu Midekisa (PhD) is a research scientist at the University of California San Francisco. He has a Master of Science degree in GIS and Remote Sensing and a PhD in Geospatial Science & Engineering. Dr. Midekisa is also the recipient of the prestigious NASA Earth and Space Science Fellowship and various other awards. He has over 10 years of experience applying geospatial science and technologies in various applications including public health, agriculture, and natural resources.

His research work in the application of geographic information science has been published in various scientific journals. He has presented his research findings in various scientific meetings including the American Geophysical Union, Association of American Geographers, American Tropical and Hygiene and Medicine, and NASA Science Team Meetings. He teaches online courses in various themes including geospatial science and technology. He is also the founder of Nile Geospatial.

See full profile

Class Ratings

Expectations Met?
    Exceeded!
  • 0%
  • Yes
  • 0%
  • Somewhat
  • 0%
  • Not really
  • 0%
Reviews Archive

In October 2018, we updated our review system to improve the way we collect feedback. Below are the reviews written before that update.

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.

Transcripts

1. 2 PlottingMatplotlib Final: hi will come to this lecture and this lecture will be installing the Jupiter, not book initiating a Jupiter, not book using, um, cut prompter. And we will, um, do some exercise on my plot lead to do, you know, basic graph. Um, and let's first start. So the first thing you do to start and not book is just you can definitely used the anaconda. Um, you know, navigator, just if you want to do it mentally and, um wants the anaconda, um, navigator Inish, it's you can lounge a Jupiter, not book. Okay, so that's kind of a mono away elf doing that. And so Anaconda is just configuring and in shedding. So once you have the Anaconda navigator, you just lounge Jupiter, not book, right? And then you just go to the the folder that you have your old, um, you know, scripts. I mean, you can you can, you know, save it in a different location if you want to. So let's get started. Was the first, um, you know, quote Piketon coat that we have. So So the first thing is, this is just in an exercise where we will do some demonstration on on how to plod is he might plot live, right? And so So this is kind of a new interactive, you know, platform to quote. You know, Piketon, you can create new sales. For example, here. If I just create new sale, it will open. And also, you know, if you want to write a court, like, for example, import, Um, hand us something like that. So this is just the court, right? If you want to, like, write a note, you can change here. Like from accord to a marked down. And you can say, like, this is my crotch, right? And then if you clean, it's not running. So it's just a text file. So you can change that here and then if you want to, like, move this sell, you can just move it up and down. If I want to move it down, I can do that. Um, and I can you know, they did that. Just delete that. Even I can dilly the entire cell like I can cut that in distillate. So it's a pretty cool, interactive platform for coating. So it's a quoted a teacher, but it's interactive. You can add code. You can import data. You can, you know, print. Uh, you know, your intermediate results. You can also, um, plot, you know, time serious. You can put maps for geospatial data. So that's Ah, kind of an overview off. You know, Jupiter, not book. So let's get started with our, you know, PLA thing. So the first thing elders just import Matt plot Lee package and that pew I plot as plots. So if I if you want to run a script, So this is our first line, you just go ahead and do that if you want to run it, you know, line by line. So this is the first line of court, and then if I read that, uh, it's it's so loading. The data was an amp I ah, I think my immediate stream of this. Okay, so if there's no issue, it would just keep on running the next one. So just and it lets also import, you know, pandas a speedy right. Ah, but mind you like before we import the data, if in your kids, you might have problem was when important, my plot leave and then the pond us you have to first install this package. Right? And once you install it, you can you can, you know, important. So let me show you how you can. Um you can install a package for the Jupiter, not book. So let's go to the anaconda. Prompt. Right. So that's how you install pockets. For example, the pond us. Right. So, to install any Jupiter 80 pie 10 package, let me show you like, let's go. Really? Like in the store his store upon. Does your P teacher No. Right. So if you if you just click here, you I'm just looking for, you know, sample script like script. I just want to show you how you can get, like, some quotes or, um, how you can, um All right, it's not a lot much. Okay, so let's just go back and let's go to the, you know, Anaconda prompt. And let's do install Thebe pandas package. Right? But I have I have already installed it just but for you, That's how you stole it, Leslie. So Conda, right? Condoms. Its toll found us. That's the package that you want. If it's a different package you right. So, Kanda, install. You know the name off the package and just your hit. Enter Now it's just activity solving environment says it's attempting to install that. So it's just responding. So this is a line, of course, that you need to know. Um, whenever you have, you have to install some package. This is how you install it, right on an accord. A problem. Okay, so it says that, um, you know, the following package or not a village from the current child, but it's already install. I think that's the rate that the reason that it's not, you know, let me do that, OK? And if your package is not installed, if you run here, you'll just, you know, see an ear message. If it's not showing you here, then it means that your package is already installed, and then it's it's importing it. So no issue. Right? Okay. This this is the first housekeeping that you need to know before you just go in some dibs, right? Okay, So run the import that my plug in the pants and then this is where my, you know, data is saved. So I'll define a d if PD as a pandas, um, and releases if you so so technically I'm writing the name off the fight. Another thing that I would like to show you is just You might be interested. Words? Where should I put my data? In an on all my scripts. So where is that? You know, let's just at another line here. I think it's PW. Let's just try that. Okay. P w deep Okay. All right. Perfect. So PW D is just you're working in a directory for for this Jupiter, not book. It will. If you write pw d, it will tell you where you're just Technically, you're working, director, right? See, for if I go here, see users. You know, if I go to this file, I'll get my all my, you know, anaconda codes and on the input data. That's just my working there too. So let me go to see and users all my and then piped in geospatial. That's where it is. Okay, so you can see all this. You know all these. Let's go to the main page. Okay? So you can see all this chords right here, right? Because all of my you know, fightin and courts with I p y and be, You know, Suffolk's so you can see all of this course, right? And then my denies here, So that's that's how you So that's how you write like your data. So this is your working there tree. So when you ride the filing, you just simply because this is our working directory, you know, we're writing here data analyst LST brazil. So data LSD, Brazil LST possible. Here's the CSP five. So that's were just technically call in this fire. So for in your kids, the first thing you need to know is just to lock it. You're working directory, right? By writing P w d. Once you know you're working there tree credit, a data folder and the data folder and try to add, you know, the date of the data finds LST Brazil and put it there, and that's it. And just write this, you know, write this script and just run. It should run smoothly, right? Um, that's the first thing you need to know. And then once we imported the data, it's just, um, call. So our data is just give now, So let's select some variables, right? Um and the other thing is, we might be interested to do like the F head. Okay, so if you ride DF head, then you know what? What? The different columns and this data Bizarre. Right? So I have a month's parameter Ah, year primary and enlistee and land surface temperature on the rainfall. This is ah, for process. Right? Um and I like to map, you know, LST you know? So I want to select, you know, the different parameters here. So what I'm doing here is just Ellis physical two DF is my data file and just ride the name off the column here LST then volleys. So it's just selecting that that specific call it and then the same thing for Rampal here and in the same thing full for the months in the year. Okay, so now it's easy for me to plot each off. You know, these parameters, right? And the next thing is, I define my x and y primary because I'm doing, you know, line plot here. So I'm I'm telling, like so I want my egg sacs is to be months. Here's months we really find that. And then the y axis is just LST so, um, you know, the Y axis is LSD, right, And then plot dot Plot X y I'm just plodding, you know, LST by mints, right? And then just run that. They'll have to just run this first, that's why. Okay, Perfect. Because I have to rent this, um, you know, dispatch off scripts. So now we have made our first time serious plot s. So this is, you know, months off the year. And this is land surface temperature values, you know, for Brossel. And this is just, you know, basic, you know, plot. So let's do some a little bit of, you know, changing the color and entitled in X and Y actives, right? It's that some private, it's prod plot X y and then add plot title. So we're gonna write, Read a title here. Brazil enlistee. Here is just my title. If I want to change it, it can change. Um and, you know, plot X label. So this is our ex label and then plot. Why label? So this is our, um Why? Why? Um, my access I can change actually, LSD, All right. Our lunch surface and pressure and do Reese else's. All right, so let's just run this a shoot change right we have Tampere and, you know, months, years when I run, the script should change, right? So long surface temperatures changing out of medically. And then here was 2015 and 2016. Actually, this change that back to 2015. Okay, Perfect. So now we have also in a changed, you know, the color and the type off, you know, line. Ah, and we have added a title. We about X and y axis. That's pretty cool. And let's dio this is a line graph and inlets to a bar plot. So to do a bar plot instead off. You know, plt plots we do plt bar, right? And an ex wife. So and then we also just, you know, tied toe, you know, x and y level. So if you run this crib, it will just give us, um, pretty nice looking, you know, bar plot instead of a line. So that's how we can do some plot. Think using the, uh, Matt plot leap package. Inp Iten A Jupiter, Not book, right