make error messages more helpful when choropleth features and data don't match
Ninguém assumiu esta issue ainda.
- Linguagem predominante
- Python
- Estrelas
- 18.8k
- Forks
- 2.8k
- Merge médio
- 16h 26min
- PRs com merge (30d)
- 21
Descrição
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!
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Direção de pesquisa
Comece em packages/python/plotly/plotly/validators/choropleth, que a issue identifica como um possível local para a verificação. Reproduza um choropleth usando identificadores de features do GeoJSON e locations sem correspondências, incluindo espaços em branco à esquerda nos códigos FIPS. Considera-se concluído quando o caso de zero correspondências produz um aviso claro em vez de falhar silenciosamente.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- python
- Domínio
- data-visualization
- Tipo de issue
- Funcionalidade
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 35/100