ChatGPT Made me a Map!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi guys in this video I'm going to show you how chat GPT which is a large language model developed by open AI which is apparently taking the Internet by storm as we speak help me to create an interactive web map in just a few minutes guys it's pretty amazing how we can give very specific directions on how we need the map to be done using what data what platform what programming language and it'll just unravel its magic right in front of your eyes so without further Ado let's go ahead and see how we can put this amazing tool to work using an example so here I have a CSV file which contains the coordinate information of airports in the US so if I go ahead and open up this file this is how the data basically looks so over here we have a column called name which indicates the name of the airport and right next to that we have the longitude and latitude information pertaining to the location of each of these different airports so what I'm going to do is I'm going to basically ask chatgp to generate a python code for me to create an interactive web map using leaflet and volume libraries which can read this CSV file and plot the data points on the map and not only that I'm going to ask the specific lines of code that I need to insert or alter in order to make this map interactive such that when I click on one of these points it'll basically display the name of the airport all right guys so let's go ahead and get started so to access chat tpd all you have to do is just head over to chat.openai.com and if you're using this for the very first time you will actually have to create an account with the open AI it is just going to take a couple of minutes and you'll be able to access search at GPD immediately now I have already created an account for me so what I'm going to do is I'm just going to log in using my login details so let's enter the email address first followed by your password all right so this is how the interface of chat GPT looks as of January 2023 now what's cool with this tool is that you can basically type out your request in this box right over here with as many helpful supplementary information as possible so that chat TPT can know exactly what response to generate for you with a higher degree of accuracy and precision so that's exactly what I'm going to do I'm just going to basically tell this tool just like how I would talk to a person asking for very specific directions on how to make this map so I'm just going to ask it can you generate a code in Python to make an interactive web map using leaflet and volume and not only that I'm going to give it some specific directions when it comes to reading the data from this U.S airport CSV file so I will say that I would like this code to read the data from a table or from a CSV file which contains the following headings so we have three headings if you can recall the structure of the CSV file we had name after that we had longitude and latitude so these are the three columns so let's put it down as all right after that we can basically say that plot this data on an interactive web map all right guys that's about it for this request let's go ahead and hit enter and see how chat jpd responds to my request thank you all right you can see that it's already telling me to use the pandas library to read CSV data which is quite handy [Music] foreign [Music] [Music] as you can see this tool is near perfect that it not only generates the code for us but it gives very specific directions as to how to use this code because this code is actually written for a general case as you can see this data.csv file doesn't really exist so that's what it assumes to be the file where we have kept our data table so it says right over here in this sample code the CSV file data.csv should have columns named name latitude and longitude just like what we saw in our own CSV file and as we see over here it's giving us the direction to import the pandas Library which is the library it's using to read the CSV file as it says right over here and then it uses volume.map function to basically create the map simple but elegant this code can be quite helpful especially as a starting point now there will always be opportunities for us to actually improve this code but it's a very good starting point and what I'm going to do is I'm just basically going to copy and paste this exact same code onto a Jupiter notebook and from there we'll see what sort of changes we have to do in order for this code to get up and running so guys for this I'll be using jupy the notebook as my interactive IDE so as you can see over here I have navigated to my working folder and now we are going to open up new script by heading over to new right over here and by clicking on python 3. all right so let's head back to chat GPT just copy this and paste it over here now before we go ahead and execute this command I think we will have to either change this to the file name that we are using which is a US underscore airpods or what we can do is we can just basically make a copy of this file and name it as data so obviously it's a CSV file so we don't really have to worry about the file format and without actually saving this map to a to an HTML file I'm just going to display this map first and later on if I like the way it looks I can just go ahead and decide to save this file to a file called map.html so let's add a command called display with a map and that's just going to be M and let's see what happens when we run the command and just in no time it actually created the map for us and if I zoom out this map well you guys can see that it already managed to actually plot all the locations of each of the airports on a map like this not only that let's go ahead and click on one of these icons and see how it looks and right over here it basically displays the name of the airport how cool is this and you can actually make this a good starting point to play around with stuff now we can actually set the zoom level to be something different for example if I were to run this command again you can see that the zoom level that we get by default it's kind of zoomed in a bit too much so you can always just play around with the numbers and see how it looks let's say if I were to go with five run this again yeah now you can see that I think we still have some wiggle room maybe about let's make it four yeah that almost looks perfect all right guys so there's a good chance that if you're actually doing the same exact thing with me you may or may not have this volume Library installed if you are a python user you actually know how to install packages and libraries simply by using pip install command just out of curiosity let's ask Chad GPT the directions to install the volume Library foreign so here I'm asking how to install the volume Library directly using the jupyter notebook now you can actually head over to Anaconda prompt and install libraries from there as well but since we are already using a jupyter notebook why not we directly install the library in case if you guys don't have this Library installed for the version of python that you are using and as you can see it's basically giving us what we need to do so if you're directly installing libraries using jupyter notebook all you have to do is just add this exclamation mark at the beginning followed by pip install then basically the name of the library and after that to import any Library all you have to do is just import volume and that's basically what it asks us to do when it compiled this code for us uh just a few minutes ago alright guys I think you guys can imagine how amazing this tool can be on a variety of different levels and I'm planning to do a couple more tutorials on this to explore the capabilities of this tool when it comes to doing things like geospatial analysis map creation stuff like that in the upcoming days and weeks and before we go ahead and finish this tutorial I'm just going to see how chat GPT can help me to change the size and the color of these markers so of course what we can do is we can head back to chatgpt and ask foreign [Music] foreign [Music] foreign foreign [Music] you can see that it basically gave me quite a number of different helpful responses and I'm going to head back to this response that I got from here it's also possible to use different shape of markers like circles and rectangles so I'm interested to see how the circle markers actually look instead of using volume dot marker so I'm just going to copy this and paste it over here and in addition to that I'm also going to pass a couple more arguments like radius color fill and fill color so let's just copy this and try to slip it in right over here foreign is actually given as hexadecimal RGB color codes but I would like to directly use the name of the the color like red in this case let's see and for the fill color red as well and after that we can just simply run the command however I think we are missing a comma right over here and with this we will also have to add the line of code to display the map it's just m so let's run this and see how it looks yeah now as you can see this is how the markers actually look when it's plotted as Circle markers and still we have the interactive capability you can just zoom into any location that you wish and if you really like to inspect each of these different icons you can see that it's basically telling us the name of the airport and of course you can play around with the colors as well so let's say if you wanted to go with the green instead of red do that as well and if you wanted to make the radius to be maybe a little bit smaller like four instead of five you can make those changes as well simply run it and you will get the altered map just like this so finally before we wrap up this tutorial I'm just going to activate this command by removing the hash sign so that we can basically save this map to HTML file called map underscore U.S airports and after that if I go ahead and run this command and if I head back to my working folder we are going to get this sort of an HTML file which can be opened using any web browser so let's try to see whether I can open this using well Microsoft Edge and as you can see I'm not even running on jupyter Notebook anymore it's a file that you can basically pass on to somebody else and they can have this kind of interactive map capabilities that we managed to generate with the help of chat GPT pretty cool isn't it so I guess you guys can imagine how much of a useful tool chat GPD is not just for making simple Maps like this it has become a very helpful tool in so many different fields and when it comes to the field of remote sensing and GIS I can see such a huge potential of chat GPD specially as a tool that can work in Aid of providing very helpful guidance for us to develop codes perform geospatial analysis things like that and in the upcoming days I will be bringing in more tutorials for you guys to show you how we can use chat gpt's amazing capabilities to our advantage to make our life much more easier and efficient within the realm of the capabilities of artificial intelligence so thanks a lot for watching guys if you do have a question add a comment down below and if you found the tutorial to be helpful show your support by hitting that like button and of course don't forget to subscribe to this channel as well to stay tuned for this kind of content on a weekly basis have a good one I'll see you guys again in the next tutorial
Info
Channel: GeoDelta Labs
Views: 156,067
Rating: undefined out of 5
Keywords: what is chatGPT, what is ChatGPT?, how to make a map using ChatGPT, chatGPT mapping tutorial, making a map using chatGPT, chatGPT python tutorial, chatGPT tutorial, chatGPT explained, chatGPT examples, chatGPT mapping examples, how to create a map using ChatGPT, chatGPT business ideas, openAI, openAI and chatGPT, web mapping using ChatGPT, chatgpt remote sensing applications, chatgpt mapping, chatgpt mapping examples, geospatial analysis with chatgpt, chatgpt examples
Id: iNHQgLw7qZc
Channel Id: undefined
Length: 15min 12sec (912 seconds)
Published: Sun Jan 29 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.