当前位置:网站首页>After the eruption of Tonga volcano, we analyzed the global volcanic distribution and found that the area with the most volcanoes is here!
After the eruption of Tonga volcano, we analyzed the global volcanic distribution and found that the area with the most volcanoes is here!
2022-07-04 15:44:00 【The way of several people】
The way of several original articles , Please contact us for reprint
An undersea volcano in Tonga, an island country in the South Pacific , At local time 1 month 14 Japan 、15 Japan , Two violent eruptions in a row , A large amount of magma erupted and triggered a tsunami , The waves circled the earth for two times , As a result, many countries around the Pacific issued tsunami warnings . Preliminary assessment of this volcanic eruption VEI Grade is 5~6 level , Or have a great impact on global shipping and agriculture .
Last time I heard about Tonga , It was at the Tokyo Olympic Games last year , The athletic Olympic men's flag bearer has made Tonga a a hot spot .
chart 0-1: Tonga flag bearer at the Tokyo Olympics
We passed several sets of satellite cloud pictures , Feel the power of Tonga volcano eruption .
chart 0-2: Satellite dynamic cloud map of Tonga volcano eruption
chart 0-3: Satellite dynamic cloud map of Tonga volcano eruption
chart 0-4: Tonga volcano eruption satellite cloud image capture screen
This volcanic eruption, which has a wide impact on the world , Once again, people pay attention to global volcanoes . How about the distribution of volcanoes in the world ? Where is the volcano erupted in Tonga on the map ? How far is it from the capital of Tonga ? Now let's use Python Of folium And pyecharts The module combines the volcanic data set for visual analysis .
1
Data preparation
From machine learning and data science community platform Kaggle Download the global volcanic data set compiled by the Smithsonian Institution in Washington, USA , Use pandas The module reads and stores data sets for analysis ( If the data set cannot be registered or found , can Official account 『 The way of several people 』, reply Volcano Get dataset file ).
This time we use Jupyter Notebook Code writing and debugging , In order to observe the analysis results .
chart 1-1: Read in and store volcanic data sets
The volcanic information in this data set is very detailed and rich , It is very suitable for multi-dimensional analysis and research .
2
Analysis of global volcanic belt distribution
We are going to use two ways of visualization , Analyze the distribution of global volcanic belts and count the areas with the most volcanoes 、 Country .
Use folium Map of the module , Mark the location of global volcanoes , Visually display the distribution of global volcanic belts ; Use pyecharts Histogram of the module , Visual statistics of volcanoes in various countries 、 Distribution number of regions .
2.1
Map visualization analysis
2.1.1. Label map marker
Read volcano dataset , Loop through each row of data , Extract the longitude, latitude and name information of the volcano , Pass in as a parameter folium Modular Marker() Label map marking in method , And add the tag result to the instantiated Map() In the object , For visual display in the map .
【 Parameter Introduction 】
folium.Marker() Common parameters of :
- location: Same as folium.Map() Parameters with the same name in ,tuple or list Type of input , The format is ( latitude , longitude ) or [ latitude , longitude ], The default is None, Used to determine the longitude and latitude position of the marked part
- popup:str Type or folium.Popup() Object input , Used to control the specific style of the marked part (folium Many styles are built inside ), The default is None, That is, the part is not displayed ; Set here as the corresponding volcano name
- icon:folium.Icon() object , Used for setting up popup Specific colors of defined components 、 Icon content, etc
- tooltip:str type , Used to mark the prompt before clicking , Hovering over the mark will display without clicking , You can introduce the content that will be displayed by clicking the mark
【 Code 】
# Label the volcano in the map volcano_map = folium.Map() for i in range(0, len(tb_volcano)): volcano_info = tb_volcano.iloc[i] latitude = volcano_info["latitude"] longitude = volcano_info["longitude"] volcano_name = volcano_info["volcano_name"] folium.Marker([latitude, longitude], popup=volcano_name, tooltip="Click to see the Volcano Name", icon=folium.Icon(color='red', icon='info-sign')).add_to(volcano_map) volcano_map
【 result 】
chart 2-1-1: Label the location of the volcano on the map
2.1.2. Circle map mark
above Maker() The tag graph output by the method is too large , It's OK to mark more than a dozen within the visual range , But there are nearly 1000 volcanic data , Not conducive to observation . We make use of CircleMarker() Method , Change the mark to a colored circle , Perform tag display optimization . And pass add_child() Method , Add click trigger event LatLngPopup(), Realize the subfunction that clicking anywhere on the map can display the corresponding longitude and latitude information .
【 Parameter Introduction 】
folium.CircleMarker() Common parameters of :
- location: Same as folium.Map() Medium location, Used to control the center coordinates of the circle
- radius:int type , Used to control the radius of the circle , In pixels ; Be careful , stay folium.CircleMarker() in , because radius Is in pixels , That is, it is a circle with a fixed size on the screen , As the map zooms , Its size will not change ; But in folium.Circle() In the method ,radius The parameter unit is meters , So its size will change accordingly with the zoom of the map
- color:str type , Used to control the color of circles , The default is hexadecimal color "#3388ff", That is, a blue , You can enter the color name directly
- fill:bool type , When it comes to True when , The inside of the circle will be filled with color , No fill by default
- fill_color:str type , Control the color filled inside the circle , Default and color Parameters are consistent
- fill_opacity:float type , Used to control the transparency of the fill color inside the circle , from 0. To 1. Between , The default is 0.2
- popup:str Type or folium.Popup() object , Used to control the style of circles , The default is None, No style
【 Code 】
# Mark the volcano in a circle on the map volcano_circle_map = folium.Map() for i in range(0, len(tb_volcano)): volcano_info = tb_volcano.iloc[i] latitude = volcano_info["latitude"] longitude = volcano_info["longitude"] volcano_name = volcano_info["volcano_name"] folium.CircleMarker((latitude, longitude), popup=volcano_name, tooltip="Click to see the Volcano Name", radius=3, color="red", fill=True, fill_color="red", fill_opacity=0.8).add_to(volcano_circle_map) # Click the map to display longitude and latitude information volcano_circle_map.add_child(folium.LatLngPopup()) volcano_circle_map
【 result 】
chart 2-1-2: Circle marks the position of the volcano on the map
It is more convenient to observe than label , Click anywhere on the map to display the longitude and latitude information .
【 analysis 】
Through the global volcanic map mark, you can see , The area with the most volcanoes is in the Pacific Rim volcanic belt . This horseshoe shaped area contains about 80% The volcano , To Indonesia 、 Japan 、 Russia 、 The Philippines and central and South America are the most dense . Some are scattered in Hawaii 、 Iceland 、 Congo 、 Italy and other places .
2.2
Histogram visual analysis
Let's take another visual angle , Analyze the distribution of volcanoes in the world : According to statistics, volcanoes are distributed in various countries around the world 、 Number of regions , And count the number of different volcanic types .
2.2.1. The number of volcanoes in the world is top 20 The country
Summarize the number of volcanoes by country , Through the form of histogram , Before visual output 20 Country of name .
【 Code 】
# According to the national statistics, the number of volcanoes is before 30 name volcano_country = tb_volcano["country"].value_counts().to_frame() volcano_country.columns = ["count_num"] name_country = volcano_country.head(20).index.to_list() value_country = volcano_country["count_num"].head(20).to_list() # Data visualization output bars_non_slider(name_country, value_country, " The number of volcanoes in the world ( Country ) front 20", " The number of volcanoes in the world ( Country ) front 20")
【 result 】
chart 2-2-1: The number of volcanoes in the world is top 20 A country
【 analysis 】
The countries with the largest number of volcanoes in the world are basically in the Pacific , This is consistent with the information that the Pacific Rim volcanic belt occupies most of the volcanoes we see on the map .
At present, the five countries in the global distribution of volcanoes are the United States 、 Indonesia 、 Japan 、 Russia 、 Chile . In the top ten, we can see a non Pacific country : Iceland ( Located at the junction of the Atlantic and Arctic oceans ), And there are 28 There are as many volcanoes .
2.2.2. The number of global volcanoes distributed in various regions
Summarize the number of volcanoes by Region , Through the form of histogram , Visualize the distribution of each region .
【 Code 】
# Count the number of volcanoes by Region 30 name volcano_region = tb_volcano["region"].value_counts().to_frame() volcano_region.columns = ["count_num"] name_region = volcano_region.index.to_list() value_region = volcano_region["count_num"].to_list() # Data visualization output bars_non_slider(name_region, value_region, " The number of volcanoes in the world ( region )", " The number of volcanoes in the world ( region )")
【 result 】
chart 2-2-2: The number of volcanic regions in the world
【 analysis 】
The regions with the highest number of volcanoes in the world are basically concentrated on the Pacific Rim , This is also consistent with the information that the Pacific Rim volcanic belt occupies most of the volcanoes we see on the map .
At present, only the fifth of the five regions in the global volcanic distribution is not on the Pacific plate , They are South America , Japan 、 Taiwan, China, China and the Mariana Islands , Indonesia Islands 、 Mexico and Central America 、 The African continent and the red sea ( The Indian Ocean plate ).
2.2.3. The number of volcanoes in the world
Summarize the number of volcanoes by Region , Through the form of histogram , Visual output before the world 20 Types of volcanoes .
【 Code 】
# Count the number of volcanoes by volcanic type volcano_type = tb_volcano["primary_volcano_type"].value_counts().to_frame() volcano_type.columns = ["count_num"] name_type = volcano_type.head(20).index.to_list() value_type = volcano_type["count_num"].head(20).to_list() # Data visualization output bars_non_slider2(name_type, value_type, " Before the global volcanic species 20", " Before the global volcanic species 20")
【 result 】
chart 2-2-3: Number of volcanoes in the world 20 Types
【 analysis 】
The most widely distributed volcanic species in the world are Stratovolcanoes( Layered volcano ), also called Composite( Composite volcano ), Caused by multiple eruptions , Its recurrence cycle can be hundreds of thousands of years , It can also be hundreds of years ; The second is Shield( Shield volcano ), It has a wide top surface and gentle slope flank ( Peltate ) Large volcanoes , Hawaii Island ( Big island ) It is a typical shield volcano .
3
Location of Tonga eruption volcano
Use folium modular , Show Tonga on the map , And check the location of the volcano erupted this time and its distance from Tonga's capital .
3.1
Tonga on the map
By inquiring , Obtain the longitude and latitude position information of Nukualofa, the capital of Tonga :21°10'41.6" S, 175°11'55.2" W, Convert to degrees, minutes and seconds :-21.178235, -175.198673.
Pass the converted longitude and latitude into folium Of Map() In the method , And enlarge the size of the map , Check the capital of Tonga on the map .
【 Parameter Introduction 】
folium.Map() Common parameters of :
- location:tuple or list Type of input , Used to control the coordinates of the initial map Center , The format is ( latitude , longitude ) or [ latitude , longitude ], The default is None
- width:int Type or str type ,int When it's type , What is passed in is the pixel value of the map width ;str When it's type , What is passed in is the percentage of the map width , In the form of "xx%"; The default is "100%"
- height: Control the height of the map , Same format width
- tiles:str type , Map style used to control drawing calls , The default is "OpenStreetMap", There are also some other built-in map styles , Such as "Stamen Terrain"、"Stamen Toner"、"Mapbox Bright"、"Mapbox Control Room" etc. ; Can also be passed in "None" To draw a plain map without style , Or pass in a URL To use other options osm
- zoom_start:int type , Set the zoom size when the map is initially displayed
- max_zoom:int type , Control the upper limit of how much the map can be enlarged , The default is 18
- attr:str type , When in tiles Use optional URL Internal osm When using , Used for choosing osm name
- control_scale:bool type , Controls whether scale is added to the map , The default is False, That is, without adding
- no_touch:bool type , Control whether the map prohibits accepting touch events from the device, such as dragging , The default is False, That is not to prohibit
【 Code 】
# Location of Tonga's capital volcano_tj_map = folium.Map([-21.178235, -175.198673], width="90%", zoom_start=11, control_scale=True) volcano_tj_map
【 result 】
chart 3-1: Show Tonga's capital on the map
The capital of Tonga is on the map , It's a small island in the Pacific .
3.2
The location of this eruption volcano
By inquiring , Get the Hong aha ApaI island where the volcano erupted this time (Hunga Haapai) Longitude and latitude position information :20° 32′ 34.8″ S, 174° 24′ 21.6″ W, Convert to degrees, minutes and seconds :-20.543792, -174.406127.
Pass the converted longitude and latitude into folium Of Circle() Method ( Same as the one used above CircleMarker() The method is similar to ) in , Mark this position on the map with a circle , And join the map showing Tonga's capital , To see the distance between the erupting volcano and Tonga's capital .
【 Code 】
# Display of the location of Tonga volcano eruption and its distance from Tonga's capital volcano_tj_eruption_map = folium.Map([-21.178235, -175.198673], width="90%", zoom_start=9, control_scale=True) folium.Circle(location=(-20.543792, -174.406127), radius=2000, color="blue", fill=True, fill_color="blue").add_to(volcano_tj_eruption_map) volcano_tj_eruption_map
【 result 】
chart 3-2: The distance between the volcanic eruption location and Tonga's capital
【 analysis 】
You can see on the map , The volcano that erupted this time is located on Hong aha ApaI island , Located north of Nukualofa, Tonga's capital 70 km , About to the south of tongahapai islands 30 km . The island itself is also an undersea volcano , The volcano is very active , The highest altitude 149 rice (489 feet ), The crater used to be 2009 Year broke out , And last year 12 There are also small-scale outbreaks in September .
4
Comparison before and after Tonga volcano eruption
Through aerial photography of New Zealand aircraft and satellite photos of the United Nations , Compare Tonga before and after volcanic eruption , Look at the shocking impact of this volcanic eruption on Tonga .
chart 4-1: Before the eruption (BEFORE)
chart 4-2: After the volcanic eruption (AFTER)
chart 4-3: Comparison before and after volcanic eruption
chart 4-4: Comparison before and after volcanic eruption
chart 4-5: Before the eruption (BEFORE)
chart 4-6: After the volcanic eruption (AFTER)
chart 4-7: Before the eruption (BEFORE)
chart 4-8: After the volcanic eruption (AFTER)
chart 4-9: Before the eruption (BEFORE)
chart 4-10: After the volcanic eruption (AFTER)
chart 4-11: Before the eruption (BEFORE)
chart 4-12: After the volcanic eruption (AFTER)
Hong aha ApaI Island, where the volcano erupted, has completely sunk below the sea ; Houses and buildings on the coast edge of most islands in Tonga 、 The vegetation is covered with thick volcanic ash , Some buildings collapsed or even disappeared directly ; The airport runway of tabu island was also attacked by volcanic ash , As a result, all flights cannot land .
5
Conclusion
So far , Volcanic ash and gas from Tonga volcanic eruption have entered 20 The stratosphere above km , May form parasol effect , But compared with 1991 The Pinatubo volcano in the Philippines erupted , The amount of sulfur dioxide released this time is much smaller , For the time being, it is not enough to have a huge impact on the climate .
meanwhile , Asleep 300 Mount Fuji in Japan , Its magma is accumulating strength , Once it erupts , It only takes two hours , Volcanic ash can reach the sky over Tokyo .
Whether the volcanic ash from Tonga, thousands of miles away, will fall to you and me , No longer silent volcano , It seems to be reminding us :
The earth , It is the only home of mankind , In the face of such powerful natural forces as volcanoes , No one can really be alone !
Cover image source :unsplash
Cover picture author :Alain Bonnardeaux
边栏推荐
- Hexadecimal form
- 31年前的Beyond演唱会,是如何超清修复的?
- Selenium browser (2)
- 这几年爆火的智能物联网(AIoT),到底前景如何?
- Logstash~Logstash配置(logstash.yml)详解
- Shell programming basics
- 从0到1建设智能灰度数据体系:以vivo游戏中心为例
- Case sharing | integrated construction of data operation and maintenance in the financial industry
- Book of night sky 53 "stone soup" of Apache open source community
- 小数,指数
猜你喜欢
Scientific research cartoon | what else to do after connecting with the subjects?
科研漫画 | 联系到被试后还需要做什么?
2022年九大CIO趋势和优先事项
Redis 解决事务冲突之乐观锁和悲观锁
Redis' optimistic lock and pessimistic lock for solving transaction conflicts
Neuf tendances et priorités du DPI en 2022
Unity脚本生命周期 Day02
Deep learning neural network case (handwritten digit recognition)
Functional interface, method reference, list collection sorting gadget implemented by lambda
Case sharing | integrated construction of data operation and maintenance in the financial industry
随机推荐
【读书会第十三期】 音频文件的封装格式和编码格式
Lombok使用引发的血案
重排数组
%F format character
2022 financial products that can be invested
LeetCode 58. Length of the last word
科研漫画 | 联系到被试后还需要做什么?
每周招聘|高级DBA年薪49+,机会越多,成功越近!
MYSQL索引优化
這幾年爆火的智能物聯網(AIoT),到底前景如何?
JS tile data lookup leaf node
Width accuracy
Enter the width!
Guitar Pro 8win10 latest guitar learning / score / creation
Unity脚本API—Time类
Weekly recruitment | senior DBA annual salary 49+, the more opportunities, the closer success!
Rearrange array
LeetCode 35. 搜索插入位置 —vector遍历(O(logn)和O(n)的写法---二分查找法)
I plan to teach myself some programming and want to work as a part-time programmer. I want to ask which programmer has a simple part-time platform list and doesn't investigate the degree of the receiv
Hexadecimal form