python-visualization / python-visualization/folium
Pass number format to folium legend
Personne n'a encore pris cette issue.
- Langage dominant
- Python
- Étoiles
- 7.4k
- Forks
- 2.3k
- Merge moyen
- 17 h 22 min
- PR mergées (30 j)
- 11
Description
We would like to use folium to create choropleths in more than one language. So far (unless I am missing something), it appears that folium is using the system localization to set the language format for numbers in folium legend.
We, and I anticipate others, have more than one use for these maps:
- Online as the intended HTML output
- Print versions (digitally as images, parts of PDF files and also hard copies).
The problem is that in order to change number formats (in this case comma vs. period for decimal), the language localization needs to be reset globally, in most cases requiring a kernel reset (again, unless I am missing something).
I would like to be able to pass a number format to the legend to change the language format of the numbers in the scale, either by:
- passing a format string, or
- specifying a localization that folium can then reference and set the text accordingly
- Have some documentation on how to inject an equivalent instruction by HTML.
Ultimately, I would like to do the following in a single code execution:
- Create folium map (language localization unimportant since the html will use the localization of the system it is hosted on)
- Change/re-render choropleths to two languages (with number formats) so that images can be saved for alternate media use
Since headerless browser can be used to generate images and text can be passed in any language, the only thing that is needed is to interact with the format of the numbers in the legend scale.
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par localiser la génération de la légende choropleth de folium et la sortie de Leaflet.js utilisée pour l’échelle de la légende. Reproduisez le problème avec une carte rendue pour plusieurs formats numériques et inspectez le HTML généré dans un navigateur headless. Le travail est terminé lorsqu’un appelant peut contrôler le formatage des nombres de la légende sans modifier la localisation globale, et que l’utilisation prise en charge est documentée.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- javascript, python
- Domaine
- data-visualization, web-dev
- Type d'issue
- Fonctionnalité
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 35/100