make error messages more helpful when choropleth features and data don't match
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 18.8k
- Forks
- 2.8k
- Ø Merge
- 16 Std. 26 Min.
- Gemergte PRs (30 T.)
- 21
Beschreibung
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!
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne in packages/python/plotly/plotly/validators/choropleth, das im Issue als möglicher Ort für die Prüfung genannt wird. Reproduziere einen choropleth mit GeoJSON-Feature-Identifikatoren und locations ohne Übereinstimmungen, einschließlich führender Leerzeichen in FIPS-Codes. Als erledigt gilt, wenn der Fall mit null Übereinstimmungen eine klare Warnung ausgibt, anstatt stillschweigend fehlzuschlagen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- data-visualization
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100