Timeline analysis of the execution of the arrest warrant for South Korea's president 43 days after martial law was declared

대한민국 대통령 체포영장 집행과정의 타임 테이블 이미지

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.

In this post, we'll analyze the key developments in the case based on a chronological timetable of events, and use the Python We've organized it so you can understand it at a glance through code and visualizations.

Arrest Warrant Execution Timeline

Here's what happened at key times on the day of the execution of the second arrest warrant for the South Korean president.

  • 04:28: Arrival at the Hannamdong Residence
  • 07:34: Pass the first line of defense
  • 07:48: Bypassing barriers and crossing secondary barriers
  • 07:57: Arrival at the iron gate in front of the official residence
  • 08:23Opening of the tertiary perimeter gates and entry of investigative team vehicles
  • 10:33: Execute an arrest warrant
  • 10:52: Airlift arrival

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.

Time table Python visualization

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.

import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
from datetime import datetime

# elapsed time formatting function
def format_duration(minutes):
    if minutes >= 60:
        hours = minutes // 60
        mins = minutes % 60
        return f"{hours}hr {mins}min"
    else:
        return f"{minutes}min"

# time table data
data = [
    {"time": "04:28", "event": "Arrival at Hannam-dong"},
    {"time": "07:34", "event": "Pass 1st Checkpoint"},
    {"time": "07:48", "event": "Bypass Barricade & Pass 2nd Checkpoint"},
    {"time": "07:57", "event": "Arrival at Main Gate"},
    {"time": "08:23", "event": "3rd Checkpoint Gate Open & Team Entry"},
    {"time": "10:33", "event": "Arrest Warrant Execution"},
    {"time": "10:52", "event": "Arrival at CIO"}
]

Create a # dataframe and convert the time
df = pd.DataFrame(data)
df['time'] = pd.to_datetime(df['time'], format='%H:%M')
df['duration_min'] = df['time'].diff().dt.total_seconds().div(60).fillna(0).astype(int)

Calculate the total duration of #
total_duration_min = int((df['time'].iloc[-1] - df['time'].iloc[0]).total_seconds() / 60)
df_total = pd.DataFrame([{"event": "Total Duration", "duration_min": total_duration_min}])
df_combined = pd.concat([df_total, df]).reset_index(drop=True)

Generate the # graph
fig, ax = plt.subplots(figsize=(12, 8))
event_labels = [f"{row['event']} ({row['time'].strftime('%H:%M')})" if pd.notna(row['time']) else row['event']
                for _, row in df_combined.iterrows()]

Visualize #
bars = ax.barh(event_labels, df_combined['duration_min'], color=sns.color_palette("Blues_r", n_colors=len(df_combined)))
for i, bar in enumerate(bars):
    ax.text(bar.get_width() + 5, bar.get_y() + bar.get_height()/2,
            format_duration(df_combined['duration_min'].iloc[i]), ha='left', va='center')

Set up the # graph
ax.set_title('Timeline of Arrest Warrant Execution', fontsize=15)
ax.set_xlabel('Duration (minutes)')
ax.grid(axis='x')
plt.tight_layout()
plt.show()

📊 Interpreting graphs

The graph generated by the Python visualization provides the following information

  1. Longest duration: It took about 3 hours (186 minutes) from arrival at the Hannam-dong official residence to crossing the first barrier.
  2. Execute arrest warrants: The final step, the execution of the arrest warrant, lasted about 2 hours (130 minutes).
  3. Total time spent: The total duration of the incident was calculated to be approximately 6 hours and 24 minutes.

Organize

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.

Python supports these A very powerful tool for visually representing data. Try it out for yourself with the code above, or apply it to other incident analysis!

# Code Explained

1. load the required libraries
import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
from datetime import datetime
  • matplotlib.pyplot: The default library used to plot graphs.
  • pandas: Libraries for efficiently processing data.
  • seabornA library that allows you to plot more beautiful graphs based on matplotlib.
  • datetime: A library used to handle dates and times.
2. define a time format conversion function
def format_duration(minutes):
    if minutes >= 60:
        hours = minutes // 60
        mins = minutes % 60
        return f"{hours}hr {mins}min"
    else:
        return f"{minutes}min"

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.

3. Prepare and process data
data = [
    {"time": "04:28", "event": "Arrival at Hannam-dong"},
    # ... the rest of the data ...
]

df = pd.DataFrame(data)
df['time'] = pd.to_datetime(df['time'], format='%H:%M')
df['duration_min'] = df['time'].diff().dt.total_seconds().div(60).fillna(0).astype(int)
  • Define your data as a list, and convert it to a pandas DataFrame.
  • Convert the 'time' column to datetime format.
  • Add a 'duration_min' column to calculate the time difference between each event in minutes.
4. calculate the total time spent
total_duration_min = int((df['time'].iloc[-1] - df['time'].iloc[0]).total_seconds() / 60)
df_total = pd.DataFrame([{"event": "Total Duration", "duration_min": total_duration_min}])
df_combined = pd.concat([df_total, df]).reset_index(drop=True)
  • Calculate the total time between the first event and the last event.
  • Create a new DataFrame with the total time spent and merge it with the existing data.
5. Create and visualize graphs
fig, ax = plt.subplots(figsize=(12, 8))
event_labels = [f"{row['event']} ({row['time'].strftime('%H:%M')})" if pd.notna(row['time']) else row['event']
                for _, row in df_combined.iterrows()]

bars = ax.barh(event_labels, df_combined['duration_min'], color=sns.color_palette("Blues_r", n_colors=len(df_combined)))
  • plt.subplots()to create the area to plot the graph.
  • Create a label for each event.
  • ax.barh()to draw a horizontal bar graph.
6. Set Graph Details
for i, bar in enumerate(bars):
    ax.text(bar.get_width() + 5, bar.get_y() + bar.get_height()/2,
            format_duration(df_combined['duration_min'].iloc[i]), ha='left', va='center')

ax.set_title('Timeline of Arrest Warrant Execution', fontsize=15)
ax.set_xlabel('Duration (minutes)')
ax.grid(axis='x')
plt.tight_layout()
plt.show()
  • Displays the time spent as text next to each bar.
  • Set the graph title, x-axis label, and add a grid.
  • plt.tight_layout()to adjust the graph layout, plt.show()to display the graph.
테리 이모티콘
(Happy coding!)

Similar Posts