{"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\/ja\/%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":"\u6212\u53b3\u4ee4\u5ba3\u5e0343\u65e5\u5f8c\u306e\u97d3\u56fd\u5927\u7d71\u9818\u306e\u902e\u6355\u72b6\u57f7\u884c\u904e\u7a0b\u306e\u30bf\u30a4\u30e0\u30e9\u30a4\u30f3\u5206\u6790"},"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>2024\u5e7412\u67083\u65e5\u3001\u5927\u97d3\u6c11\u56fd\u3067\u61b2\u6cd5\u53f2\u4e0a\u521d\u3068\u306a\u308b\u4e8b\u4ef6\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002 \u5f53\u6642\u3001\u5927\u7d71\u9818\u306f\u975e\u5e38\u6212\u53b3\u4ee4\u3092\u5ba3\u8a00\u3057\u3001\u56fd\u4f1a\u5c01\u9396\u3068\u4e3b\u8981\u6a5f\u95a2\u306e\u5360\u62e0\u3092\u6307\u793a\u3057\u3001\u5185\u4e71\u306e\u7591\u3044\u3092\u53d7\u3051\u307e\u3057\u305f\u3002 \u3053\u308c\u306b\u3088\u308a\u3001\u902e\u6355\u72b6\u304c\u767a\u4ee4\u3055\u308c\u3001\u516c\u635c\u6240\u3068\u8b66\u8b77\u5e81\u3068\u306e\u7dca\u8feb\u3057\u305f\u5bfe\u7acb\u306e\u672b\u3001\u902e\u6355\u72b6\u304c\u57f7\u884c\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u4eca\u56de\u306e\u8a18\u4e8b\u3067\u306f\u3001\u4e8b\u4ef6\u306e\u4e3b\u306a\u7d4c\u904e\u3092\u6642\u7cfb\u5217\u3067\u307e\u3068\u3081\u305f\u30bf\u30a4\u30e0\u30c6\u30fc\u30d6\u30eb\u3092\u3082\u3068\u306b\u5206\u6790\u3057\u3001\u305d\u308c\u3092\u5143\u306b <a href=\"http:\/\/python.org\" target=\"_blank\" rel=\"noopener\">\u30d1\u30a4\u30bd\u30f3<\/a> \u30b3\u30fc\u30c9\u3068\u30d3\u30b8\u30e5\u30a2\u30e9\u30a4\u30bc\u30fc\u30b7\u30e7\u30f3\u3067\u4e00\u76ee\u3067\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u69cb\u6210\u3057\u307e\u3057\u305f\u3002<\/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\">\u902e\u6355\u72b6\u57f7\u884c\u30bf\u30a4\u30e0\u30c6\u30fc\u30d6\u30eb<\/h2>\n\n\n\n<p>\u4ee5\u4e0b\u306f\u3001\u5927\u97d3\u6c11\u56fd\u5927\u7d71\u9818\u306b\u5bfe\u3059\u308b2\u56de\u76ee\u306e\u902e\u6355\u72b6\u57f7\u884c\u5f53\u65e5\u306e\u4e3b\u306a\u6642\u9593\u5e2f\u5225\u306e\u9032\u884c\u72b6\u6cc1\u3067\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>04:28<\/strong>\u5230\u7740 : \u6f22\u5357\u6d1e\u5b98\u90b8\u5230\u7740<\/li>\n\n\n\n<li><strong>07:34<\/strong>: 1\u6b21\u963b\u6b62\u7dda\u901a\u904e<\/li>\n\n\n\n<li><strong>07:48<\/strong>\u8eca\u58c1\u8fc2\u56de\u53ca\u30732\u6b21\u963b\u6b62\u7dda\u901a\u904e : \u8eca\u58c1\u8fc2\u56de\u53ca\u30732\u6b21\u963b\u6b62\u7dda\u901a\u904e<\/li>\n\n\n\n<li><strong>07:57<\/strong>\u5b98\u90b8\u524d\u306e\u9244\u9580\u5230\u7740<\/li>\n\n\n\n<li><strong>08:23<\/strong>3\u6b21\u963b\u6b62\u7dda\u9244\u6249\u958b\u653e\u53ca\u3073\u635c\u67fb\u30c1\u30fc\u30e0\u8eca\u4e21\u306e\u9032\u5165<\/li>\n\n\n\n<li><strong>10:33<\/strong>\u902e\u6355\u72b6\u57f7\u884c : \u902e\u6355\u72b6\u57f7\u884c<\/li>\n\n\n\n<li><strong>10:52<\/strong>\u7a7a\u8f38\u5148\u5230\u7740<\/li>\n<\/ul>\n\n\n\n<p>\u7279\u306b\u3001\u6700\u521d\u306e\u5b98\u90b8\u5230\u7740\u5f8c\u3001\u7d043\u6642\u9593\u3001\u8b66\u8b77\u5e81\u3068\u7a7a\u8f38\u5e81\u306e\u9593\u3067\u5bfe\u7acb\u304c\u7d9a\u304d\u3001\u305d\u306e\u5f8c\u3001\u6bb5\u968e\u7684\u306b\u963b\u6b62\u7dda\u3092\u7a81\u7834\u3057\u3066\u902e\u6355\u304c\u884c\u308f\u308c\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30bf\u30a4\u30e0\u30c6\u30fc\u30d6\u30eb\u30d1\u30a4\u30bd\u30f3\u306e\u53ef\u8996\u5316<\/h2>\n\n\n\n<p>\u4ee5\u4e0b\u306f\u3001\u30a4\u30d9\u30f3\u30c8\u306e\u6d41\u308c\u3092Python\u3067\u53ef\u8996\u5316\u3059\u308b\u305f\u3081\u306e\u30b3\u30fc\u30c9\u3067\u3059\u3002 \u5404\u30b9\u30c6\u30c3\u30d7\u306e\u6240\u8981\u6642\u9593\u3092\u68d2\u30b0\u30e9\u30d5\u3067\u8868\u3057\u3001\u30a4\u30d9\u30f3\u30c8\u306e\u9032\u884c\u72b6\u6cc1\u3092\u660e\u78ba\u306b\u8868\u793a\u3057\u307e\u3059\u3002<\/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# \u7d4c\u904e\u6642\u9593\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u95a2\u6570\ndef format_duration(minutes)\uff1a\n    if minutes &gt;= 60\uff1a\n        hours = minutes \/\/ 60\n        mins = minutes % 60\n        return f\"{hours}hr {mins}min\"\n    else\uff1a\n        return f\"{minutes}min\"\n\n# \u6642\u9593\u8868\u30c7\u30fc\u30bf\ndata = [...\n    {\"time\"\uff1a\"04:28\", \"event\"\uff1a\"\u962a\u5357\u6d1e\u5230\u7740\"}\u3001\n    {\"time\"\uff1a\"07:34\", \"event\"\uff1a\"\u7b2c1\u691c\u554f\u6240\u901a\u904e\"}, {\"event\": \"\u7b2c1\u691c\u554f\u6240\u901a\u904e\"}\u3001\n    {\"time\"\uff1a\"07:48\", \"event\"\uff1a\"Bypass Barricade &amp; Pass 2nd Checkpoint\"}, {\"event\": \"Bypass Barricade &amp; Pass 2nd Checkpoint\"}\u3001\n    {\"time\"\uff1a\"07:57\", \"event\"\uff1a\n    {\"time\"\uff1a\"08:23\", \"event\"\uff1a\"3rd Checkpoint Gate Open &amp; Team Entry\"}, {\"time\": \"08:23\"}, \"event\": \"\u7b2c3\u30c1\u30a7\u30c3\u30af\u30dd\u30a4\u30f3\u30c8\u30b2\u30fc\u30c8\u30aa\u30fc\u30d7\u30f3\uff06\u30c1\u30fc\u30e0\u30a8\u30f3\u30c8\u30ea\u30fc\"}\u3001\n    {\"time\"\uff1a\"10:33\", \"event\"\uff1a\"\u902e\u6355\u72b6\u57f7\u884c\"}, {\"event\": \"\u902e\u6355\u72b6\u57f7\u884c\"}\u3001\n    {\"time\"\uff1a\"10:52\", \"event\"\uff1a\"CIO\u5230\u7740\"}, {\"time\": \"10:52\"}, \"event\": \"CIO \u5230\u7740\"}\n]\n\n# \u30c7\u30fc\u30bf\u30d5\u30ec\u30fc\u30e0\u306e\u751f\u6210\u3068\u6642\u9593\u5909\u63db\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\n# \u5408\u8a08\u6240\u8981\u6642\u9593\u306e\u8a08\u7b97\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\n# \u30b0\u30e9\u30d5\u751f\u6210\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\n# \u53ef\u8996\u5316\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)\uff1a\n    ax.text(bar.get_width() + 5, bar.get_y() + bar.get_height()\/2\u3001\n            format_duration(df_combined['duration_min'].iloc[i]), ha='left', va='center')\n\n# \u30b0\u30e9\u30d5\u8a2d\u5b9a\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 \ud83d\udcca \ud83d\udcca \ud83d\udcca <strong>\u30b0\u30e9\u30d5\u306e\u89e3\u91c8<\/strong><\/h4>\n\n\n\n<p>Python\u53ef\u8996\u5316\u306e\u7d50\u679c\u751f\u6210\u3055\u308c\u305f\u30b0\u30e9\u30d5\u306f\u6b21\u306e\u3088\u3046\u306a\u60c5\u5831\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u6700\u9577\u6240\u8981\u6642\u9593\uff1a<\/strong> \u6f22\u5357\u6d1e\u5b98\u90b8\u5230\u7740\u5f8c\u3001\u6700\u521d\u306e\u9632\u6f6e\u5824\u3092\u901a\u904e\u3059\u308b\u307e\u3067\u306b\u7d043\u6642\u9593(186\u5206)\u304b\u304b\u308a\u307e\u3057\u305f\u3002<\/li>\n\n\n\n<li><strong>\u902e\u6355\u72b6\u57f7\u884c\uff1a<\/strong> \u6700\u5f8c\u306e\u6bb5\u968e\u3067\u3042\u308b\u902e\u6355\u72b6\u57f7\u884c\u306f\u7d042\u6642\u9593\uff08130\u5206\uff09\u884c\u308f\u308c\u307e\u3057\u305f\u3002<\/li>\n\n\n\n<li><strong>\u5408\u8a08\u6240\u8981\u6642\u9593\uff1a<\/strong> \u4e8b\u4ef6\u5168\u4f53\u306e\u6240\u8981\u6642\u9593\u306f\u7d046\u6642\u959324\u5206\u3068\u8a08\u7b97\u3055\u308c\u307e\u3057\u305f\u3002<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u6574\u7406\u3059\u308b<\/strong><\/h2>\n\n\n\n<p>\u4eca\u56de\u306e\u902e\u6355\u72b6\u57f7\u884c\u4e8b\u4ef6\u306f\u3001\u61b2\u653f\u53f2\u4e0a\u521d\u306e\u4e8b\u614b\u3068\u3057\u3066\u8a18\u9332\u3055\u308c\u308b\u307b\u3069\u8907\u96d1\u304b\u3064\u7dca\u8feb\u3057\u305f\u3082\u306e\u3067\u3057\u305f\u3002 \u3053\u308c\u3092\u6642\u7cfb\u5217\u3067\u5206\u6790\u3057\u3001\u8996\u899a\u5316\u3059\u308b\u3053\u3068\u3067\u3001\u4e8b\u4ef6\u306e\u6d41\u308c\u3068\u5404\u6bb5\u968e\u306e\u91cd\u8981\u6027\u3092\u660e\u78ba\u306b\u7406\u89e3\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>Python\u306f\u3053\u306e\u3088\u3046\u306a <a href=\"https:\/\/secondlife.lol\/ja\/donut-chart-python-visualization\/\" data-type=\"post\" data-id=\"4014\">\u30c7\u30fc\u30bf\u3092\u8996\u899a\u7684\u306b\u8868\u73fe\u3059\u308b\u305f\u3081\u306e\u975e\u5e38\u306b\u5f37\u529b\u306a\u30c4\u30fc\u30eb<\/a>\u3067\u3059\u3002\u4e0a\u8a18\u306e\u30b3\u30fc\u30c9\u3092\u6d3b\u7528\u3057\u3066\u76f4\u63a5\u5b9f\u7fd2\u3057\u3066\u307f\u305f\u308a\u3001\u4ed6\u306e\u4e8b\u4ef6\u5206\u6790\u306b\u3082\u5fdc\u7528\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\uff01<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"># \u30b3\u30fc\u30c9\u8a73\u7d30\u89e3\u8aac<\/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.\u5fc5\u8981\u306a\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u8aad\u307f\u8fbc\u3080<\/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>: \u30b0\u30e9\u30d5\u3092\u63cf\u753b\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u308b\u57fa\u672c\u7684\u306a\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3059\u3002<\/li>\n\n\n\n<li><code>\u30d1\u30f3\u30c0<\/code>\uff1a\u30c7\u30fc\u30bf\u3092\u52b9\u7387\u7684\u306b\u51e6\u7406\u3059\u308b\u305f\u3081\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3059\u3002<\/li>\n\n\n\n<li><code>\u30b7\u30fc\u30dc\u30fc\u30f3<\/code>: matplotlib\u3092\u30d9\u30fc\u30b9\u306b\u3082\u3063\u3068\u7dba\u9e97\u306a\u30b0\u30e9\u30d5\u3092\u63cf\u3051\u308b\u3088\u3046\u306b\u3059\u308b\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3059\u3002<\/li>\n\n\n\n<li><code>\u65e5\u4ed8\u3068\u6642\u523b<\/code>: \u65e5\u4ed8\u3068\u6642\u523b\u3092\u6271\u3046\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u308b\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h5 class=\"wp-block-heading\">2.\u6642\u9593\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u5909\u63db\u95a2\u6570\u306e\u5b9a\u7fa9<\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>def format_duration(minutes)\uff1a\n    if minutes &gt;= 60\uff1a\n        hours = minutes \/\/ 60\n        mins = minutes % 60\n        return f\"{hours}hr {mins}min\"\n    else\uff1a\n        return f\"{minutes}min\"<\/code><\/pre>\n\n\n\n<p>\u3053\u306e\u95a2\u6570\u306f\u3001\u6307\u5b9a\u3055\u308c\u305f\u5206(minutes)\u3092\u6642\u9593\u3068\u5206\u306e\u5f62\u5f0f\u306b\u5909\u63db\u3057\u307e\u3059\u300260\u5206\u4ee5\u4e0a\u306e\u5834\u5408\u306f\u6642\u9593\u3068\u5206\u300160\u5206\u672a\u6e80\u306e\u5834\u5408\u306f\u5206\u3060\u3051\u8868\u793a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">3.\u30c7\u30fc\u30bf\u306e\u6e96\u5099\u3068\u51e6\u7406<\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>data = [...\n    {\"time\"\uff1a\"04:28\", \"event\"\uff1a\"Arrival at Hannam-dong\"}\u3001\n    # ... \u6b8b\u308a\u306e\u30c7\u30fc\u30bf ...\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>\u30c7\u30fc\u30bf\u3092\u30ea\u30b9\u30c8\u3068\u3057\u3066\u5b9a\u7fa9\u3057\u3001\u305d\u308c\u3092pandas DataFrame\u306b\u5909\u63db\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li>'time'\u5217\u3092datetime\u5f62\u5f0f\u306b\u5909\u63db\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li>'duration_min'\u5217\u3092\u8ffd\u52a0\u3057\u3066\u3001\u5404\u30a4\u30d9\u30f3\u30c8\u9593\u306e\u6642\u9593\u5dee\u3092\u5206\u5358\u4f4d\u3067\u8a08\u7b97\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h5 class=\"wp-block-heading\">4.\u5408\u8a08\u6240\u8981\u6642\u9593\u306e\u8a08\u7b97<\/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>\u6700\u521d\u306e\u30a4\u30d9\u30f3\u30c8\u304b\u3089\u6700\u5f8c\u306e\u30a4\u30d9\u30f3\u30c8\u307e\u3067\u306e\u5408\u8a08\u6240\u8981\u6642\u9593\u3092\u8a08\u7b97\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u7dcf\u6d88\u8cbb\u6642\u9593\u3092\u65b0\u3057\u3044DataFrame\u3092\u4f5c\u6210\u3057\u3001\u65e2\u5b58\u306e\u30c7\u30fc\u30bf\u3068\u7d50\u5408\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h5 class=\"wp-block-heading\">5.\u30b0\u30e9\u30d5\u306e\u4f5c\u6210\u3068\u53ef\u8996\u5316<\/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>\u3067\u30b0\u30e9\u30d5\u3092\u63cf\u753b\u3059\u308b\u9818\u57df\u3092\u751f\u6210\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u5404\u30a4\u30d9\u30f3\u30c8\u306e\u30e9\u30d9\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li><code>ax.barh()<\/code>\u3092\u4f7f\u7528\u3057\u3066\u6c34\u5e73\u68d2\u30b0\u30e9\u30d5\u3092\u63cf\u304d\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h5 class=\"wp-block-heading\">6.\u30b0\u30e9\u30d5\u306e\u8a73\u7d30\u8a2d\u5b9a<\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>for i, bar in enumerate(bars)\uff1a\n    ax.text(bar.get_width() + 5, bar.get_y() + bar.get_height()\/2\u3001\n            format_duration(df_combined['duration_min'].iloc[i]), ha='left', va='center')\n\nax.set_title('\u902e\u6355\u72b6\u57f7\u884c\u306e\u30bf\u30a4\u30e0\u30e9\u30a4\u30f3', fontsize=15)\nax.set_xlabel('Duration (\u5206)')\nax.grid(axis='x')\nplt.tight_layout()\nplt.show()<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5404\u30d0\u30fc\u306e\u6a2a\u306b\u6240\u8981\u6642\u9593\u3092\u30c6\u30ad\u30b9\u30c8\u3067\u8868\u793a\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u30b0\u30e9\u30d5\u306e\u30bf\u30a4\u30c8\u30eb\u3001x\u8ef8\u306e\u30e9\u30d9\u30eb\u3092\u8a2d\u5b9a\u3057\u3001\u30b0\u30ea\u30c3\u30c9\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li><code>plt.tight_layout()<\/code>\u3067\u30b0\u30e9\u30d5\u306e\u30ec\u30a4\u30a2\u30a6\u30c8\u3092\u8abf\u6574\u3057\u307e\u3059\u3001 <code>plt.show()<\/code>\u3067\u30b0\u30e9\u30d5\u3092\u8868\u793a\u3057\u307e\u3059\u3002<\/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>( \u697d\u3057\u304f\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3057\u307e\u3057\u3087\u3046\uff01 )<\/strong><\/figcaption><\/figure><\/div>","protected":false},"excerpt":{"rendered":"<p>2024\u5e7412\u67083\u65e5\u3001\u5927\u97d3\u6c11\u56fd\u3067\u61b2\u653f\u53f2\u4e0a\u521d\u3068\u306a\u308b\u4e8b\u4ef6\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002 \u5f53\u6642\u306e\u5927\u7d71\u9818\u306f...<\/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\/ja\/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\/ja\/wp-json\/wp\/v2\/posts\/4516","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/secondlife.lol\/ja\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/secondlife.lol\/ja\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/secondlife.lol\/ja\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/secondlife.lol\/ja\/wp-json\/wp\/v2\/comments?post=4516"}],"version-history":[{"count":6,"href":"https:\/\/secondlife.lol\/ja\/wp-json\/wp\/v2\/posts\/4516\/revisions"}],"predecessor-version":[{"id":4534,"href":"https:\/\/secondlife.lol\/ja\/wp-json\/wp\/v2\/posts\/4516\/revisions\/4534"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/secondlife.lol\/ja\/wp-json\/wp\/v2\/media\/4533"}],"wp:attachment":[{"href":"https:\/\/secondlife.lol\/ja\/wp-json\/wp\/v2\/media?parent=4516"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/secondlife.lol\/ja\/wp-json\/wp\/v2\/categories?post=4516"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/secondlife.lol\/ja\/wp-json\/wp\/v2\/tags?post=4516"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}