{"id":4516,"date":"2025-01-15T13:12:08","date_gmt":"2025-01-15T04:12:08","guid":{"rendered":"https:\/\/secondlife.lol\/?p=4516"},"modified":"2025-01-16T21:55:47","modified_gmt":"2025-01-16T12:55:47","slug":"%ea%b3%84%ec%97%84-%ec%84%a0%ed%8f%ac-43%ec%9d%bc%eb%a7%8c%ec%9d%98-%eb%8c%80%ed%95%9c%eb%af%bc%ea%b5%ad-%eb%8c%80%ed%86%b5%eb%a0%b9-%ec%b2%b4%ed%8f%ac%ec%98%81%ec%9e%a5-%ec%a7%91%ed%96%89-%ea%b3%bc","status":"publish","type":"post","link":"https:\/\/secondlife.lol\/en\/%ea%b3%84%ec%97%84-%ec%84%a0%ed%8f%ac-43%ec%9d%bc%eb%a7%8c%ec%9d%98-%eb%8c%80%ed%95%9c%eb%af%bc%ea%b5%ad-%eb%8c%80%ed%86%b5%eb%a0%b9-%ec%b2%b4%ed%8f%ac%ec%98%81%ec%9e%a5-%ec%a7%91%ed%96%89-%ea%b3%bc\/","title":{"rendered":"Timeline analysis of the execution of the arrest warrant for South Korea's president 43 days after martial law was declared"},"content":{"rendered":"<style>.kb-image4516_081c71-44 .kb-image-has-overlay:after{opacity:0.3;border-top-left-radius:5px;border-top-right-radius:5px;border-bottom-right-radius:5px;border-bottom-left-radius:5px;}.kb-image4516_081c71-44 img.kb-img, .kb-image4516_081c71-44 .kb-img img{border-top-left-radius:5px;border-top-right-radius:5px;border-bottom-right-radius:5px;border-bottom-left-radius:5px;box-shadow:0px 0px 14px 0px rgba(0, 0, 0, 0.2);}<\/style>\n<figure class=\"wp-block-kadence-image kb-image4516_081c71-44 size-full\"><img decoding=\"async\" width=\"1200\" height=\"793\" src=\"https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/01\/IMG_4014.jpeg\" alt=\"\ub300\ud55c\ubbfc\uad6d \ub300\ud1b5\ub839 \uccb4\ud3ec\uc601\uc7a5 \uc9d1\ud589\uacfc\uc815\uc758 \ud0c0\uc784 \ud14c\uc774\ube14 \uc774\ubbf8\uc9c0\" class=\"kb-img wp-image-4518\" srcset=\"https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/01\/IMG_4014.jpeg 1200w, https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/01\/IMG_4014-300x198.jpeg 300w, https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/01\/IMG_4014-600x397.jpeg 600w, https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/01\/IMG_4014-768x508.jpeg 768w, https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/01\/IMG_4014-18x12.jpeg 18w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/figure>\n\n\n\n<p>On December 3, 2024, South Korea experienced an unprecedented event in its constitutional history: the then-president declared martial law, ordered the blockade of the National Assembly and the occupation of key institutions, and was accused of rebellion. An arrest warrant was subsequently issued, and after a tense confrontation between the public security service and the National Police, the arrest warrant was executed.<\/p>\n\n\n\n<p>In this post, we'll analyze the key developments in the case based on a chronological timetable of events, and use the <a href=\"http:\/\/python.org\" target=\"_blank\" rel=\"noopener\">Python<\/a> We've organized it so you can understand it at a glance through code and visualizations.<\/p>\n\n\n<style>.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-content-wrap{padding-top:var(--global-kb-spacing-sm, 1.5rem);padding-right:var(--global-kb-spacing-sm, 1.5rem);padding-bottom:var(--global-kb-spacing-sm, 1.5rem);padding-left:var(--global-kb-spacing-sm, 1.5rem);border-top:3px solid var(--global-palette2, #2B6CB0);border-right:3px solid var(--global-palette2, #2B6CB0);border-bottom:3px solid var(--global-palette2, #2B6CB0);border-left:3px solid var(--global-palette2, #2B6CB0);border-top-left-radius:5px;border-top-right-radius:5px;border-bottom-right-radius:5px;border-bottom-left-radius:5px;box-shadow:0px 0px 14px 0px rgba(0, 0, 0, 0.2);}.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-contents-title-wrap{padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-contents-title-wrap{color:var(--global-palette2, #2B6CB0);}.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-contents-title{color:var(--global-palette2, #2B6CB0);font-size:28px;font-weight:regular;font-style:normal;}.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-content-wrap .kb-table-of-content-list{color:var(--global-palette1, #3182CE);line-height:2em;font-weight:regular;font-style:normal;margin-top:var(--global-kb-spacing-sm, 1.5rem);margin-right:0px;margin-bottom:0px;margin-left:0px;}.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-content-wrap .kb-table-of-content-list .kb-table-of-contents__entry:hover{color:var(--global-palette6, #718096);}@media all and (max-width: 1024px){.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-content-wrap{border-top:3px solid var(--global-palette2, #2B6CB0);border-right:3px solid var(--global-palette2, #2B6CB0);border-bottom:3px solid var(--global-palette2, #2B6CB0);border-left:3px solid var(--global-palette2, #2B6CB0);}}@media all and (max-width: 1024px){.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-contents-title{font-size:28px;}}@media all and (max-width: 767px){.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-content-wrap{border-top:3px solid var(--global-palette2, #2B6CB0);border-right:3px solid var(--global-palette2, #2B6CB0);border-bottom:3px solid var(--global-palette2, #2B6CB0);border-left:3px solid var(--global-palette2, #2B6CB0);}.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-contents-title{font-size:28px;}}<\/style>\n\n\n<h2 class=\"wp-block-heading\">Arrest Warrant Execution Timeline<\/h2>\n\n\n\n<p>Here's what happened at key times on the day of the execution of the second arrest warrant for the South Korean president.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>04:28<\/strong>: Arrival at the Hannamdong Residence<\/li>\n\n\n\n<li><strong>07:34<\/strong>: Pass the first line of defense<\/li>\n\n\n\n<li><strong>07:48<\/strong>: Bypassing barriers and crossing secondary barriers<\/li>\n\n\n\n<li><strong>07:57<\/strong>: Arrival at the iron gate in front of the official residence<\/li>\n\n\n\n<li><strong>08:23<\/strong>Opening of the tertiary perimeter gates and entry of investigative team vehicles<\/li>\n\n\n\n<li><strong>10:33<\/strong>: Execute an arrest warrant<\/li>\n\n\n\n<li><strong>10:52<\/strong>: Airlift arrival<\/li>\n<\/ul>\n\n\n\n<p>Notably, the initial arrival at the compound was followed by a confrontation between security forces and airborne forces for approximately three hours, with arrests being made in stages.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Time table Python visualization<\/h2>\n\n\n\n<p>Below is code to represent the flow of the case as a Python visualization. The time taken for each step is represented as a bar graph to clearly show the progress of the case.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import matplotlib.pyplot as plt\nimport pandas as pd\nimport seaborn as sns\nfrom datetime import datetime\n\n# elapsed time formatting function\ndef format_duration(minutes):\n    if minutes &gt;= 60:\n        hours = minutes \/\/ 60\n        mins = minutes % 60\n        return f\"{hours}hr {mins}min\"\n    else:\n        return f\"{minutes}min\"\n\n# time table data\ndata = [\n    {\"time\": \"04:28\", \"event\": \"Arrival at Hannam-dong\"},\n    {\"time\": \"07:34\", \"event\": \"Pass 1st Checkpoint\"},\n    {\"time\": \"07:48\", \"event\": \"Bypass Barricade &amp; Pass 2nd Checkpoint\"},\n    {\"time\": \"07:57\", \"event\": \"Arrival at Main Gate\"},\n    {\"time\": \"08:23\", \"event\": \"3rd Checkpoint Gate Open &amp; Team Entry\"},\n    {\"time\": \"10:33\", \"event\": \"Arrest Warrant Execution\"},\n    {\"time\": \"10:52\", \"event\": \"Arrival at CIO\"}\n]\n\nCreate a # dataframe and convert the time\ndf = pd.DataFrame(data)\ndf['time'] = pd.to_datetime(df['time'], format='%H:%M')\ndf['duration_min'] = df['time'].diff().dt.total_seconds().div(60).fillna(0).astype(int)\n\nCalculate the total duration of #\ntotal_duration_min = int((df['time'].iloc[-1] - df['time'].iloc[0]).total_seconds() \/ 60)\ndf_total = pd.DataFrame([{\"event\": \"Total Duration\", \"duration_min\": total_duration_min}])\ndf_combined = pd.concat([df_total, df]).reset_index(drop=True)\n\nGenerate the # graph\nfig, ax = plt.subplots(figsize=(12, 8))\nevent_labels = [f\"{row['event']} ({row['time'].strftime('%H:%M')})\" if pd.notna(row['time']) else row['event']\n                for _, row in df_combined.iterrows()]\n\nVisualize #\nbars = ax.barh(event_labels, df_combined['duration_min'], color=sns.color_palette(\"Blues_r\", n_colors=len(df_combined)))\nfor i, bar in enumerate(bars):\n    ax.text(bar.get_width() + 5, bar.get_y() + bar.get_height()\/2,\n            format_duration(df_combined['duration_min'].iloc[i]), ha='left', va='center')\n\nSet up the # graph\nax.set_title('Timeline of Arrest Warrant Execution', fontsize=15)\nax.set_xlabel('Duration (minutes)')\nax.grid(axis='x')\nplt.tight_layout()\nplt.show()<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">\ud83d\udcca <strong>Interpreting graphs<\/strong><\/h4>\n\n\n\n<p>The graph generated by the Python visualization provides the following information<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Longest duration:<\/strong> It took about 3 hours (186 minutes) from arrival at the Hannam-dong official residence to crossing the first barrier.<\/li>\n\n\n\n<li><strong>Execute arrest warrants:<\/strong> The final step, the execution of the arrest warrant, lasted about 2 hours (130 minutes).<\/li>\n\n\n\n<li><strong>Total time spent:<\/strong> The total duration of the incident was calculated to be approximately 6 hours and 24 minutes.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Organize<\/strong><\/h2>\n\n\n\n<p>The execution of the arrest warrant was so complex and urgent that it was a first-of-its-kind event in the history of the Constitution. By analyzing and visualizing it in chronological order, we were able to clearly understand the flow of events and the importance of each step.<\/p>\n\n\n\n<p>Python supports these <a href=\"https:\/\/secondlife.lol\/en\/donut-chart-python-visualization\/\" data-type=\"post\" data-id=\"4014\">A very powerful tool for visually representing data<\/a>. Try it out for yourself with the code above, or apply it to other incident analysis!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"># Code Explained<\/h3>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<h5 class=\"wp-block-heading\">1. load the required libraries<\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>import matplotlib.pyplot as plt\nimport pandas as pd\nimport seaborn as sns\nfrom datetime import datetime<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>matplotlib.pyplot<\/code>: The default library used to plot graphs.<\/li>\n\n\n\n<li><code>pandas<\/code>: Libraries for efficiently processing data.<\/li>\n\n\n\n<li><code>seaborn<\/code>A library that allows you to plot more beautiful graphs based on matplotlib.<\/li>\n\n\n\n<li><code>datetime<\/code>: A library used to handle dates and times.<\/li>\n<\/ul>\n\n\n\n<h5 class=\"wp-block-heading\">2. define a time format conversion function<\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>def format_duration(minutes):\n    if minutes &gt;= 60:\n        hours = minutes \/\/ 60\n        mins = minutes % 60\n        return f\"{hours}hr {mins}min\"\n    else:\n        return f\"{minutes}min\"<\/code><\/pre>\n\n\n\n<p>This function converts the given number of minutes to hours and minutes format. If it is greater than or equal to 60 minutes, it displays both hours and minutes; if it is less than 60 minutes, it displays only minutes.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">3. Prepare and process data<\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>data = [\n    {\"time\": \"04:28\", \"event\": \"Arrival at Hannam-dong\"},\n    # ... the rest of the data ...\n]\n\ndf = pd.DataFrame(data)\ndf['time'] = pd.to_datetime(df['time'], format='%H:%M')\ndf['duration_min'] = df['time'].diff().dt.total_seconds().div(60).fillna(0).astype(int)<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Define your data as a list, and convert it to a pandas DataFrame.<\/li>\n\n\n\n<li>Convert the 'time' column to datetime format.<\/li>\n\n\n\n<li>Add a 'duration_min' column to calculate the time difference between each event in minutes.<\/li>\n<\/ul>\n\n\n\n<h5 class=\"wp-block-heading\">4. calculate the total time spent<\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>total_duration_min = int((df['time'].iloc[-1] - df['time'].iloc[0]).total_seconds() \/ 60)\ndf_total = pd.DataFrame([{\"event\": \"Total Duration\", \"duration_min\": total_duration_min}])\ndf_combined = pd.concat([df_total, df]).reset_index(drop=True)<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Calculate the total time between the first event and the last event.<\/li>\n\n\n\n<li>Create a new DataFrame with the total time spent and merge it with the existing data.<\/li>\n<\/ul>\n\n\n\n<h5 class=\"wp-block-heading\">5. Create and visualize graphs<\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>fig, ax = plt.subplots(figsize=(12, 8))\nevent_labels = [f\"{row['event']} ({row['time'].strftime('%H:%M')})\" if pd.notna(row['time']) else row['event']\n                for _, row in df_combined.iterrows()]\n\nbars = ax.barh(event_labels, df_combined['duration_min'], color=sns.color_palette(\"Blues_r\", n_colors=len(df_combined)))<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>plt.subplots()<\/code>to create the area to plot the graph.<\/li>\n\n\n\n<li>Create a label for each event.<\/li>\n\n\n\n<li><code>ax.barh()<\/code>to draw a horizontal bar graph.<\/li>\n<\/ul>\n\n\n\n<h5 class=\"wp-block-heading\">6. Set Graph Details<\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>for i, bar in enumerate(bars):\n    ax.text(bar.get_width() + 5, bar.get_y() + bar.get_height()\/2,\n            format_duration(df_combined['duration_min'].iloc[i]), ha='left', va='center')\n\nax.set_title('Timeline of Arrest Warrant Execution', fontsize=15)\nax.set_xlabel('Duration (minutes)')\nax.grid(axis='x')\nplt.tight_layout()\nplt.show()<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Displays the time spent as text next to each bar.<\/li>\n\n\n\n<li>Set the graph title, x-axis label, and add a grid.<\/li>\n\n\n\n<li><code>plt.tight_layout()<\/code>to adjust the graph layout, <code>plt.show()<\/code>to display the graph.<\/li>\n<\/ul>\n<\/blockquote>\n\n\n<style>.kb-image4457_249bea-0c.kb-image-is-ratio-size, .kb-image4457_249bea-0c .kb-image-is-ratio-size{max-width:300px;width:100%;}.wp-block-kadence-column > .kt-inside-inner-col > .kb-image4457_249bea-0c.kb-image-is-ratio-size, .wp-block-kadence-column > .kt-inside-inner-col > .kb-image4457_249bea-0c .kb-image-is-ratio-size{align-self:unset;}.kb-image4457_249bea-0c figure{max-width:300px;}.kb-image4457_249bea-0c .image-is-svg, .kb-image4457_249bea-0c .image-is-svg img{width:100%;}.kb-image4457_249bea-0c .kb-image-has-overlay:after{opacity:0.3;}<\/style>\n<div class=\"wp-block-kadence-image kb-image4457_249bea-0c\"><figure class=\"aligncenter size-medium\"><img decoding=\"async\" width=\"300\" height=\"300\" src=\"https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/01\/teri-coding-300x300.webp\" alt=\"\ud14c\ub9ac \uc774\ubaa8\ud2f0\ucf58\" class=\"kb-img wp-image-4456\" srcset=\"https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/01\/teri-coding-300x300.webp 300w, https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/01\/teri-coding-600x600.webp 600w, https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/01\/teri-coding-150x150.webp 150w, https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/01\/teri-coding-768x768.webp 768w, https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/01\/teri-coding-12x12.webp 12w, https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/01\/teri-coding.webp 1024w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><figcaption><strong>(Happy coding!)<\/strong><\/figcaption><\/figure><\/div>","protected":false},"excerpt":{"rendered":"<p>On December 3, 2024, an unprecedented event in South Korea's constitutional history occurred: the then-president...<\/p>","protected":false},"author":3,"featured_media":4533,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[3],"tags":[177,164,33],"class_list":["post-4516","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python-coding","tag-177","tag-164","tag-33"],"taxonomy_info":{"category":[{"value":3,"label":"\ud30c\uc774\uc36c(Python)"}],"post_tag":[{"value":177,"label":"\ub370\uc774\ud130 \ubd84\uc11d"},{"value":164,"label":"\ub370\uc774\ud130 \uc2dc\uac01\ud654"},{"value":33,"label":"\ud30c\uc774\uc36c"}]},"featured_image_src_large":["https:\/\/secondlife.lol\/wp-content\/uploads\/2025\/01\/\uccb4\ud3ec\uc601\uc7a5-\uc9d1\ud589-\ud0c0\uc784\ud14c\uc774\ube14-\ud3ec\uc2a4\ud2b8-\uc378\ub124\uc77c-600x600.jpg",600,600,true],"author_info":{"display_name":"TERE","author_link":"https:\/\/secondlife.lol\/en\/author\/tere\/"},"comment_info":0,"category_info":[{"term_id":3,"name":"\ud30c\uc774\uc36c(Python)","slug":"python-coding","term_group":0,"term_taxonomy_id":3,"taxonomy":"category","description":"","parent":20,"count":116,"filter":"raw","cat_ID":3,"category_count":116,"category_description":"","cat_name":"\ud30c\uc774\uc36c(Python)","category_nicename":"python-coding","category_parent":20}],"tag_info":[{"term_id":177,"name":"\ub370\uc774\ud130 \ubd84\uc11d","slug":"%eb%8d%b0%ec%9d%b4%ed%84%b0-%eb%b6%84%ec%84%9d","term_group":0,"term_taxonomy_id":177,"taxonomy":"post_tag","description":"","parent":0,"count":36,"filter":"raw"},{"term_id":164,"name":"\ub370\uc774\ud130 \uc2dc\uac01\ud654","slug":"%eb%8d%b0%ec%9d%b4%ed%84%b0-%ec%8b%9c%ea%b0%81%ed%99%94","term_group":0,"term_taxonomy_id":164,"taxonomy":"post_tag","description":"","parent":0,"count":52,"filter":"raw"},{"term_id":33,"name":"\ud30c\uc774\uc36c","slug":"%ed%8c%8c%ec%9d%b4%ec%8d%ac","term_group":0,"term_taxonomy_id":33,"taxonomy":"post_tag","description":"","parent":0,"count":30,"filter":"raw"}],"_links":{"self":[{"href":"https:\/\/secondlife.lol\/en\/wp-json\/wp\/v2\/posts\/4516","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/secondlife.lol\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/secondlife.lol\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/secondlife.lol\/en\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/secondlife.lol\/en\/wp-json\/wp\/v2\/comments?post=4516"}],"version-history":[{"count":6,"href":"https:\/\/secondlife.lol\/en\/wp-json\/wp\/v2\/posts\/4516\/revisions"}],"predecessor-version":[{"id":4534,"href":"https:\/\/secondlife.lol\/en\/wp-json\/wp\/v2\/posts\/4516\/revisions\/4534"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/secondlife.lol\/en\/wp-json\/wp\/v2\/media\/4533"}],"wp:attachment":[{"href":"https:\/\/secondlife.lol\/en\/wp-json\/wp\/v2\/media?parent=4516"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/secondlife.lol\/en\/wp-json\/wp\/v2\/categories?post=4516"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/secondlife.lol\/en\/wp-json\/wp\/v2\/tags?post=4516"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}