0

I imported my Jupyter notebook containing folium maps to my Github repository (https://github.com/Nuri-Tas/Data-Analysis/blob/main/Maps/folium%20and%20Geo%20(1).ipynb) but none of the leaflet maps are shown on GitHub. There is only the error 'Make this Notebook Trusted to load map: File -> Trust Notebook' written in the places of maps. I have made my Jupyter file to trust notebook, but I still get this error.

Nuri Taş
  • 3,828
  • 2
  • 4
  • 22

1 Answers1

0

You can use the solution, nbviewer, provided by the Jupyter community for viewing notebooks in 'static' form and for sharing with non-programmers. GitHub is just displaying a preview for developers. There's several issues, one of which you have just found. The 'preview' nature of the GitHub rendering used to enjoy wider appreciaiton because GitHub wouldn't even attempt to render a preview any notebook of substantial length. Since they have tried to allow longer notebooks to render, the inexperienced have not realized this is only meant as a 'quick preview'.

Example using your link you can see nbviewer showing your maps HERE (this is link itself):

https://nbviewer.org/github/Nuri-Tas/Data-Analysis/blob/main/Maps/folium%20and%20Geo%20%281%29.ipynb

You'll note by looking at it you can see the patter of the URL and the relationship to your GitHub URL.

You can easily get this by going to nbviewer and pasting in your GitHub URL https://github.com/Nuri-Tas/Data-Analysis/blob/main/Maps/folium%20and%20Geo%20(1).ipynb and clicking 'Go'.

You can read more about this and explore some other options here.

Wayne
  • 6,607
  • 8
  • 36
  • 93
  • I see, thanks for nbviewer link, I will definitely look into that. Could you elaborate on what 'the inexperienced have not realized this is only meant as a 'quick preview'' means by the way? – Nuri Taş Jul 18 '22 at 18:14
  • I meant that GitHub isn't in the business of rendering notebooks as full-featured. The fact some rendering of some cells happens confuses people and ends up taking longer for novices to realize the Github preview rendering isn't there for anything more than being a preview. The partial solution interferes with those new to Jupyter from finding a full-featured solution faster. – Wayne Jul 18 '22 at 20:19