Smiling & Weeping
---- 如果你问我最想要什么
我会很幼稚地说
真爱和自由
代码一:
metaData = pd.read_csv('/kaggle/input/birdclef-2024/train_metadata.csv')
metaData.head(5)
primary_label | secondary_labels | type | latitude | longitude | scientific_name | common_name | author | license | rating | url | filename | |
---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | asbfly | [] | ['call'] | 39.2297 | 118.1987 | Muscicapa dauurica | Asian Brown Flycatcher | Matt Slaymaker | Creative Commons Attribution-NonCommercial-Sha... | 5.0 | https://www.xeno-canto.org/134896 | asbfly/XC134896.ogg |
1 | asbfly | [] | ['song'] | 51.4030 | 104.6401 | Muscicapa dauurica | Asian Brown Flycatcher | Magnus Hellström | Creative Commons Attribution-NonCommercial-Sha... | 2.5 | https://www.xeno-canto.org/164848 | asbfly/XC164848.ogg |
2 | asbfly | [] | ['song'] | 36.3319 | 127.3555 | Muscicapa dauurica | Asian Brown Flycatcher | Stuart Fisher | Creative Commons Attribution-NonCommercial-Sha... | 2.5 | https://www.xeno-canto.org/175797 | asbfly/XC175797.ogg |
3 | asbfly | [] | ['call'] | 21.1697 | 70.6005 | Muscicapa dauurica | Asian Brown Flycatcher | vir joshi | Creative Commons Attribution-NonCommercial-Sha... | 4.0 | https://www.xeno-canto.org/207738 | asbfly/XC207738.ogg |
4 | asbfly | [] | ['call'] | 15.5442 | 73.7733 | Muscicapa dauurica | Asian Brown Flycatcher | Albert Lastukhin & Sergei Karpeev | Creative Commons Attribution-NonCommercial-Sha... | 4.0 | https://www.xeno-canto.org/209218 | asbfly/XC209218.ogg |
metaData.info()
# latitude 纬度
# longitude 经度
<class 'pandas.core.frame.DataFrame'> RangeIndex: 24459 entries, 0 to 24458 Data columns (total 12 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 primary_label 24459 non-null object 1 secondary_labels 24459 non-null object 2 type 24459 non-null object 3 latitude 24081 non-null float64 4 longitude 24081 non-null float64 5 scientific_name 24459 non-null object 6 common_name 24459 non-null object 7 author 24459 non-null object 8 license 24459 non-null object 9 rating 24459 non-null float64 10 url 24459 non-null object 11 filename 24459 non-null object dtypes: float64(3), object(9) memory usage: 2.2+ MB
1 fig = px.scatter_mapbox(metaData, lat='latitude', lon='longitude', color='common_name', 2 hover_name='common_name', hover_data=['latitude', 'longitude'], 3 title='Origin of Bird Species', 4 zoom=1, height=600, template='plotly_dark') 5 fig.update_layout( 6 mapbox_style="white-bg", 7 mapbox_layers=[ 8 { 9 "below": 'traces', 10 "sourcetype": "raster", 11 "sourceattribution": "United States Geological Survey", 12 "source": [ 13 "https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryOnly/MapServer/tile/{z}/{y}/{x}" 14 ] 15 } 16 ]) 17 fig.show()
图片效果:
标签:non,object,Python,asbfly,绘图,24459,https,null From: https://www.cnblogs.com/smiling-weeping-zhr/p/18122610