python-visualization / python-visualization/folium
map.save() to support an option to export leaflet dependencies (js/css/icons) as inline base64 uris
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 7.4k
- Forks
- 2.3k
- Avg merge
- 17h 22m
- Merged PRs (30d)
- 11
Description
Is your feature request related to a problem? Please describe.
folium maps exported as html still depend on external leaflet dependencies (either from internet or on relative paths - manual modification is needed)
Describe the solution you'd like
Something similar to knit in RStudio (which produces the html with the inlined resources). I believe the R leaflet package is self-contained (it contains leaflet's resources), so for this to work in the same manner in folium, additional options to override default_js/default_css may be necessary (i.e. to point them to relative/static paths).
Describe alternatives you've considered
Out of various leaflet wrappers, RStudio's implementation is the closest.
Additional context
(Could attach one of html files created through RStudio's leaflet, if anyone needs it)
Implementation
Possibly, just to gauge the interest for now
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at map.save() and inspect how default_js and default_css dependencies are selected and written into exported HTML. Define the required option and verify that JavaScript, CSS, and icons are embedded as inline base64 URIs so the resulting map works without external or relative resources.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, javascript, python
- Domain
- data-visualization, frontend, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100