Geographical Plotting with Python Part 5 - Improving the plots

sentdex · Beginner ·🛠️ AI Tools & Apps ·12y ago

Key Takeaways

Improving geographical plots with Python using Matplotlib and Basemap

Full Transcript

what is going on everybody welcome to another Matt plot lid slash basemap slash geographical plotting within Python where we left off we were plotting some dots on this blue United States here we got a Houston Boulder going on red Houston green Boulder cool stuff so anyway well what I was talking about last time was you know what if you want to customize the plot itself a little bit well there's a few things you can do right out of the gate one you can change the size so we can do like marker size equals 20 for this one and then let's make this one's marker can't do anything we can do marker size equals 15 okay so we can save that we can run that and now you can see that you got a big Houston dot and pretty big boulder but not as big as the Houston dot that's cool but let's do let's take this just as a really quick example and then do like 28 right I assume those will run over each other so let's run this real quick yeah and what if this one is a green actually and we'll plot that so what shows up here is just whoever got plotted last right so that's maybe not necessarily what you want right because you could have in theory dots run over each other and you would lose some some of your data possibly if that was an issue but again the size of the dot obviously it's not changing so like when we zoom in to just that spot that's not our problem anymore right but let's say it is it's becoming an issue for you or you do want them to run over a little bit like if you let them run over a little bit it kind of helps the transition of color so for example what we can do is throw an alpha here which kind of makes things see-through so we can say alpha point five and then we'll just apply this to both to all of these actually hey I'll run that and maybe I was a too much of an alpha but you get the idea now they're actually kind of clear so when they do overlap each other it's not such a big deal so finally the last thing I'm going to show you guys is you know how you would actually expand this because you always want to be able to expand you could instead have a flat equal and array lon equal an array and or actually and Python these are actually lists but anyway you can do that and actually well here's what we'll do we'll get rid of this this yes and we'll do that and then like lat two on two equals and actually I will just get rid of these brackets there's not really too much need for them it's not going to make this list too long so and stay well we could say is that is like thirty thirty one thirty four thirty three thirty thirty two so only that this one longitude sorry for the Skype message use thirty you arrows I 94 let's say negative one oh three negative 110 negative 107 negative that wasn't a negative 111 and negative 150 okay now then we're going to basically the same thing here I'm just going to copy and paste these variables switch them up we'll make these off a couple these forty this one's a 33 this one's going to be a 31 this won't be a 30 this one will be a 113 100 here 102 here and a 112 there okay now I will do that lawn that's fine and then this will be too too should work just so you can kind of get an idea how you would build like an array and then you could plot that stuff up like that right just to kind of give you an idea you can build arrays basically and have different varied data you've got green data and red data so to speak so you comply like you know employee versus unemployed you could plot wages you could plot all kinds of stuff or you could plus sentiment that's a great idea anyway that's going to conclude my basic geo plotting tutorials hopefully you guys have enjoyed and have some cool uses for that if you do happen to make something cool like me there I wouldn't mind seeing what you guys make with these geo plotting tutorials there's something else you guys would like to see feel free to let me know sometimes I'm able to just kind of add on to the series so if there's something that you request and I can do it pretty quickly or easily or whatever I'll just do it in in some cases I might have left something out so anyway hopefully that was helpful to you guys as always thanks for watching thanks for supporting subscriptions and until next time

Original Description

Playlist: http://www.youtube.com/watch?v=kZmYEfTv_WY&feature=share&list=PLQVvvaa0QuDfpEcGUM6ogsbrlWtqpS5-1&index=26 Sample code: http://pythonprogramming.net/basemap-python-plotting-tutorial-part-5/ In this Python programming tutorial with Matplotlib and Basemap we cover how to adjust the marker size and the alpha of our coordinate plots In this series, you are taught how to plot on a map and do geographical plotting with the matplotlib extension called basemap. Sentdex.com Facebook.com/sentdex Twitter.com/sentdex
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from sentdex · sentdex · 0 of 60

← Previous Next →
1 Matplotlib Python Tutorial Part 1: Basics and your first Graph!
Matplotlib Python Tutorial Part 1: Basics and your first Graph!
sentdex
2 Python Encryption Tutorial with PyCrypto
Python Encryption Tutorial with PyCrypto
sentdex
3 Python's Logging Function
Python's Logging Function
sentdex
4 wxPython Tutorials 1: Making Windows GUIs with Python : Installing + 1st window!
wxPython Tutorials 1: Making Windows GUIs with Python : Installing + 1st window!
sentdex
5 wxPython Tutorials 2: Making Windows GUIs with Python: Customizing Window Parameters
wxPython Tutorials 2: Making Windows GUIs with Python: Customizing Window Parameters
sentdex
6 wxPython Programming Tutorial 3: Menu Bar and Menu Button
wxPython Programming Tutorial 3: Menu Bar and Menu Button
sentdex
7 wxPython Programming Tutorial 4: Panels
wxPython Programming Tutorial 4: Panels
sentdex
8 wxPython Programming Tutorial 5: User Input Saved To Variables
wxPython Programming Tutorial 5: User Input Saved To Variables
sentdex
9 wxPython Programming Tutorial 6: Multiple Choice Input
wxPython Programming Tutorial 6: Multiple Choice Input
sentdex
10 wxPython Programming Tutorial 7: Adding Static Text and Colors
wxPython Programming Tutorial 7: Adding Static Text and Colors
sentdex
11 wxPython Programming Tutorial 8: Custom Button Images
wxPython Programming Tutorial 8: Custom Button Images
sentdex
12 wxPython Programming Tutorial 9: Tool Bar Items and Sub Menus!
wxPython Programming Tutorial 9: Tool Bar Items and Sub Menus!
sentdex
13 Basic PHP Tutorial 13: Multi-dimensional Array
Basic PHP Tutorial 13: Multi-dimensional Array
sentdex
14 Basic PHP Tutorial 15: Functions and Global Variables
Basic PHP Tutorial 15: Functions and Global Variables
sentdex
15 Basic PHP Tutorial 12: Associative Array
Basic PHP Tutorial 12: Associative Array
sentdex
16 Basic PHP Tutorial 14: Foreach loop
Basic PHP Tutorial 14: Foreach loop
sentdex
17 Basic PHP Tutorial 16: Include and Require
Basic PHP Tutorial 16: Include and Require
sentdex
18 Basic PHP Tutorial 7: Assignment, comparison and Logical operators
Basic PHP Tutorial 7: Assignment, comparison and Logical operators
sentdex
19 Basic PHP Tutorial 4: Variables and Comments
Basic PHP Tutorial 4: Variables and Comments
sentdex
20 Basic PHP Tutorial 11: Arrays part 1, basic array
Basic PHP Tutorial 11: Arrays part 1, basic array
sentdex
21 Basic PHP Tutorial 6: If else and else if conditionals cont'd
Basic PHP Tutorial 6: If else and else if conditionals cont'd
sentdex
22 Basic PHP Tutorial 1: Intro to PHP
Basic PHP Tutorial 1: Intro to PHP
sentdex
23 Basic PHP Tutorial 3: HTML with PHP
Basic PHP Tutorial 3: HTML with PHP
sentdex
24 Basic PHP Tutorial 9: While Loop
Basic PHP Tutorial 9: While Loop
sentdex
25 Basic PHP Tutorial 10: Switch Statement
Basic PHP Tutorial 10: Switch Statement
sentdex
26 Basic PHP Tutorial 2: Print and Echo
Basic PHP Tutorial 2: Print and Echo
sentdex
27 Basic PHP Tutorial 5: If else and else if conditional statements
Basic PHP Tutorial 5: If else and else if conditional statements
sentdex
28 Basic PHP Tutorial 8: Arithmatic Operators: Doing math with php
Basic PHP Tutorial 8: Arithmatic Operators: Doing math with php
sentdex
29 Basic PHP Tutorial 17: User Input Form Example / String Manipulation
Basic PHP Tutorial 17: User Input Form Example / String Manipulation
sentdex
30 Basic PHP Tutorial 18: HTML Entities and forms cont'd
Basic PHP Tutorial 18: HTML Entities and forms cont'd
sentdex
31 Basic PHP Tutorial 19: Finding words in strings
Basic PHP Tutorial 19: Finding words in strings
sentdex
32 Basic PHP Programming Tutorial 20: Saving to a File / writing and appending
Basic PHP Programming Tutorial 20: Saving to a File / writing and appending
sentdex
33 Basic PHP Programming Tutorial 22: Hashing part 2: salting
Basic PHP Programming Tutorial 22: Hashing part 2: salting
sentdex
34 Basic PHP Programming Tutorial 23: Variables in Strings and tokenizing
Basic PHP Programming Tutorial 23: Variables in Strings and tokenizing
sentdex
35 Basic PHP Programming Tutorial 21: MD5 Hashing For Security
Basic PHP Programming Tutorial 21: MD5 Hashing For Security
sentdex
36 Basic PHP Programming Tutorial 24: String similarity
Basic PHP Programming Tutorial 24: String similarity
sentdex
37 Basic PHP Programming Tutorial 25: Time and Time stamps
Basic PHP Programming Tutorial 25: Time and Time stamps
sentdex
38 Basic PHP Programming Tutorial 26: Die and Exit
Basic PHP Programming Tutorial 26: Die and Exit
sentdex
39 Basic PHP Programming Tutorial 27: MySQL Databases Part 1
Basic PHP Programming Tutorial 27: MySQL Databases Part 1
sentdex
40 Basic PHP Programming Tutorial 28: MySQL Database Part 2: Reading From Database
Basic PHP Programming Tutorial 28: MySQL Database Part 2: Reading From Database
sentdex
41 Basic PHP Programming Tutorial 29: MySQL Database Part 3: Inputting Data
Basic PHP Programming Tutorial 29: MySQL Database Part 3: Inputting Data
sentdex
42 Basic PHP Programming Tutorial 30: MySQL database in Use
Basic PHP Programming Tutorial 30: MySQL database in Use
sentdex
43 Django Tutorial Web Development with Python Part 1: Installing Django
Django Tutorial Web Development with Python Part 1: Installing Django
sentdex
44 Python Tutorial: File Deletion and Folder Deletion / directory deletion
Python Tutorial: File Deletion and Folder Deletion / directory deletion
sentdex
45 Python Tutorial: How to Rename Files and Move Files with Python
Python Tutorial: How to Rename Files and Move Files with Python
sentdex
46 3D Graphs in Matplotlib for Python: Basic 3D Line
3D Graphs in Matplotlib for Python: Basic 3D Line
sentdex
47 3D Plotting in Matplotlib for Python: 3D Scatter Plot
3D Plotting in Matplotlib for Python: 3D Scatter Plot
sentdex
48 3D Charts in Matplotlib for Python: Multiple datasets scatter plot
3D Charts in Matplotlib for Python: Multiple datasets scatter plot
sentdex
49 Sikuli Tutorial 1: Visually programming in python!
Sikuli Tutorial 1: Visually programming in python!
sentdex
50 Sikuli Tutorial 2: Program visually in python!
Sikuli Tutorial 2: Program visually in python!
sentdex
51 Sikuli Tutorial 3: Program visually in python!
Sikuli Tutorial 3: Program visually in python!
sentdex
52 3D Bar Charts in Python and Matplotlib
3D Bar Charts in Python and Matplotlib
sentdex
53 3D Plane wire frame Graph Chart in Python
3D Plane wire frame Graph Chart in Python
sentdex
54 Raspberry Pi Part 1 Introduction
Raspberry Pi Part 1 Introduction
sentdex
55 Raspberry Pi Part 8: First Download and Update! (Firmware)
Raspberry Pi Part 8: First Download and Update! (Firmware)
sentdex
56 Raspberry Pi Part 10: How to set up a Linux Web Server on your Pi
Raspberry Pi Part 10: How to set up a Linux Web Server on your Pi
sentdex
57 Raspberry Pi Part 11: Remote Desktop
Raspberry Pi Part 11: Remote Desktop
sentdex
58 Twitter Analysis: How to rank a user's influence
Twitter Analysis: How to rank a user's influence
sentdex
59 GPIO Tutorial for Pi Part 2 - Programming the GPIO
GPIO Tutorial for Pi Part 2 - Programming the GPIO
sentdex
60 GPIO Tutorial for Raspberry Pi Part 1 - Setting up
GPIO Tutorial for Raspberry Pi Part 1 - Setting up
sentdex

Related Reads

Up next
How AI Is Transforming Analytics in Tableau Cloud & Server
Salesforce Product Center
Watch →