plotly / plotly/plotly.py

make error messages more helpful when choropleth features and data don't match

Ouverte
#4,529 4 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

feature P3
Langage dominant
Python
Étoiles
18.8k
Forks
2.8k
Merge moyen
16 h 26 min
PR mergées (30 j)
21

Description

I teach a class for students that are new to coding. We use plotly, and I'm happy to have a package that gets students good-looking graphs in so little code.

I introduce plotly's choropleth maps, and have repeatedly run into the issue where the students get confused by what the featureidkey is referring to and how that relates to the locations. I do my best to explain this, but they are (understandably) confused working across CSVs and GeoJSON. One student just hit an issue where they were trying to use FIPS codes, but their locations column had leading whitespace. When the rows are unable to be matched to a feature, it fails silently.

My feature request is to provide a warning when the featureidkey and locations have zero matches.

I haven't contributed to the plotly codebase before, but I'd be open to doing so if the maintainers are open to receiving this. Presumably the place to add this check is one of the validators?

Thanks!

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez dans packages/python/plotly/plotly/validators/choropleth, que l’issue identifie comme un emplacement possible pour la vérification. Reproduisez un choropleth en utilisant des identifiants de features GeoJSON et des locations sans correspondance, y compris des espaces en début de chaîne dans les codes FIPS. Le travail est terminé lorsque le cas de zéro correspondance produit un avertissement clair au lieu d’échouer silencieusement.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
python
Domaine
data-visualization
Type d'issue
Fonctionnalité
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.