How to make a map in python using basemap
Ғылым және технология
How to make a map in basemap - beginners guide
Import basemap & pyplot 0:23
Make simple map 1:03
Projections 1:55
Make figure bigger 2:55
How do I chose the part of the world I want to plot? 3:35
Resolution 5:32
Draw country boundaries 7:05
Colour in the map 9:20
Other map backgrounds 12:20
Plot latitude and longitude grid lines 13:19
Make a title 16:08
Jupyter notebook/ Python 3/ Anaconda 3
Basemap projections: matplotlib.org/basemap/users/...
Python colors: matplotlib.org/examples/color...
How to make a map in python using basemap script
from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
import numpy as np
fig = plt.figure(figsize=(12,9))
m = Basemap(projection='mill',
llcrnrlat = -90,
urcrnrlat = 90,
llcrnrlon = -180,
urcrnrlon = 180,
resolution = 'c')
m.drawcoastlines()
m.drawcountries(color='red')
m.drawstates(color='blue')
m.drawcounties(color='orange')
m.drawrivers(color='blue')
m.drawmapboundary(color='pink', linewidth=10, fill_color='aqua')
m.fillcontinents(color='lightgreen', lake_color='aqua')
m.drawlsmask(land_color='lightgreen', ocean_color='aqua', lakes=True)
m.etopo()
m.bluemarble()
m.shadedrelief()
m.drawparallels(np.arange(-90,90,10),labels=[True,False,False,False])
m.drawmeridians(np.arange(-180,180,30),labels=[0,0,0,1])
np.arange(start,stop,step)
labels=[left,right,top,bottom]
plt.title('Basemap tutorial', fontsize=20)
plt.show()
Пікірлер: 39
I love how you explain the basics of basemap!
Thank you so much for sharing this, it will be very useful for my geology project.
Great tutorial Karina , well explained and easy to follow ! thank you so much 🙏
thanks, you literaly save my project
Very well explained, everything is made completely clear in a nice fashion. Thank you for sharing.
Thank you so much!! I needed this!!
I am so pleased and happy to come across this video...Thank you so much Karina
thanks so much! super helpful:)
gracias por tu explicacion muy util
Hi! Thank you so much for this and I just want to say it is so refreshing to hear a girl talk about cs! Wish you all the best luck
Looks promising for my project!
@imperialrecker7111
2 жыл бұрын
unfortunately, this library doesn't work on unix or linux terminal
thank you , it was very useful
Very good 🐱, thanks a lot!
Thank you!
thanks, may you say how I can create the map of city?
How can we add magnetic equator to world map?
Thank you so much, I Have Try in my Google Colabs, but when I try to Plot / or using scatter to plot coordinates it's, doesn't show the result of plot. T_T
how can make map of altimeter satellite over lake in python.
How do I get those corner coordinate values for specific countries, such as the UK?
@xGoldGamerzx
4 жыл бұрын
I fixed it, really simple silly of me to miss it, great tutorial super simple and straight to the point thank you so much!
Thanks for sharing this video..after installing basemap i'm geeting error like import error:cannot import name 'dedent' from 'matplotlib.cbook ' how can i solve his error..kindly help me
How do you get basemap to work with anaconda?
@juanm555
3 жыл бұрын
try running the "conda install basemap" command, inside jupyter notebook, it kind of lives in a differen env than the rest of Anaconda as I recall
How to make mark on map on the basis of longitude and latitude?
@vigneshrao5679
4 жыл бұрын
did you find a solution for this? I'm looking for one such lib
Hi. What Python version are you using to work with basemap? I have trouble to find a Python version compatible with basemap.
@karinaadcock
2 жыл бұрын
Basemap hasn't been being updated so it doesn't work well with newer versions of python. You might want to try cartopy instead.
@reginaortizmarin330
2 жыл бұрын
@@karinaadcock Thanks. Yes, I tried with cartopy and it really works!
Part 2 How to plot latitude and longitude co-ordinates in basemap kzread.info/dash/bejne/ip2OxNSimZefoKw.html
Hi mam, how to install basemap. Please reply
@lawalabdulazeez2636
Жыл бұрын
!pip3 install basemap
weird that arrange is spelled arange
@karinaadcock
3 жыл бұрын
think of it as two words "a range"
Hello Karina, How did you install basemap on Windows? and What is your python 3.X version?
@karinaadcock
5 жыл бұрын
I'm using Python 3.6 and I downloaded basemap using anaconda. There are lots of tutorials online for downloading anaconda. Then I'm pretty sure I used "conda install -c conda-forge basemap"
@andrejhatzi5864
5 жыл бұрын
@@karinaadcock Installing basemap using pip does not work, I'll try with anaconda, Thank You!
@karinaadcock
5 жыл бұрын
@@andrejhatzi5864 I couldn't get it to work with pip either. That's why I used anaconda
this didn't work