Home > OS >  Adding custom images over countries on Geopandas
Adding custom images over countries on Geopandas

Time:06-03

I'm new to geopandas and I want to add my own images on top of the specific countries that are in my dataframe. I created a sample image for clarification. I want to add coke.jpg to the United States, pepsi.jpg to the Russia and so on.

Is there any way to do this? Thanks.

Sample image.

CodePudding user response:

i dont think this will work easily with geopandas, since it requires georeferenced coordinates for your images which sounds tricky (ofc not impossible) for jpgs.

however you could use the underlying matplotlib subplot and annotate an image on that.

see my code below, inspired by this source enter image description here

  • Related