python-visualization / python-visualization/folium

Generated HTML could be much smaller

Open
#975 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
7.4k
Forks
2.3k
Avg merge
17h 22m
Merged PRs (30d)
11

Description

The HTML generated by folium is quite verbose which leads to big files when you have 2000 markers for example.

  • The javascript is not separate from the HTML which makes it harder to minimise. Running the javascript through the closure compiler reduced it to about 70% of the original size.
  • Variables names are very long which adds a significant length to the generated file.

I'm sure there are more savings but these two seemed like the most obvious.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named. Start by locating folium's HTML and JavaScript generation entry points, then measure output for a map with many markers; done means preserving generated-map behavior while reducing file size through smaller embedded JavaScript and variable names.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, python
Domain
data-visualization, performance, web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.