Sean, as someone just starting their path down a possible career in data science, thank you so much! This video was immensely helpful and I look forward to coming back to your channel for future insights!
You could check for free datasets on kaggle or something - there are some neat providers. Also check out datasetsearch.research.google.com/ as this is a great place to look.
Hi sean my data tells can only concatenate str (not "int") to str and sometimes i also get unsupported operand type(s) for /: 'str' and 'int' and i dont know when i try to use the scatter_mapbox
thank you for the explanation! I tried to implement this basic example. When I run it, a new tab in my browser opens. However, the plot won't show. In fact, I cannot establish a connection (ERR_CONNECTION_REFUSED). What can be the reason for this?
I don't think I've seen that before. It could be security software blocking Python from starting your browser. You can try saving your figure as an html file, then opening that file directly by double-clicking it. plotly.com/python/interactive-html-export/
Thank you very much for the video! It's been really useful. But I have one question yet. Is it possible to show this maps on a tkinter frame, or in any other GUI library?
Great question: There are a bunch of static output types like png, jpg, svg, or pdf, but html is the only interactive output that I know of. You might be able to open some kind of browser control on a tkinter form perhaps? Then you could consume the interactive html output.
Hi, I have copied your code and tried to run it in colab but I am getting just the title and blank white box in place of the map. Is there any solution to get that map in colab? what I am missing here?
Great explanation Sean, thanks a lot. I'm wondering how could I really interact with the map and not just see basic Info automatically provided by Plotly when we go over the marks, I mean, let's imagine we have a dataset of passengers of some car and I want a list of them when I click in some one, how could I do that? Another doubt is, can I use Google Earth to render the map? Thanks in advance.
Thanks for the feedback! Yes, you can change the fields that show up in the hover over tooltip that pops up. You can add, change, or configure all of those during runtime. Open-street-maps is a really great free tool. You could also use google, but check for commercial restrictions etc.
HI Sean, First of all, this is a BRILLIANT VIDEO! Will you guide me to resources where we can plot a storm/typhoon paths Roadways, shipping vessels paths ...
Good one! Well, you could easily do that here by just putting in a dataset with the trajectory coordinates and expected intensity/size. Just set the size of the dot equal to intensity. Mapbox may have other layers including shipping lanes etc. Just google plotly mapbox and check it out. Let me know if you find it!
Great question! You can use line_mapbox if you're in Express, or just use Scattermapbox traces. If your lat/long coordinates are precise, you can just calculate the distance in Python using the Haversine formula.
You can use: fig.update_layout(legend=dict(orientation="h")) You may have other arguments in your legend layout; in that case just add a comma and orientation="h". Example from plotly site: fig.update_layout(legend=dict( orientation="h", yanchor="bottom", y=1.02, xanchor="right", x=1 ))
Yes, you can do it by using a kind of stop-motion. Take snaps and then put them all into something like Camtasia. I did it in this video: ruclips.net/video/S9lg0WqQWHU/видео.html It works better on geo-maps. The nice tiled maps you see from open-street-maps are harder to automate because the camera height auto-adjusts.
Sean, as someone just starting their path down a possible career in data science, thank you so much! This video was immensely helpful and I look forward to coming back to your channel for future insights!
Great to hear! Good luck on your DS journey!
been looking for a tutorial like this for so long! exactly what I needed and clearly explained, thank you very much!
Glad it helped!
I just want to thank you, Sean. You have helped me a great deal!
Glad to help!
Same here!
Thank you for this. This helps me a lot! Currently working as GIS and I want to upskill more of using python!
Glad it helped!
Perfect a very well explained video, and very useful, you earned a like an a new follower!
Welcome aboard!
Hi Sean, what data set should I use to get similar result for my area(Manchester United Kingdom)?
thanks
You could check for free datasets on kaggle or something - there are some neat providers. Also check out datasetsearch.research.google.com/ as this is a great place to look.
@@seanmackenziedataengineering I appreciated Sean.🙂
Very thanks Sir, this is fantastic
Most welcome!
Hi sean my data tells can only concatenate str (not "int") to str and sometimes i also get unsupported operand type(s) for /: 'str' and 'int' and i dont know when i try to use the scatter_mapbox
Try putting str around all of the variables being concatenated. That should do it!
@@seanmackenziedataengineering I got it ! The Lon and lat had to be converted to float !
@@JCedition1 Nice!
The coding line for "Margin" is not working for IDLE shell 3.10.7. The colons are giving errors when you are putting it in.
Interesting. I'm using 3.9 in the video. Maybe there is a difference! Thanks for the heads up!
thank you for the explanation! I tried to implement this basic example. When I run it, a new tab in my browser opens. However, the plot won't show. In fact, I cannot establish a connection (ERR_CONNECTION_REFUSED). What can be the reason for this?
I don't think I've seen that before. It could be security software blocking Python from starting your browser. You can try saving your figure as an html file, then opening that file directly by double-clicking it. plotly.com/python/interactive-html-export/
I run your code on my dataset It just show the errors that fig is not defined. Is there anything I should define or import before running?!?
Maybe you just put px.scatter_mapbox(.... instead of loading the variable fig:
fig = px.scatter_mapbox(...
Let me know how it goes!
Thank you very much for the video! It's been really useful. But I have one question yet. Is it possible to show this maps on a tkinter frame, or in any other GUI library?
Great question: There are a bunch of static output types like png, jpg, svg, or pdf, but html is the only interactive output that I know of. You might be able to open some kind of browser control on a tkinter form perhaps? Then you could consume the interactive html output.
Amazing video. Thank you very much, very helpful
Glad you enjoyed it!
Hi, I have copied your code and tried to run it in colab but I am getting just the title and blank white box in place of the map.
Is there any solution to get that map in colab?
what I am missing here?
Not sure - maybe I'll try it in Colab too.
Great explanation Sean, thanks a lot. I'm wondering how could I really interact with the map and not just see basic Info automatically provided by Plotly when we go over the marks, I mean, let's imagine we have a dataset of passengers of some car and I want a list of them when I click in some one, how could I do that? Another doubt is, can I use Google Earth to render the map? Thanks in advance.
Thanks for the feedback! Yes, you can change the fields that show up in the hover over tooltip that pops up. You can add, change, or configure all of those during runtime. Open-street-maps is a really great free tool. You could also use google, but check for commercial restrictions etc.
HI Sean,
First of all, this is a BRILLIANT VIDEO!
Will you guide me to resources where we can plot a storm/typhoon paths
Roadways, shipping vessels paths ...
Good one! Well, you could easily do that here by just putting in a dataset with the trajectory coordinates and expected intensity/size. Just set the size of the dot equal to intensity. Mapbox may have other layers including shipping lanes etc. Just google plotly mapbox and check it out. Let me know if you find it!
Hi. I have a question how do I implement a joining line for distance wise from a start point and end point, lat and lon with mapbox access token
Great question! You can use line_mapbox if you're in Express, or just use Scattermapbox traces. If your lat/long coordinates are precise, you can just calculate the distance in Python using the Haversine formula.
please share a link if its possible to work online without downloading any file to my office computer, which I'm restricted to download anything
I used this one before - it is really cool! trinket.io/
Can this map work in offline environment?
You bet! The trick is to get openstreetmap tiles working offline. It is all open so you can do it. A quick search will show the way.
How to make an arrow by using scatter_mapbox toindicate direction?
Hmm. Not sure but I think you could just put an arrow on the plot figure itself.
Thank you sir❤
Most welcome!
How can we move the legend above the map as horizontal?
You can use:
fig.update_layout(legend=dict(orientation="h"))
You may have other arguments in your legend layout; in that case just add a comma and orientation="h".
Example from plotly site:
fig.update_layout(legend=dict(
orientation="h",
yanchor="bottom",
y=1.02,
xanchor="right",
x=1
))
@@seanmackenziedataengineering thank you very much for the answer 👍🏻
Very Nice.
Thank you! Cheers!
ale krasny ten mapper
It does look pretty cool, hey?
how to plot lat/long coordinate in ms access?
That's a good question! Good idea for a future video.
is it possible to animate a tracking plot? Thank you.
Yes, you can do it by using a kind of stop-motion. Take snaps and then put them all into something like Camtasia. I did it in this video: ruclips.net/video/S9lg0WqQWHU/видео.html
It works better on geo-maps. The nice tiled maps you see from open-street-maps are harder to automate because the camera height auto-adjusts.
@@seanmackenziedataengineering Thank you very much. I'll take a look and apply it!!
is scatter mapbox free?
I thought it costs money to use it
As far as I know, it is free to use!