[BUG]: Odd polygon in land layer, extending into Canada on US choropleth
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 18.8k
- フォーク
- 2.8k
- 平均マージ
- 16時間 26分
- マージ済み PR(30日)
- 21
説明
Description
There is an odd band extending from the northwest US into Canada when making a US choropleth. You can see this in the official documentation. I think this stems from the GeoJSON file included in Plotly. The file is very out of date, by the way, with changes to Oglala Lakota County in South Dakota and the Kusilvak Census Area in Alaska not being represented.
I can hide this band in the Python version using visible=False when calling update_geos().
Screenshots/Video
Steps to reproduce
- Create a new Python file
- Paste in the unemployment example from https://plotly.com/python/choropleth-maps/
- Run the python file
Notes
The unemployment example is here for completeness' sake:
from urllib.request import urlopen
import json
with urlopen('https://raw.githubusercontent.com/plotly/datasets/master/geojson-counties-fips.json') as response:
counties = json.load(response)
import pandas as pd
df = pd.read_csv("https://raw.githubusercontent.com/plotly/datasets/master/fips-unemp-16.csv",
dtype={"fips": str})
import plotly.express as px
fig = px.choropleth(df, geojson=counties, locations='fips', color='unemp',
color_continuous_scale="Viridis",
range_color=(0, 12),
scope="usa",
labels={'unemp':'unemployment rate'}
)
fig.update_layout(margin={"r":0,"t":0,"l":0,"b":0})
fig.show()
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
失業率のコロプレスの例から始め、plotly/datasets リポジトリで参照されている geojson-counties-fips.json を調べます。北西部のジオメトリと Oglala Lakota County および Kusilvak Census Area のエントリを比較します。完了の条件は、例でその帯が表示されなくなり、これらの郡の変更が反映されていることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- data-visualization
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 55/100