{"id":767,"date":"2024-05-06T01:22:51","date_gmt":"2024-05-05T16:22:51","guid":{"rendered":"https:\/\/chocottopro.com\/?p=767"},"modified":"2024-05-06T01:22:51","modified_gmt":"2024-05-05T16:22:51","slug":"%e3%80%90step-by-step%e3%80%91altair%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%9fpython%e3%83%87%e3%83%bc%e3%82%bf%e5%8f%af%e8%a6%96%e5%8c%96%e5%85%a5%e9%96%80-%e3%82%a4%e3%83%b3%e3%82%bf%e3%83%a9%e3%82%af","status":"publish","type":"post","link":"https:\/\/chocottopro.com\/?p=767","title":{"rendered":"\u3010step-by-step\u3011Altair\u3092\u4f7f\u3063\u305fPython\u30c7\u30fc\u30bf\u53ef\u8996\u5316\u5165\u9580 &#8211; \u30a4\u30f3\u30bf\u30e9\u30af\u30c6\u30a3\u30d6\u306a\u30b0\u30e9\u30d5\u4f5c\u6210\u304b\u3089\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u958b\u767a\u307e\u3067"},"content":{"rendered":"\n<p>Python\u3067\u30c7\u30fc\u30bf\u53ef\u8996\u5316\u3092\u3059\u308b\u969b\u306b\u3001Altair\u306f\u5f37\u529b\u306a\u9078\u629e\u80a2\u306e\u4e00\u3064\u3067\u3059\u3002\u30b7\u30f3\u30d7\u30eb\u3067\u5ba3\u8a00\u7684\u306a\u6587\u6cd5\u306b\u3088\u308a\u3001\u5c11\u306a\u3044\u30b3\u30fc\u30c9\u91cf\u3067\u7f8e\u3057\u304f\u8868\u73fe\u529b\u8c4a\u304b\u306a\u30b0\u30e9\u30d5\u3092\u4f5c\u6210\u3067\u304d\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001Altair\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\u304b\u3089\u5fdc\u7528\u7684\u306a\u30c6\u30af\u30cb\u30c3\u30af\u307e\u3067\u3001\u5b9f\u4f8b\u3092\u4ea4\u3048\u306a\u304c\u3089\u8a73\u3057\u304f\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-sgb-block-simple sgb-box-simple sgb-box-simple--title-normal sgb-box-simple--with-border\"><div style=\"background-color:var(--wp--preset--color--sango-main);color:#FFF\" class=\"sgb-box-simple__title\">\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3093\u3060\u3089\u308f\u304b\u308b\u3053\u3068<\/div><div class=\"sgb-box-simple__body\" style=\"border-color:var(--wp--preset--color--sango-main);background-color:#FFF\">\n<ul class=\"wp-block-list\">\n<li>Altair\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\u3068\u3001\u69d8\u3005\u306a\u30b0\u30e9\u30d5\u306e\u4f5c\u6210\u65b9\u6cd5 <\/li>\n\n\n\n<li>\u30a4\u30f3\u30bf\u30e9\u30af\u30c6\u30a3\u30d6\u6a5f\u80fd\u3084\u8907\u5408\u30b0\u30e9\u30d5\u306a\u3069\u3001\u9ad8\u5ea6\u306a\u53ef\u8996\u5316\u30c6\u30af\u30cb\u30c3\u30af <\/li>\n\n\n\n<li>Streamlit\u3092\u4f7f\u3063\u305fWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3078\u306eAltair\u306e\u7d44\u307f\u8fbc\u307f\u65b9 <\/li>\n\n\n\n<li>Altair\u3092\u5b66\u7fd2\u3059\u308b\u305f\u3081\u306e\u53c2\u8003\u8cc7\u6599\u3068\u30c1\u30fc\u30c8\u30b7\u30fc\u30c8 <\/li>\n\n\n\n<li>Altair\u3092\u4f7f\u3063\u305f\u30c7\u30fc\u30bf\u53ef\u8996\u5316\u306e\u53ef\u80fd\u6027\u3068\u6d3b\u7528\u30b7\u30fc\u30f3<\/li>\n<\/ul>\n<\/div><\/div>\n\n\n\n<div class=\"toc\"><br \/>\n<b>Warning<\/b>:  Undefined array key \"is_admin\" in <b>\/home\/c7479301\/public_html\/chocottopro.com\/wp-content\/themes\/sango-theme\/library\/gutenberg\/dist\/classes\/Toc.php<\/b> on line <b>116<\/b><br \/>\n<br \/>\n<b>Warning<\/b>:  Undefined array key \"is_category_top\" in <b>\/home\/c7479301\/public_html\/chocottopro.com\/wp-content\/themes\/sango-theme\/library\/gutenberg\/dist\/classes\/Toc.php<\/b> on line <b>121<\/b><br \/>\n<br \/>\n<b>Warning<\/b>:  Undefined array key \"is_top\" in <b>\/home\/c7479301\/public_html\/chocottopro.com\/wp-content\/themes\/sango-theme\/library\/gutenberg\/dist\/classes\/Toc.php<\/b> on line <b>128<\/b><br \/>\n    <div id=\"toc_container\" class=\"sgb-toc--bullets js-smooth-scroll\" data-dialog-title=\"Table of Contents\">\n      <p class=\"toc_title\">\u76ee\u6b21 <\/p>\n      <ul class=\"toc_list\">  <li class=\"first\">    <a href=\"#i-0\">Altair\u3068\u306f\uff1fPython\u30c7\u30fc\u30bf\u53ef\u8996\u5316\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u7279\u5fb4\u3068\u9b45\u529b<\/a>  <\/li>  <li>    <a href=\"#i-1\">Altair\u3092\u4f7f\u3063\u305f\u30c7\u30fc\u30bf\u53ef\u8996\u5316\u306e\u57fa\u672c\u30b9\u30c6\u30c3\u30d7<\/a>  <\/li>  <li>    <a href=\"#i-2\">Altair\u3067\u3088\u304f\u4f7f\u30467\u3064\u306e\u30b0\u30e9\u30d5\u3068\u4f5c\u6210\u65b9\u6cd5<\/a>    <ul class=\"menu_level_1\">      <li class=\"first\">        <a href=\"#i-3\">\u6298\u308c\u7dda\u30b0\u30e9\u30d5\u306e\u4f5c\u6210 \u2013 \u6642\u7cfb\u5217\u30c7\u30fc\u30bf\u306e\u53ef\u8996\u5316\u306b\u9069\u3057\u305f\u30b0\u30e9\u30d5<\/a>      <\/li>      <li>        <a href=\"#i-4\">\u6563\u5e03\u56f3\u306e\u4f5c\u6210 \u2013 2\u5909\u6570\u306e\u95a2\u4fc2\u6027\u3092\u898b\u308b\u306e\u306b\u9069\u3057\u305f\u30b0\u30e9\u30d5<\/a>      <\/li>      <li>        <a href=\"#i-5\">\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u306e\u4f5c\u6210 \u2013 \u30c7\u30fc\u30bf\u306e\u5206\u5e03\u3092\u898b\u308b\u306e\u306b\u9069\u3057\u305f\u30b0\u30e9\u30d5<\/a>      <\/li>      <li>        <a href=\"#i-6\">\u68d2\u30b0\u30e9\u30d5\u306e\u4f5c\u6210 \u2013 \u30ab\u30c6\u30b4\u30ea\u5225\u306e\u6570\u5024\u3092\u6bd4\u8f03\u3059\u308b\u306e\u306b\u9069\u3057\u305f\u30b0\u30e9\u30d5<\/a>      <\/li>      <li>        <a href=\"#i-7\">\u7bb1\u3072\u3052\u56f3\u306e\u4f5c\u6210 \u2013 \u30c7\u30fc\u30bf\u306e\u5206\u5e03\u3084\u5916\u308c\u5024\u3092\u898b\u308b\u306e\u306b\u9069\u3057\u305f\u30b0\u30e9\u30d5<\/a>      <\/li>      <li>        <a href=\"#i-8\">\u30d2\u30fc\u30c8\u30de\u30c3\u30d7\u306e\u4f5c\u6210 \u2013 3\u5909\u6570\u306e\u95a2\u4fc2\u6027\u3092\u8272\u306e\u6fc3\u6de1\u3067\u8868\u73fe\u3059\u308b\u30b0\u30e9\u30d5<\/a>      <\/li>      <li class=\"last\">        <a href=\"#i-9\">\u5730\u56f3\u4e0a\u306e\u30c7\u30fc\u30bf\u30d7\u30ed\u30c3\u30c8\u306e\u4f5c\u6210 \u2013 \u5730\u7406\u60c5\u5831\u3092\u53ef\u8996\u5316\u3059\u308b\u30b0\u30e9\u30d5<\/a>      <\/li>    <\/ul>  <\/li>  <li>    <a href=\"#i-10\">Altair\u306e\u5fdc\u7528\u7684\u306a\u4f7f\u3044\u65b9 \u2013 \u3088\u308a\u30ea\u30c3\u30c1\u306a\u30c7\u30fc\u30bf\u53ef\u8996\u5316\u3092\u76ee\u6307\u3057\u3066<\/a>    <ul class=\"menu_level_1\">      <li class=\"first\">        <a href=\"#i-11\">\u30a4\u30f3\u30bf\u30e9\u30af\u30c6\u30a3\u30d6\u6a5f\u80fd\u306e\u8ffd\u52a0\u65b9\u6cd5 \u2013 \u9078\u629e\uff64\u30ba\u30fc\u30e0\uff64\u30c4\u30fc\u30eb\u30c1\u30c3\u30d7\u306a\u3069<\/a>      <\/li>      <li>        <a href=\"#i-12\">\u8907\u6570\u30b0\u30e9\u30d5\u306e\u7d44\u307f\u5408\u308f\u305b\u65b9 \u2013 Facet\u3084layering\u3092\u4f7f\u3063\u305f\u8907\u5408\u30b0\u30e9\u30d5<\/a>      <\/li>      <li>        <a href=\"#i-13\">\u30b0\u30e9\u30d5\u306e\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u65b9\u6cd5 \u2013 \u8272\u3084\u30b9\u30bf\u30a4\u30eb\u306e\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3001\u51e1\u4f8b\u3084\u30bf\u30a4\u30c8\u30eb\u306e\u8a2d\u5b9a<\/a>      <\/li>      <li class=\"last\">        <a href=\"#i-14\">Altair\u3067\u4f5c\u3063\u305f\u30b0\u30e9\u30d5\u306e\u4fdd\u5b58\u65b9\u6cd5 \u2013 \u753b\u50cf\u3084HTML\u5f62\u5f0f\u3067\u306e\u4fdd\u5b58<\/a>      <\/li>    <\/ul>  <\/li>  <li>    <a href=\"#i-15\">Altair\u3092\u4f7f\u3063\u305f\u30c7\u30fc\u30bf\u53ef\u8996\u5316Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u958b\u767a<\/a>    <ul class=\"menu_level_1\">      <li class=\"first\">        <a href=\"#i-16\">Streamlit\u3092\u4f7f\u3063\u305fWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u4f5c\u6210\u65b9\u6cd5<\/a>      <\/li>      <li>        <a href=\"#i-17\">Altair\u3067\u4f5c\u3063\u305f\u30b0\u30e9\u30d5\u3092Streamlit\u30a2\u30d7\u30ea\u306b\u7d44\u307f\u8fbc\u3080\u65b9\u6cd5<\/a>      <\/li>      <li class=\"last\">        <a href=\"#i-18\">\u30a4\u30f3\u30bf\u30e9\u30af\u30c6\u30a3\u30d6\u306a\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u306e\u958b\u767a\u65b9\u6cd5<\/a>      <\/li>    <\/ul>  <\/li>  <li>    <a href=\"#i-19\">Altair\u3092\u4f7f\u3044\u3053\u306a\u3059\u305f\u3081\u306e\u53c2\u8003\u8cc7\u6599\u3068\u30c1\u30fc\u30c8\u30b7\u30fc\u30c8<\/a>    <ul class=\"menu_level_1\">      <li class=\"first\">        <a href=\"#i-20\">Altair\u306e\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u8aad\u307f\u65b9<\/a>      <\/li>      <li>        <a href=\"#i-21\">\u30b0\u30e9\u30d5\u4f5c\u6210\u306b\u4f7f\u3048\u308bPython &amp; Altair\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u96c6<\/a>      <\/li>      <li class=\"last\">        <a href=\"#i-22\">Altair\u306e\u30c1\u30fc\u30c8\u30b7\u30fc\u30c8\u3068\u9006\u5f15\u304d\u96c6<\/a>      <\/li>    <\/ul>  <\/li>  <li class=\"last\">    <a href=\"#i-23\">\u7d50\u8ad6\uff1aAltair\u3067\u30c7\u30fc\u30bf\u53ef\u8996\u5316\u306e\u53ef\u80fd\u6027\u3092\u5e83\u3052\u3088\u3046<\/a>  <\/li><\/ul>\n      \n    <\/div><\/div><h2 class=\"wp-block-heading\" id=\"i-0\">Altair\u3068\u306f\uff1fPython\u30c7\u30fc\u30bf\u53ef\u8996\u5316\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u7279\u5fb4\u3068\u9b45\u529b<\/h2>\n\n\n\n<p>Altair\u306f\u3001Python\u306b\u304a\u3051\u308b\u5ba3\u8a00\u7684\u306a\u7d71\u8a08\u30c7\u30fc\u30bf\u53ef\u8996\u5316\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3059\u3002Vega-Lite\u304a\u3088\u3073Vega\u3068\u3044\u3046\u53ef\u8996\u5316\u6587\u6cd5\u306b\u57fa\u3065\u3044\u3066\u304a\u308a\u3001\u30b7\u30f3\u30d7\u30eb\u3067\u4e00\u8cab\u6027\u306e\u3042\u308bAPI\u3092\u63d0\u4f9b\u3057\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u5c11\u306a\u3044\u30b3\u30fc\u30c9\u91cf\u3067\u7f8e\u3057\u304f\u30a4\u30f3\u30bf\u30e9\u30af\u30c6\u30a3\u30d6\u306a\u30b0\u30e9\u30d5\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>Altair\u306e\u5927\u304d\u306a\u7279\u5fb4\u306f\u3001\u5ba3\u8a00\u7684\u306aAPI\u3092\u63a1\u7528\u3057\u3066\u3044\u308b\u3053\u3068\u3067\u3059\u3002\u30b0\u30e9\u30d5\u306e\u69cb\u6210\u8981\u7d20\u3067\u3042\u308b\u30c7\u30fc\u30bf\u3001\u30de\u30fc\u30af\u3001\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u7b49\u3092\u5ba3\u8a00\u7684\u306b\u8a18\u8ff0\u3059\u308b\u3053\u3068\u3067\u3001\u4f55\u3092\u53ef\u8996\u5316\u3059\u308b\u304b\u306b\u6ce8\u529b\u3067\u304d\u3001\u3069\u306e\u3088\u3046\u306b\u53ef\u8996\u5316\u3059\u308b\u304b\u306fAltair\u304c\u6700\u9069\u5316\u3057\u3066\u304f\u308c\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u30b3\u30fc\u30c9\u306e\u53ef\u8aad\u6027\u3068\u518d\u5229\u7528\u6027\u304c\u9ad8\u307e\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4f8b\u3048\u3070\u3001\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u306f\u3001Altair\u3092\u4f7f\u3063\u3066\u7c21\u5358\u306b\u6298\u308c\u7dda\u30b0\u30e9\u30d5\u3092\u4f5c\u6210\u3059\u308b\u4f8b\u3067\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">import altair as alt\nfrom vega_datasets import data\n\nsource = data.stocks()\n\nalt.Chart(source).mark_line().encode(\n    x='date',\n    y='price',\n    color='symbol'\n).properties(\n    width=600, height=400\n)<\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"672\" src=\"https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.10.48-1024x672.png\" alt=\"\" class=\"wp-image-768\" srcset=\"https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.10.48-1024x672.png 1024w, https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.10.48-300x197.png 300w, https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.10.48-768x504.png 768w, https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.10.48-940x617.png 940w, https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.10.48.png 1430w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\"><\/figure>\n\n\n\n<p>\u3053\u306e\u3088\u3046\u306b\u3001\u30c7\u30fc\u30bf\u30bd\u30fc\u30b9\u3001\u30de\u30fc\u30af\uff08\u7dda\uff09\u3001\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\uff08x\u8ef8\u3001y\u8ef8\u3001\u8272\uff09\u3092\u308f\u304b\u308a\u3084\u3059\u304f\u8a18\u8ff0\u3059\u308b\u3060\u3051\u3067\u3001\u8907\u6570\u306e\u682a\u4fa1\u306e\u63a8\u79fb\u3092\u8868\u73fe\u3059\u308b\u6298\u308c\u7dda\u30b0\u30e9\u30d5\u3092\u4f5c\u6210\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>Altair\u3092\u4f7f\u3046\u30e1\u30ea\u30c3\u30c8\u306f\u3001\u5c11\u306a\u3044\u30b3\u30fc\u30c9\u91cf\u3067\u9ad8\u54c1\u8cea\u306a\u30b0\u30e9\u30d5\u3092\u4f5c\u6210\u3067\u304d\u308b\u3053\u3068\u306b\u52a0\u3048\u3001\u30b0\u30e9\u30d5\u306e\u898b\u305f\u76ee\u3084\u30a4\u30f3\u30bf\u30e9\u30af\u30b7\u30e7\u30f3\u3092\u7d30\u304b\u304f\u5236\u5fa1\u3067\u304d\u308b\u70b9\u306b\u3042\u308a\u307e\u3059\u3002\u307e\u305f\u3001Vega-Lite\u306e\u6587\u6cd5\u306b\u57fa\u3065\u3044\u3066\u3044\u308b\u305f\u3081\u3001\u4ed6\u306e\u8a00\u8a9e\u3078\u306e\u79fb\u690d\u6027\u3082\u9ad8\u304f\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>Altair\u306f\u30c7\u30fc\u30bf\u3001\u30de\u30fc\u30af\u3001\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3001\u30c8\u30e9\u30f3\u30b9\u30d5\u30a9\u30fc\u30e0\u3001\u30d3\u30e5\u30fc\u3068\u3044\u3046\u57fa\u672c\u7684\u306a\u69cb\u6210\u8981\u7d20\u3092\u7d44\u307f\u5408\u308f\u305b\u3066\u30b0\u30e9\u30d5\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\u30c7\u30fc\u30bf\u306f\u30b0\u30e9\u30d5\u5316\u3059\u308b\u30c7\u30fc\u30bf\uff08Pandas\u30c7\u30fc\u30bf\u30d5\u30ec\u30fc\u30e0\u7b49\uff09\u3001\u30de\u30fc\u30af\u306f\u30b0\u30e9\u30d5\u306e\u8996\u899a\u7684\u8981\u7d20\uff08\u68d2\u3001\u7dda\u3001\u70b9\u306a\u3069\uff09\u3001\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u306f\u30c7\u30fc\u30bf\u3092\u30de\u30fc\u30af\u306e\u5c5e\u6027\uff08\u4f4d\u7f6e\u3001\u8272\u3001\u5f62\u72b6\u7b49\uff09\u306b\u5272\u308a\u5f53\u3066\u308b\u65b9\u6cd5\u3001\u30c8\u30e9\u30f3\u30b9\u30d5\u30a9\u30fc\u30e0\u306f\u30c7\u30fc\u30bf\u306e\u5909\u63db\u3001\u96c6\u8a08\u3001\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u7b49\u3001\u30d3\u30e5\u30fc\u306f\u30b0\u30e9\u30d5\u306e\u30b5\u30a4\u30ba\u3001\u30bf\u30a4\u30c8\u30eb\u3001\u51e1\u4f8b\u306a\u3069\u306e\u8a2d\u5b9a\u3092\u8868\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>Altair\u306f\u3001Matplotlib\u306e\u3088\u3046\u306aimperative\u306a\u30a2\u30d7\u30ed\u30fc\u30c1\u3067\u306f\u306a\u304f\u3001\u5ba3\u8a00\u7684\u306a\u30a2\u30d7\u30ed\u30fc\u30c1\u3092\u53d6\u308b\u3053\u3068\u3067\u3001\u3088\u308a\u30b7\u30f3\u30d7\u30eb\u3067\u76f4\u611f\u7684\u306a\u30b3\u30fc\u30c9\u3067\u30b0\u30e9\u30d5\u3092\u4f5c\u6210\u3067\u304d\u307e\u3059\u3002\u307e\u305f\u3001Seaborn\u306e\u3088\u3046\u306a\u30b9\u30bf\u30a4\u30ea\u30c3\u30b7\u30e5\u306a\u30c7\u30d5\u30a9\u30eb\u30c8\u30c6\u30fc\u30de\u3092\u63d0\u4f9b\u3057\u3064\u3064\u3001\u67d4\u8edf\u306a\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3082\u53ef\u80fd\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4ee5\u4e0a\u306e\u3088\u3046\u306b\u3001Altair\u306f\u3001\u5ba3\u8a00\u7684\u3067\u6d17\u7df4\u3055\u308c\u305fAPI\u3001\u7f8e\u3057\u3044\u30c7\u30d5\u30a9\u30eb\u30c8\u30c6\u30fc\u30de\u3001\u512a\u308c\u305f\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u6027\u3092\u517c\u306d\u5099\u3048\u305fPython\u306e\u30c7\u30fc\u30bf\u53ef\u8996\u5316\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3059\u3002\u5c11\u306a\u3044\u30b3\u30fc\u30c9\u3067\u9ad8\u54c1\u8cea\u306a\u30b0\u30e9\u30d5\u3092\u4f5c\u6210\u3067\u304d\u3001\u30c7\u30fc\u30bf\u30b5\u30a4\u30a8\u30f3\u30c6\u30a3\u30b9\u30c8\u3084\u7814\u7a76\u8005\u306b\u611b\u3055\u308c\u308b\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u3072\u3068\u3064\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"i-1\">Altair\u3092\u4f7f\u3063\u305f\u30c7\u30fc\u30bf\u53ef\u8996\u5316\u306e\u57fa\u672c\u30b9\u30c6\u30c3\u30d7<\/h2>\n\n\n\n<p>Altair\u3092\u4f7f\u3063\u3066\u30c7\u30fc\u30bf\u53ef\u8996\u5316\u3092\u884c\u3046\u969b\u306e\u57fa\u672c\u7684\u306a\u6d41\u308c\u306f\u3001\u4ee5\u4e0b\u306e4\u3064\u306e\u30b9\u30c6\u30c3\u30d7\u306b\u5206\u3051\u3089\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u74b0\u5883\u8a2d\u5b9a: Python\u3068Altair\u3001\u305d\u306e\u4ed6\u5fc5\u8981\u306a\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u30c7\u30fc\u30bf\u306e\u6e96\u5099: \u53ef\u8996\u5316\u3059\u308b\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u8fbc\u307f\u3001\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u524d\u51e6\u7406\u3092\u884c\u3044\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u30b0\u30e9\u30d5\u306e\u4f5c\u6210: \u30de\u30fc\u30af\u3001\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3001\u30c8\u30e9\u30f3\u30b9\u30d5\u30a9\u30fc\u30e0\u7b49\u3092\u8a2d\u5b9a\u3057\u3066\u30b0\u30e9\u30d5\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u30b0\u30e9\u30d5\u306e\u8868\u793a: Jupyter\u30ce\u30fc\u30c8\u30d6\u30c3\u30af\u3084\u30a6\u30a7\u30d6\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u30b0\u30e9\u30d5\u3092\u8868\u793a\u3057\u307e\u3059\u3002<\/li>\n<\/ol>\n\n\n\n<p>\u307e\u305a\u3001\u74b0\u5883\u8a2d\u5b9a\u3067\u306fPython\u306e\u30d0\u30fc\u30b8\u30e7\u30f33.6\u4ee5\u4e0a\u304c\u5fc5\u8981\u3067\u3059\u3002Altair\u306f<code>pip install altair<\/code>\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u307e\u3059\u3002\u307e\u305f\u3001\u30c7\u30fc\u30bf\u51e6\u7406\u306b\u4f7f\u3046Pandas\u3084Numpy\u3001\u30b0\u30e9\u30d5\u306e\u8868\u793a\u306b\u4f7f\u3046Jupyter Notebook\u306a\u3069\u3082\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30c7\u30fc\u30bf\u306e\u6e96\u5099\u3067\u306f\u3001CSV\u3084JSON\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u8fbc\u3093\u3060\u308a\u3001Altair\u304c\u63d0\u4f9b\u3059\u308b\u30b5\u30f3\u30d7\u30eb\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u4f7f\u3063\u305f\u308a\u3057\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001CSV\u30d5\u30a1\u30a4\u30eb\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306bPandas\u306e<code>read_csv()<\/code>\u3067\u8aad\u307f\u8fbc\u3081\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">import pandas as pd\n\ndf = pd.read_csv('data.csv')<\/pre>\n\n\n\n<p>\u30b0\u30e9\u30d5\u306e\u4f5c\u6210\u306f\u3001<code>alt.Chart()<\/code>\u3067\u30c1\u30e3\u30fc\u30c8\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3059\u308b\u3068\u3053\u308d\u304b\u3089\u59cb\u307e\u308a\u307e\u3059\u3002\u6b21\u306b\u3001<code>mark_*()<\/code>\u3067\u30de\u30fc\u30af\uff08\u30dd\u30a4\u30f3\u30c8\u3001\u7dda\u3001\u68d2\u306a\u3069\uff09\u3092\u6307\u5b9a\u3057\u3001<code>encode()<\/code>\u3067\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\uff08x\u8ef8\u3001y\u8ef8\u3001\u8272\u3001\u30b5\u30a4\u30ba\u7b49\uff09\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002<code>properties()<\/code>\u3067\u306f\u30b0\u30e9\u30d5\u306e\u30b5\u30a4\u30ba\u7b49\u3092\u8a2d\u5b9a\u3057\u3001<code>interactive()<\/code>\u3067\u30ba\u30fc\u30e0\u3084\u30d1\u30f3\u306a\u3069\u306e\u30a4\u30f3\u30bf\u30e9\u30af\u30b7\u30e7\u30f3\u3092\u8ffd\u52a0\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4ee5\u4e0b\u306f\u3001Altair\u3092\u4f7f\u3063\u3066\u6563\u5e03\u56f3\u3092\u4f5c\u6210\u3059\u308b\u4f8b\u3067\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">import altair as alt\nfrom vega_datasets import data\n\nsource = data.cars()\n\nalt.Chart(source).mark_point().encode(\n    x='Horsepower',\n    y='Miles_per_Gallon',\n    color='Origin',\n    tooltip=['Name', 'Origin', 'Horsepower', 'Miles_per_Gallon']\n).interactive()<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"954\" height=\"764\" src=\"https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.11.08.png\" alt=\"\" class=\"wp-image-769\" srcset=\"https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.11.08.png 954w, https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.11.08-300x240.png 300w, https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.11.08-768x615.png 768w, https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.11.08-940x753.png 940w\" sizes=\"auto, (max-width: 954px) 100vw, 954px\"><\/figure>\n\n\n\n<p>\u3053\u306e\u30b3\u30fc\u30c9\u3067\u306f\u3001<code>data.cars()<\/code>\u3067\u30b5\u30f3\u30d7\u30eb\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u8aad\u307f\u8fbc\u307f\u3001<code>mark_point()<\/code>\u3067\u6563\u5e03\u56f3\u306e\u30de\u30fc\u30af\u3092\u6307\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<code>encode()<\/code>\u3067\u306f\u3001x\u8ef8\u306b<code>Horsepower<\/code>\u3001y\u8ef8\u306b<code>Miles_per_Gallon<\/code>\u3001\u8272\u306b<code>Origin<\/code>\u3092\u30de\u30c3\u30d4\u30f3\u30b0\u3057\u3001\u30c4\u30fc\u30eb\u30c1\u30c3\u30d7\u306b\u3082\u8907\u6570\u306e\u60c5\u5831\u3092\u8868\u793a\u3059\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002\u6700\u5f8c\u306b<code>interactive()<\/code>\u3092\u547c\u3073\u51fa\u3059\u3053\u3068\u3067\u3001\u30ba\u30fc\u30e0\u3084\u30d1\u30f3\u3001\u30db\u30d0\u30fc\u6642\u306e\u30c4\u30fc\u30eb\u30c1\u30c3\u30d7\u8868\u793a\u306a\u3069\u306e\u30a4\u30f3\u30bf\u30e9\u30af\u30c6\u30a3\u30d6\u6a5f\u80fd\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u6b21\u306e\u7ae0\u3067\u306f\u3001\u3053\u308c\u3089\u306e\u5404\u30b9\u30c6\u30c3\u30d7\u306b\u3064\u3044\u3066\u3088\u308a\u8a73\u7d30\u306b\u8aac\u660e\u3057\u3066\u3044\u304d\u307e\u3059\u3002\u74b0\u5883\u69cb\u7bc9\u306e\u624b\u9806\u3001\u30c7\u30fc\u30bf\u306e\u6e96\u5099\u65b9\u6cd5\u3001\u30b0\u30e9\u30d5\u306e\u8a2d\u5b9a\u65b9\u6cd5\u306a\u3069\u3001Altair\u3092\u4f7f\u3063\u305f\u30c7\u30fc\u30bf\u53ef\u8996\u5316\u306e\u30b3\u30c4\u3092\u9806\u3092\u8ffd\u3063\u3066\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"i-2\">Altair\u3067\u3088\u304f\u4f7f\u30467\u3064\u306e\u30b0\u30e9\u30d5\u3068\u4f5c\u6210\u65b9\u6cd5<\/h2>\n\n\n\n<p>Altair\u3092\u4f7f\u3048\u3070\u3001\u69d8\u3005\u306a\u7a2e\u985e\u306e\u30b0\u30e9\u30d5\u3092\u7c21\u5358\u306b\u4f5c\u6210\u3067\u304d\u307e\u3059\u3002\u3053\u3053\u3067\u306f\u3001\u3088\u304f\u4f7f\u308f\u308c\u308b7\u3064\u306e\u30b0\u30e9\u30d5\u306e\u7279\u5fb4\u3068\u4f5c\u6210\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-3\">\u6298\u308c\u7dda\u30b0\u30e9\u30d5\u306e\u4f5c\u6210 \u2013 \u6642\u7cfb\u5217\u30c7\u30fc\u30bf\u306e\u53ef\u8996\u5316\u306b\u9069\u3057\u305f\u30b0\u30e9\u30d5<\/h3>\n\n\n\n<p>\u6298\u308c\u7dda\u30b0\u30e9\u30d5\u306f\u3001\u6642\u7cfb\u5217\u30c7\u30fc\u30bf\u3084\u9023\u7d9a\u7684\u306a\u5909\u5316\u3092\u8868\u73fe\u3059\u308b\u306e\u306b\u9069\u3057\u3066\u3044\u307e\u3059\u3002Altair\u3067\u306f\u3001\u30de\u30fc\u30af\u306b<code>mark_line()<\/code>\u3092\u4f7f\u7528\u3057\u3001x\u8ef8\u306b\u6642\u9593\u3084\u9023\u7d9a\u7684\u306a\u5909\u6570\u3001y\u8ef8\u306b\u91cf\u3084\u5024\u3092\u5272\u308a\u5f53\u3066\u307e\u3059\u3002\u8907\u6570\u306e\u7dda\u3092\u8868\u793a\u3059\u308b\u5834\u5408\u306f\u3001<code>color<\/code>\u3084<code>strokeDash<\/code>\u3067\u30a8\u30f3\u30b3\u30fc\u30c9\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">import altair as alt\nfrom vega_datasets import data\n\nsource = data.stocks()\n\nalt.Chart(source).mark_line().encode(\n    x='date',\n    y='price',\n    color='symbol'\n)<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"870\" height=\"758\" src=\"https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.11.31.png\" alt=\"\" class=\"wp-image-770\" srcset=\"https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.11.31.png 870w, https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.11.31-300x261.png 300w, https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.11.31-768x669.png 768w\" sizes=\"auto, (max-width: 870px) 100vw, 870px\"><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-4\">\u6563\u5e03\u56f3\u306e\u4f5c\u6210 \u2013 2\u5909\u6570\u306e\u95a2\u4fc2\u6027\u3092\u898b\u308b\u306e\u306b\u9069\u3057\u305f\u30b0\u30e9\u30d5<\/h3>\n\n\n\n<p>\u6563\u5e03\u56f3\u306f\u30012\u3064\u306e\u9023\u7d9a\u5909\u6570\u306e\u95a2\u4fc2\u3092\u8868\u73fe\u3059\u308b\u306e\u306b\u9069\u3057\u3066\u3044\u307e\u3059\u3002Altair\u3067\u306f\u3001\u30de\u30fc\u30af\u306b<code>mark_point()<\/code>\u3092\u4f7f\u7528\u3057\u3001x\u8ef8\u3068y\u8ef8\u306b\u305d\u308c\u305e\u308c\u9023\u7d9a\u5909\u6570\u3092\u5272\u308a\u5f53\u3066\u307e\u3059\u3002\u8272\u3001\u5f62\u3001\u30b5\u30a4\u30ba\u306a\u3069\u3067\u3055\u3089\u306b\u60c5\u5831\u3092\u30a8\u30f3\u30b3\u30fc\u30c9\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">import altair as alt\nfrom vega_datasets import data\n\nsource = data.cars()\n\nalt.Chart(source).mark_point().encode(\n    x='Horsepower',\n    y='Miles_per_Gallon',\n    color='Origin'\n)<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"904\" height=\"766\" src=\"https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.11.46.png\" alt=\"\" class=\"wp-image-771\" srcset=\"https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.11.46.png 904w, https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.11.46-300x254.png 300w, https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.11.46-768x651.png 768w\" sizes=\"auto, (max-width: 904px) 100vw, 904px\"><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-5\">\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u306e\u4f5c\u6210 \u2013 \u30c7\u30fc\u30bf\u306e\u5206\u5e03\u3092\u898b\u308b\u306e\u306b\u9069\u3057\u305f\u30b0\u30e9\u30d5<\/h3>\n\n\n\n<p>\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u306f\u3001\u30c7\u30fc\u30bf\u306e\u5206\u5e03\u3092\u8868\u73fe\u3059\u308b\u306e\u306b\u9069\u3057\u3066\u3044\u307e\u3059\u3002Altair\u3067\u306f\u3001\u30de\u30fc\u30af\u306b<code>mark_bar()<\/code>\u3092\u4f7f\u7528\u3057\u3001x\u8ef8\u306b\u30d3\u30f3\u306e\u7bc4\u56f2\u3001y\u8ef8\u306b\u30d3\u30f3\u306e\u5ea6\u6570\u3092\u5272\u308a\u5f53\u3066\u307e\u3059\u3002<code>bin=True<\/code>\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u3067\u3001\u9023\u7d9a\u5909\u6570\u3092\u81ea\u52d5\u7684\u306b\u30d3\u30f3\u5206\u5272\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">import altair as alt\nfrom vega_datasets import data\n\nsource = data.cars()\n\nalt.Chart(source).mark_bar().encode(\n    alt.X('Horsepower', bin=True),\n    y='count()'\n)<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"812\" height=\"770\" src=\"https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.12.33.png\" alt=\"\" class=\"wp-image-773\" srcset=\"https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.12.33.png 812w, https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.12.33-300x284.png 300w, https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.12.33-768x728.png 768w\" sizes=\"auto, (max-width: 812px) 100vw, 812px\"><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-6\">\u68d2\u30b0\u30e9\u30d5\u306e\u4f5c\u6210 \u2013 \u30ab\u30c6\u30b4\u30ea\u5225\u306e\u6570\u5024\u3092\u6bd4\u8f03\u3059\u308b\u306e\u306b\u9069\u3057\u305f\u30b0\u30e9\u30d5<\/h3>\n\n\n\n<p>\u68d2\u30b0\u30e9\u30d5\u306f\u3001\u30ab\u30c6\u30b4\u30ea\u5909\u6570\u306e\u91cf\u3084\u983b\u5ea6\u3092\u6bd4\u8f03\u3059\u308b\u306e\u306b\u9069\u3057\u3066\u3044\u307e\u3059\u3002Altair\u3067\u306f\u3001\u30de\u30fc\u30af\u306b<code>mark_bar()<\/code>\u3092\u4f7f\u7528\u3057\u3001x\u8ef8\u307e\u305f\u306fy\u8ef8\u306b\u30ab\u30c6\u30b4\u30ea\u5909\u6570\u3001\u3082\u3046\u4e00\u65b9\u306e\u8ef8\u306b\u91cf\u3084\u983b\u5ea6\u3092\u5272\u308a\u5f53\u3066\u307e\u3059\u3002\u8272\u3084\u4e26\u3073\u66ff\u3048\u3067\u3055\u3089\u306b\u60c5\u5831\u3092\u30a8\u30f3\u30b3\u30fc\u30c9\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">import altair as alt\nfrom vega_datasets import data\n\nsource = data.cars()\n\nalt.Chart(source).mark_bar().encode(\n    x='Origin',\n    y='count()',\n    color='Origin'\n)<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"484\" height=\"804\" src=\"https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.12.45.png\" alt=\"\" class=\"wp-image-774\" srcset=\"https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.12.45.png 484w, https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.12.45-181x300.png 181w\" sizes=\"auto, (max-width: 484px) 100vw, 484px\"><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-7\">\u7bb1\u3072\u3052\u56f3\u306e\u4f5c\u6210 \u2013 \u30c7\u30fc\u30bf\u306e\u5206\u5e03\u3084\u5916\u308c\u5024\u3092\u898b\u308b\u306e\u306b\u9069\u3057\u305f\u30b0\u30e9\u30d5<\/h3>\n\n\n\n<p>\u7bb1\u3072\u3052\u56f3\u306f\u3001\u30c7\u30fc\u30bf\u306e\u5206\u5e03\u3001\u4e2d\u592e\u5024\u3001\u56db\u5206\u4f4d\u7bc4\u56f2\u3001\u5916\u308c\u5024\u3092\u8868\u73fe\u3059\u308b\u306e\u306b\u9069\u3057\u3066\u3044\u307e\u3059\u3002Altair\u3067\u306f\u3001\u30de\u30fc\u30af\u306b<code>mark_boxplot()<\/code>\u3092\u4f7f\u7528\u3057\u3001x\u8ef8\u307e\u305f\u306fy\u8ef8\u306b\u30ab\u30c6\u30b4\u30ea\u5909\u6570\u3001\u3082\u3046\u4e00\u65b9\u306e\u8ef8\u306b\u91cf\u7684\u5909\u6570\u3092\u5272\u308a\u5f53\u3066\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">import altair as alt\nfrom vega_datasets import data\n\nsource = data.cars()\n\nalt.Chart(source).mark_boxplot().encode(\n    x='Origin',\n    y='Miles_per_Gallon'\n)<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"378\" height=\"810\" src=\"https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.12.59.png\" alt=\"\" class=\"wp-image-775\" srcset=\"https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.12.59.png 378w, https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.12.59-140x300.png 140w\" sizes=\"auto, (max-width: 378px) 100vw, 378px\"><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-8\">\u30d2\u30fc\u30c8\u30de\u30c3\u30d7\u306e\u4f5c\u6210 \u2013 3\u5909\u6570\u306e\u95a2\u4fc2\u6027\u3092\u8272\u306e\u6fc3\u6de1\u3067\u8868\u73fe\u3059\u308b\u30b0\u30e9\u30d5<\/h3>\n\n\n\n<p>\u30d2\u30fc\u30c8\u30de\u30c3\u30d7\u306f\u30012\u3064\u306e\u30ab\u30c6\u30b4\u30ea\u5909\u6570\u3068\u305d\u308c\u306b\u5bfe\u5fdc\u3059\u308b\u5024\u3092\u8272\u3067\u8868\u73fe\u3059\u308b\u306e\u306b\u9069\u3057\u3066\u3044\u307e\u3059\u3002Altair\u3067\u306f\u3001\u30de\u30fc\u30af\u306b<code>mark_rect()<\/code>\u3092\u4f7f\u7528\u3057\u3001x\u8ef8\u3068y\u8ef8\u306b\u30ab\u30c6\u30b4\u30ea\u5909\u6570\u3001\u8272\u306b\u5024\u3092\u5272\u308a\u5f53\u3066\u307e\u3059\u3002<code>aggregate<\/code>\u3092\u4f7f\u3063\u3066\u30c7\u30fc\u30bf\u3092\u96c6\u8a08\u3059\u308b\u3053\u3068\u304c\u591a\u3044\u3067\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">import altair as alt\nfrom vega_datasets import data\n\nsource = data.cars()\n\nalt.Chart(source).mark_rect().encode(\n    x='Cylinders:O',\n    y='Origin:O',\n    color='count():Q'\n)<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"684\" height=\"278\" src=\"https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.13.12.png\" alt=\"\" class=\"wp-image-776\" srcset=\"https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.13.12.png 684w, https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.13.12-300x122.png 300w\" sizes=\"auto, (max-width: 684px) 100vw, 684px\"><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-9\">\u5730\u56f3\u4e0a\u306e\u30c7\u30fc\u30bf\u30d7\u30ed\u30c3\u30c8\u306e\u4f5c\u6210 \u2013 \u5730\u7406\u60c5\u5831\u3092\u53ef\u8996\u5316\u3059\u308b\u30b0\u30e9\u30d5<\/h3>\n\n\n\n<p>\u5730\u56f3\u306f\u3001\u5730\u7406\u7a7a\u9593\u30c7\u30fc\u30bf\u3092\u53ef\u8996\u5316\u3059\u308b\u306e\u306b\u9069\u3057\u3066\u3044\u307e\u3059\u3002Altair\u3067\u306f\u3001\u30de\u30fc\u30af\u306b<code>mark_geoshape()<\/code>\u3092\u4f7f\u7528\u3057\u3001<code>lookup<\/code>\u3092\u4f7f\u3063\u3066\u5730\u56f3\u30c7\u30fc\u30bf\u3068\u30c7\u30fc\u30bf\u3092\u7d50\u5408\u3057\u307e\u3059\u3002\u8272\u3084\u5927\u304d\u3055\u3067\u30c7\u30fc\u30bf\u3092\u30a8\u30f3\u30b3\u30fc\u30c9\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">import altair as alt\nfrom vega_datasets import data\n\ncounties = alt.topo_feature(data.us_10m.url, 'counties')\nsource = data.unemployment.url\n\nalt.Chart(counties).mark_geoshape().encode(\n    color='rate:Q'\n).transform_lookup(\n    lookup='id',\n    from_=alt.LookupData(source, 'id', ['rate'])\n).project(\n    type='albersUsa'\n).properties(\n    width=500,\n    height=300\n)<\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"575\" src=\"https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.13.30-1024x575.png\" alt=\"\" class=\"wp-image-777\" srcset=\"https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.13.30-1024x575.png 1024w, https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.13.30-300x168.png 300w, https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.13.30-768x431.png 768w, https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.13.30-940x528.png 940w, https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.13.30.png 1218w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\"><\/figure>\n\n\n\n<p>\u4ee5\u4e0a\u306e7\u3064\u306e\u30b0\u30e9\u30d5\u306f\u3001\u30c7\u30fc\u30bf\u306e\u7279\u6027\u3084\u53ef\u8996\u5316\u306e\u76ee\u7684\u306b\u5fdc\u3058\u3066\u4f7f\u3044\u5206\u3051\u308b\u3068\u52b9\u679c\u7684\u3067\u3059\u3002Altair\u3067\u306f\u3001\u3053\u308c\u3089\u306e\u30b0\u30e9\u30d5\u3092\u7c21\u5358\u306a\u30b3\u30fc\u30c9\u3067\u4f5c\u6210\u3067\u304d\u3001\u30a4\u30f3\u30bf\u30e9\u30af\u30c6\u30a3\u30d6\u6027\u3082\u4ed8\u52a0\u3067\u304d\u307e\u3059\u3002\u305c\u3072\u5b9f\u969b\u306e\u30c7\u30fc\u30bf\u3092\u4f7f\u3063\u3066\u8a66\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"i-10\">Altair\u306e\u5fdc\u7528\u7684\u306a\u4f7f\u3044\u65b9 \u2013 \u3088\u308a\u30ea\u30c3\u30c1\u306a\u30c7\u30fc\u30bf\u53ef\u8996\u5316\u3092\u76ee\u6307\u3057\u3066<\/h2>\n\n\n\n<p>Altair\u306f\u3001\u5358\u7d14\u306a\u30b0\u30e9\u30d5\u306e\u4f5c\u6210\u3060\u3051\u3067\u306a\u304f\u3001\u3088\u308a\u9ad8\u5ea6\u3067\u9b45\u529b\u7684\u306a\u30c7\u30fc\u30bf\u53ef\u8996\u5316\u3092\u5b9f\u73fe\u3059\u308b\u305f\u3081\u306e\u69d8\u3005\u306a\u6a5f\u80fd\u3092\u63d0\u4f9b\u3057\u3066\u3044\u307e\u3059\u3002\u3053\u3053\u3067\u306f\u3001\u30a4\u30f3\u30bf\u30e9\u30af\u30c6\u30a3\u30d6\u6a5f\u80fd\u306e\u8ffd\u52a0\u3001\u8907\u6570\u30b0\u30e9\u30d5\u306e\u7d44\u307f\u5408\u308f\u305b\u3001\u30b0\u30e9\u30d5\u306e\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3001\u30b0\u30e9\u30d5\u306e\u4fdd\u5b58\u306a\u3069\u3001Altair\u306e\u5fdc\u7528\u7684\u306a\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-11\">\u30a4\u30f3\u30bf\u30e9\u30af\u30c6\u30a3\u30d6\u6a5f\u80fd\u306e\u8ffd\u52a0\u65b9\u6cd5 \u2013 \u9078\u629e\uff64\u30ba\u30fc\u30e0\uff64\u30c4\u30fc\u30eb\u30c1\u30c3\u30d7\u306a\u3069<\/h3>\n\n\n\n<p>Altair\u3067\u306f\u3001<code>selection<\/code>\u3092\u4f7f\u3063\u3066\u30a4\u30f3\u30bf\u30e9\u30af\u30c6\u30a3\u30d6\u306a\u9078\u629e\u6a5f\u80fd\u3092\u8ffd\u52a0\u3067\u304d\u307e\u3059\u3002<code>selection_single<\/code>\uff08\u5358\u4e00\u9078\u629e\uff09\u3001<code>selection_multi<\/code>\uff08\u8907\u6570\u9078\u629e\uff09\u3001<code>selection_interval<\/code>\uff08\u7bc4\u56f2\u9078\u629e\uff09\u306a\u3069\u304c\u3042\u308a\u3001\u9078\u629e\u3057\u305f\u8981\u7d20\u306e\u60c5\u5831\u3092\u4ed6\u306e\u30b0\u30e9\u30d5\u306b\u30ea\u30f3\u30af\u3055\u305b\u308b\u3053\u3068\uff08\u30d6\u30e9\u30b7\u30f3\u30b0\uff06\u30ea\u30f3\u30ad\u30f3\u30b0\uff09\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4ee5\u4e0b\u306f\u3001\u30a4\u30f3\u30bf\u30e9\u30af\u30c6\u30a3\u30d6\u306a\u6563\u5e03\u56f3\u306e\u4f8b\u3067\u3059\u3002\u51e1\u4f8b\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u3001\u5bfe\u5fdc\u3059\u308b\u70b9\u306e\u4e0d\u900f\u660e\u5ea6\u304c\u5909\u5316\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">import altair as alt\nfrom vega_datasets import data\n\nsource = data.cars()\n\nselector = alt.selection_single(fields=['Origin'], bind='legend')\n\nalt.Chart(source).mark_point().encode(\n    x='Horsepower',\n    y='Miles_per_Gallon',\n    color='Origin',\n    opacity=alt.condition(selector, alt.value(1), alt.value(0.1))\n).add_selection(selector)<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"912\" height=\"750\" src=\"https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.13.51.png\" alt=\"\" class=\"wp-image-778\" srcset=\"https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.13.51.png 912w, https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.13.51-300x247.png 300w, https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.13.51-768x632.png 768w\" sizes=\"auto, (max-width: 912px) 100vw, 912px\"><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-12\">\u8907\u6570\u30b0\u30e9\u30d5\u306e\u7d44\u307f\u5408\u308f\u305b\u65b9 \u2013 Facet\u3084layering\u3092\u4f7f\u3063\u305f\u8907\u5408\u30b0\u30e9\u30d5<\/h3>\n\n\n\n<p>Altair\u3067\u306f\u3001<code>facet<\/code>\u3092\u4f7f\u3063\u3066\u30c7\u30fc\u30bf\u3092\u30b5\u30d6\u30bb\u30c3\u30c8\u306b\u5206\u5272\u3057\u3001\u8907\u6570\u306e\u30b0\u30e9\u30d5\u3092\u4e26\u3079\u3066\u8868\u793a\u3067\u304d\u307e\u3059\u3002<code>row<\/code>\u3001<code>column<\/code>\u3001<code>facet<\/code>\u3092\u4f7f\u3063\u3066\u30b0\u30e9\u30d5\u3092\u30b0\u30ea\u30c3\u30c9\u72b6\u306b\u914d\u7f6e\u3057\u305f\u308a\u3001<code>layer<\/code>\u3092\u4f7f\u3063\u3066\u8907\u6570\u306e\u30b0\u30e9\u30d5\u3092\u91cd\u306d\u3066\u8868\u793a\u3057\u305f\u308a\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4ee5\u4e0b\u306f\u3001\u30d5\u30a1\u30bb\u30c3\u30c8\u3068\u30ec\u30a4\u30e4\u30fc\u3092\u4f7f\u3063\u305f\u8907\u5408\u30b0\u30e9\u30d5\u306e\u4f8b\u3067\u3059\u3002\u8eca\u306e\u539f\u7523\u56fd\u3054\u3068\u306b\u6563\u5e03\u56f3\u3092\u8868\u793a\u3057\u3001\u305d\u308c\u305e\u308c\u306b\u56de\u5e30\u76f4\u7dda\u3092\u91cd\u306d\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">import altair as alt\nfrom vega_datasets import data\n\nsource = data.cars()\n\nbase = alt.Chart(source).mark_point().encode(\n    x='Horsepower',\n    y='Miles_per_Gallon',\n    color='Origin'\n).properties(\n    width=200,\n    height=200\n)\n\nline = base.mark_line(color='black').encode(\n    x='Horsepower',\n    y='mean(Miles_per_Gallon)'\n)\n\nfacet = (base + line).facet('Origin', columns=3)\n\nfacet<\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"346\" src=\"https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.16.16-1024x346.png\" alt=\"\" class=\"wp-image-779\" srcset=\"https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.16.16-1024x346.png 1024w, https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.16.16-300x101.png 300w, https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.16.16-768x259.png 768w, https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.16.16-1536x518.png 1536w, https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.16.16-940x317.png 940w, https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.16.16.png 1748w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\"><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-13\">\u30b0\u30e9\u30d5\u306e\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u65b9\u6cd5 \u2013 \u8272\u3084\u30b9\u30bf\u30a4\u30eb\u306e\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3001\u51e1\u4f8b\u3084\u30bf\u30a4\u30c8\u30eb\u306e\u8a2d\u5b9a<\/h3>\n\n\n\n<p>Altair\u3067\u306f\u3001<code>configure_()<\/code>\u3092\u4f7f\u3063\u3066\u30b0\u30e9\u30d5\u306e\u5404\u8981\u7d20\uff08\u8ef8\u3001\u51e1\u4f8b\u3001\u30bf\u30a4\u30c8\u30eb\u306a\u3069\uff09\u306e\u30b9\u30bf\u30a4\u30eb\u3092\u4e00\u62ec\u3067\u5909\u66f4\u3067\u304d\u307e\u3059\u3002\u307e\u305f\u3001<code>encode<\/code>\u5185\u3067\u500b\u5225\u306e\u8981\u7d20\u306e\u30b9\u30bf\u30a4\u30eb\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002\u30de\u30fc\u30af\u306e\u8272\u3001\u30b5\u30a4\u30ba\u3001\u4e0d\u900f\u660e\u5ea6\u306a\u3069\u3082\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u53ef\u80fd\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u4ee5\u4e0b\u306f\u3001\u30b9\u30bf\u30a4\u30eb\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3057\u305f\u6563\u5e03\u56f3\u306e\u4f8b\u3067\u3059\u3002\u30de\u30fc\u30af\u306e\u30b5\u30a4\u30ba\u3068\u4e0d\u900f\u660e\u5ea6\u3092\u5909\u66f4\u3057\u3001\u8272\u306b\u7279\u5b9a\u306e\u30ab\u30e9\u30fc\u30b9\u30ad\u30fc\u30e0\u3092\u9069\u7528\u3057\u3066\u3044\u307e\u3059\u3002\u307e\u305f\u3001\u8ef8\u3068\u51e1\u4f8b\u306e\u30d5\u30a9\u30f3\u30c8\u30b5\u30a4\u30ba\u3082\u5909\u66f4\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">import altair as alt\nfrom vega_datasets import data\n\nsource = data.cars()\n\nalt.Chart(source).mark_point(size=100, filled=True).encode(\n    x='Horsepower',\n    y='Miles_per_Gallon',\n    color=alt.Color('Origin', scale=alt.Scale(scheme='category10')),\n    opacity=alt.value(0.7)\n).properties(\n    width=500,\n    height=300\n).configure_axis(\n    labelFontSize=14,\n    titleFontSize=16\n).configure_legend(\n    titleFontSize=16\n)<\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"516\" src=\"https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.17.15-1024x516.png\" alt=\"\" class=\"wp-image-780\" srcset=\"https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.17.15-1024x516.png 1024w, https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.17.15-300x151.png 300w, https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.17.15-768x387.png 768w, https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.17.15-940x474.png 940w, https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.17.15.png 1452w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\"><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-14\">Altair\u3067\u4f5c\u3063\u305f\u30b0\u30e9\u30d5\u306e\u4fdd\u5b58\u65b9\u6cd5 \u2013 \u753b\u50cf\u3084HTML\u5f62\u5f0f\u3067\u306e\u4fdd\u5b58<\/h3>\n\n\n\n<p>Altair\u3067\u4f5c\u6210\u3057\u305f\u30b0\u30e9\u30d5\u306f\u3001\u69d8\u3005\u306a\u5f62\u5f0f\u3067\u4fdd\u5b58\u3067\u304d\u307e\u3059\u3002<code>chart.save('filename.json')<\/code>\u3067\u30b0\u30e9\u30d5\u3092JSON\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u4fdd\u5b58\u3057\u3001<code>chart.save('filename.html')<\/code>\u3067\u30b0\u30e9\u30d5\u3092HTML\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u4fdd\u5b58\u3067\u304d\u307e\u3059\u3002\u307e\u305f\u3001<code>chart.save('filename.png')<\/code>\u3067\u30b0\u30e9\u30d5\u3092\u753b\u50cf\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u4fdd\u5b58\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u304c\u3001\u3053\u306e\u5834\u5408\u306fchromedrive\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u4ee5\u4e0b\u306f\u3001\u30b0\u30e9\u30d5\u3092\u5404\u5f62\u5f0f\u3067\u4fdd\u5b58\u3059\u308b\u4f8b\u3067\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">import altair as alt\nfrom vega_datasets import data\n\nsource = data.cars()\n\nchart = alt.Chart(source).mark_point().encode(\n    x='Horsepower',\n    y='Miles_per_Gallon',\n    color='Origin'\n)\n\nchart.save('chart.json')\nchart.save('chart.html')\nchart.save('chart.png', scale_factor=2.0)<\/pre>\n\n\n\n<p>\u4ee5\u4e0a\u306e\u3088\u3046\u306b\u3001Altair\u306b\u306f\u69d8\u3005\u306a\u5fdc\u7528\u7684\u306a\u6a5f\u80fd\u304c\u3042\u308a\u3001\u3053\u308c\u3089\u3092\u6d3b\u7528\u3059\u308b\u3053\u3068\u3067\u3088\u308a\u30ea\u30c3\u30c1\u3067\u30a4\u30f3\u30bf\u30e9\u30af\u30c6\u30a3\u30d6\u306a\u30c7\u30fc\u30bf\u53ef\u8996\u5316\u3092\u5b9f\u73fe\u3067\u304d\u307e\u3059\u3002\u305c\u3072\u5b9f\u969b\u306e\u30c7\u30fc\u30bf\u3092\u4f7f\u3063\u3066\u8a66\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"i-15\">Altair\u3092\u4f7f\u3063\u305f\u30c7\u30fc\u30bf\u53ef\u8996\u5316Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u958b\u767a<\/h2>\n\n\n\n<p>Altair\u3067\u4f5c\u6210\u3057\u305f\u30b0\u30e9\u30d5\u3092Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u7d44\u307f\u8fbc\u3080\u3053\u3068\u3067\u3001\u30a4\u30f3\u30bf\u30e9\u30af\u30c6\u30a3\u30d6\u306a\u30c7\u30fc\u30bf\u53ef\u8996\u5316\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u3092\u958b\u767a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3053\u3053\u3067\u306f\u3001Python\u306eWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u3042\u308bStreamlit\u3092\u4f7f\u3063\u3066\u3001Altair\u306e\u30b0\u30e9\u30d5\u3092\u7d44\u307f\u8fbc\u3080\u65b9\u6cd5\u3092\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-16\">Streamlit\u3092\u4f7f\u3063\u305fWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u4f5c\u6210\u65b9\u6cd5<\/h3>\n\n\n\n<p>Streamlit\u306f\u3001Python\u3067Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u7c21\u5358\u306b\u4f5c\u6210\u3067\u304d\u308b\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u3059\u3002\u7279\u306b\u30c7\u30fc\u30bf\u30b5\u30a4\u30a8\u30f3\u30b9\u3084\u30c7\u30fc\u30bf\u53ef\u8996\u5316\u306e\u305f\u3081\u306eWeb\u30a2\u30d7\u30ea\u306b\u9069\u3057\u3066\u304a\u308a\u3001\u30b7\u30f3\u30d7\u30eb\u306aAPI\u3001\u81ea\u52d5UI\u306e\u751f\u6210\u3001\u9ad8\u901f\u306a\u958b\u767a\u306a\u3069\u304c\u7279\u5fb4\u3067\u3059\u3002<\/p>\n\n\n\n<p>Streamlit\u3092\u4f7f\u3046\u306b\u306f\u3001\u307e\u305a<code>streamlit<\/code>\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\uff08<code>pip install streamlit<\/code>\uff09\u3002\u6b21\u306b\u3001Python\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u6210\u3057\u3001<code>streamlit<\/code>\u306e\u5404\u7a2e\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3063\u3066UI\u3092\u69cb\u7bc9\u3057\u307e\u3059\u3002\u6700\u5f8c\u306b\u3001<code>streamlit run<\/code>\u30b3\u30de\u30f3\u30c9\u3067\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3057\u3001Web\u30a2\u30d7\u30ea\u3092\u8d77\u52d5\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4ee5\u4e0b\u306f\u3001\u7c21\u5358\u306aStreamlit\u30a2\u30d7\u30ea\u306e\u4f8b\u3067\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">import streamlit as st\n\nst.title('My first Streamlit app')\n\nname = st.text_input('Enter your name', '')\nage = st.number_input('Enter your age', min_value=0, max_value=120, value=25)\n\nif st.button('Submit'):\n    st.write(f'Hello, {name}! You are {age} years old.')<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-17\">Altair\u3067\u4f5c\u3063\u305f\u30b0\u30e9\u30d5\u3092Streamlit\u30a2\u30d7\u30ea\u306b\u7d44\u307f\u8fbc\u3080\u65b9\u6cd5<\/h3>\n\n\n\n<p>Altair\u3067\u4f5c\u6210\u3057\u305f\u30b0\u30e9\u30d5\u306f\u3001<code>streamlit<\/code>\u306e<code>st.altair_chart()<\/code>\u3092\u4f7f\u3063\u3066Streamlit\u30a2\u30d7\u30ea\u306b\u7c21\u5358\u306b\u7d44\u307f\u8fbc\u3080\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u30a4\u30f3\u30bf\u30e9\u30af\u30c6\u30a3\u30d6\u6a5f\u80fd\u3082\u542b\u3081\u3066\u3001\u305d\u306e\u307e\u307eWeb\u30a2\u30d7\u30ea\u4e0a\u3067\u52d5\u4f5c\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4ee5\u4e0b\u306f\u3001Altair\u3068Streamlit\u3092\u7d44\u307f\u5408\u308f\u305b\u305f\u30a2\u30d7\u30ea\u306e\u4f8b\u3067\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">import streamlit as st\nimport altair as alt\nfrom vega_datasets import data\n\nst.title('Car Data Visualization')\n\nsource = data.cars()\n\nchart = alt.Chart(source).mark_point().encode(\n    x='Horsepower',\n    y='Miles_per_Gallon',\n    color='Origin'\n).interactive()\n\nst.altair_chart(chart, use_container_width=True)<\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"944\" src=\"https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.20.28-1024x944.png\" alt=\"\" class=\"wp-image-781\" srcset=\"https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.20.28-1024x944.png 1024w, https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.20.28-300x276.png 300w, https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.20.28-768x708.png 768w, https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.20.28-1536x1416.png 1536w, https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.20.28-2048x1887.png 2048w, https:\/\/chocottopro.com\/wp-content\/uploads\/2024\/05\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2024-05-06-1.20.28-940x866.png 940w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\"><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-18\">\u30a4\u30f3\u30bf\u30e9\u30af\u30c6\u30a3\u30d6\u306a\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u306e\u958b\u767a\u65b9\u6cd5<\/h3>\n\n\n\n<p>Streamlit\u3092\u4f7f\u3048\u3070\u3001\u8907\u6570\u306e\u30b0\u30e9\u30d5\u3084\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u3092\u7d44\u307f\u5408\u308f\u305b\u305f\u30a4\u30f3\u30bf\u30e9\u30af\u30c6\u30a3\u30d6\u306a\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u3092\u7c21\u5358\u306b\u958b\u767a\u3067\u304d\u307e\u3059\u3002\u30e6\u30fc\u30b6\u30fc\u306e\u5165\u529b\u306b\u5fdc\u3058\u3066\u30b0\u30e9\u30d5\u3092\u52d5\u7684\u306b\u66f4\u65b0\u3059\u308b\u306a\u3069\u3001\u30a4\u30f3\u30bf\u30e9\u30af\u30c6\u30a3\u30d6\u306a\u6a5f\u80fd\u3092\u5b9f\u88c5\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4ee5\u4e0b\u306f\u3001\u30a4\u30f3\u30bf\u30e9\u30af\u30c6\u30a3\u30d6\u306a\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u306e\u4f8b\u3067\u3059\u3002\u30bb\u30ec\u30af\u30c8\u30dc\u30c3\u30af\u30b9\u3067\u8eca\u306e\u539f\u7523\u56fd\u3092\u9078\u629e\u3059\u308b\u3068\u3001\u305d\u306e\u56fd\u306e\u30c7\u30fc\u30bf\u306b\u7d5e\u308a\u8fbc\u3093\u3060\u30b0\u30e9\u30d5\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">import streamlit as st\nimport altair as alt\nfrom vega_datasets import data\n\nst.title('Interactive Car Data Dashboard')\n\nsource = data.cars()\n\norigin = st.selectbox('Select origin', ['All'] + source.Origin.unique().tolist())\n\nif origin == 'All':\n    filtered_data = source\nelse:\n    filtered_data = source[source.Origin == origin]\n\nchart1 = alt.Chart(filtered_data).mark_point().encode(\n    x='Horsepower',\n    y='Miles_per_Gallon',\n    color='Origin'\n).interactive()\n\nchart2 = alt.Chart(filtered_data).mark_bar().encode(\n    x='Cylinders',\n    y='count()',\n    color='Origin'\n).properties(width=300)\n\nst.altair_chart(chart1, use_container_width=True)\nst.altair_chart(chart2)<\/pre>\n\n\n\n<p>\u3053\u306e\u3088\u3046\u306b\u3001Altair\u3068Streamlit\u3092\u7d44\u307f\u5408\u308f\u305b\u308b\u3053\u3068\u3067\u3001\u7f8e\u3057\u304f\u30a4\u30f3\u30bf\u30e9\u30af\u30c6\u30a3\u30d6\u306a\u30c7\u30fc\u30bf\u53ef\u8996\u5316Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u7c21\u5358\u306b\u958b\u767a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u305c\u3072\u5b9f\u969b\u306e\u30c7\u30fc\u30bf\u3092\u4f7f\u3063\u3066\u8a66\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"i-19\">Altair\u3092\u4f7f\u3044\u3053\u306a\u3059\u305f\u3081\u306e\u53c2\u8003\u8cc7\u6599\u3068\u30c1\u30fc\u30c8\u30b7\u30fc\u30c8<\/h2>\n\n\n\n<p>Altair\u3092\u4f7f\u3044\u3053\u306a\u3059\u305f\u3081\u306b\u306f\u3001\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3084\u95a2\u9023\u3059\u308b\u8cc7\u6599\u3092\u53c2\u7167\u3059\u308b\u3053\u3068\u304c\u91cd\u8981\u3067\u3059\u3002\u3053\u3053\u3067\u306f\u3001Altair\u306e\u5b66\u7fd2\u3084\u958b\u767a\u306b\u5f79\u7acb\u3064\u53c2\u8003\u8cc7\u6599\u3068\u30c1\u30fc\u30c8\u30b7\u30fc\u30c8\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-20\">Altair\u306e\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u8aad\u307f\u65b9<\/h3>\n\n\n\n<p>Altair\u306e\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\uff08<a href=\"https:\/\/altair-viz.github.io\/\">https:\/\/altair-viz.github.io\/<\/a>\uff09\u306f\u3001Altair\u306e\u4f7f\u3044\u65b9\u3001API\u3001\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u306a\u3069\u304c\u7db2\u7f85\u7684\u306b\u89e3\u8aac\u3055\u308c\u3066\u3044\u308b\u8cc7\u6599\u3067\u3059\u3002\u5404\u30c1\u30e3\u30fc\u30c8\u30bf\u30a4\u30d7\u3054\u3068\u306e\u8a73\u7d30\u306a\u8a2d\u5b9a\u65b9\u6cd5\u3082\u8aac\u660e\u3055\u308c\u3066\u304a\u308a\u3001\u30ae\u30e3\u30e9\u30ea\u30fc\u30da\u30fc\u30b8\u3067\u306f\u69d8\u3005\u306a\u30b0\u30e9\u30d5\u306e\u4f8b\u304c\u63b2\u8f09\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u30b3\u30fc\u30c9\u3082\u53c2\u7167\u3067\u304d\u308b\u306e\u3067\u3001\u5b9f\u8df5\u7684\u306a\u5b66\u7fd2\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u307e\u305f\u3001Altair\u306fVega-Lite\u306e\u6587\u6cd5\u306b\u57fa\u3065\u3044\u3066\u3044\u308b\u305f\u3081\u3001Vega-Lite\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\uff08<a href=\"https:\/\/vega.github.io\/vega-lite\/\">https:\/\/vega.github.io\/vega-lite\/<\/a>\uff09\u3082\u53c2\u8003\u306b\u306a\u308a\u307e\u3059\u3002\u9ad8\u5ea6\u306a\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u304c\u5fc5\u8981\u306a\u5834\u5408\u306f\u3001Vega\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\uff08<a href=\"https:\/\/vega.github.io\/vega\/\">https:\/\/vega.github.io\/vega\/<\/a>\uff09\u3082\u4f75\u305b\u3066\u53c2\u7167\u3059\u308b\u3068\u826f\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-21\">\u30b0\u30e9\u30d5\u4f5c\u6210\u306b\u4f7f\u3048\u308bPython &amp; Altair\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u96c6<\/h3>\n\n\n\n<p>Altair\u3092\u4f7f\u3063\u305f\u30c7\u30fc\u30bf\u53ef\u8996\u5316\u306e\u4e8b\u4f8b\u3092\u96c6\u3081\u305f\u30ae\u30e3\u30e9\u30ea\u30fc\u30b5\u30a4\u30c8\u304c\u3044\u304f\u3064\u304b\u3042\u308a\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001Altair Gallery\uff08<a href=\"https:\/\/altair-viz.github.io\/gallery\/index.html\">https:\/\/altair-viz.github.io\/gallery\/index.html<\/a>\uff09\u3067\u306f\u3001\u5b9f\u969b\u306e\u30c7\u30fc\u30bf\u3068\u30b3\u30fc\u30c9\u3092\u898b\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u306e\u3067\u3001\u5b66\u7fd2\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u307e\u305f\u3001Altair\u3092\u542b\u3080Python\u3067\u306e\u30c7\u30fc\u30bf\u53ef\u8996\u5316\u306e\u624b\u6cd5\u3092\u89e3\u8aac\u3057\u305f\u66f8\u7c4d\u3082\u51fa\u7248\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u30b3\u30fc\u30c9\u3092\u4ea4\u3048\u306a\u304c\u3089\u3001\u30c7\u30fc\u30bf\u53ef\u8996\u5316\u306e\u57fa\u790e\u304b\u3089\u5fdc\u7528\u307e\u3067\u3092\u5b66\u3076\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001\u300ePython Data Science Handbook\u300f\uff08O\u2019Reilly\uff09by Jake VanderPlas\u306f\u3001Altair\u3092\u4f7f\u3063\u305f\u30c7\u30fc\u30bf\u53ef\u8996\u5316\u306e\u4e8b\u4f8b\u3082\u591a\u304f\u63b2\u8f09\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-22\">Altair\u306e\u30c1\u30fc\u30c8\u30b7\u30fc\u30c8\u3068\u9006\u5f15\u304d\u96c6<\/h3>\n\n\n\n<p>Altair\u306e\u57fa\u672c\u7684\u306a\u6587\u6cd5\u3084\u3088\u304f\u4f7f\u3046\u8a2d\u5b9a\u3092\u307e\u3068\u3081\u305f\u30c1\u30fc\u30c8\u30b7\u30fc\u30c8\u304c\u516c\u958b\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001Altair Cheat Sheet\uff08<a href=\"https:\/\/cheatography.com\/gerog\/cheat-sheets\/python-altair\/\">https:\/\/github.com\/eitanlees\/altair-cheat-sheet<\/a>\uff09\u3067\u306f\u3001\u5404\u7a2e\u30c1\u30e3\u30fc\u30c8\u306e\u4f5c\u6210\u65b9\u6cd5\u3084\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u8a2d\u5b9a\u65b9\u6cd5\u304c\u4e00\u89a7\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u5fc5\u8981\u306a\u60c5\u5831\u3092\u3059\u3050\u306b\u53c2\u7167\u3067\u304d\u308b\u306e\u3067\u3001\u958b\u767a\u306e\u52b9\u7387\u5316\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u307e\u305f\u3001Altair\u3092\u4f7f\u3063\u3066\u3044\u3066\u554f\u984c\u306b\u3076\u3064\u304b\u3063\u305f\u3068\u304d\u306f\u3001\u30b9\u30bf\u30c3\u30af\u30fb\u30aa\u30fc\u30d0\u30fc\u30d5\u30ed\u30fc\u306a\u3069\u306e\u8cea\u554f\u30b5\u30a4\u30c8\uff08<a href=\"https:\/\/stackoverflow.com\/questions\/tagged\/altair\">https:\/\/stackoverflow.com\/questions\/tagged\/altair<\/a>\uff09\u3092\u6d3b\u7528\u3059\u308b\u3068\u826f\u3044\u3067\u3057\u3087\u3046\u3002\u4ed6\u306e\u30e6\u30fc\u30b6\u30fc\u304c\u8cea\u554f\u3057\u305f\u5185\u5bb9\u3068\u56de\u7b54\u3092\u53c2\u7167\u3067\u304d\u308b\u306e\u3067\u3001\u540c\u3058\u3088\u3046\u306a\u554f\u984c\u306e\u89e3\u6c7a\u65b9\u6cd5\u304c\u898b\u3064\u304b\u308b\u3053\u3068\u304c\u591a\u3044\u3067\u3059\u3002\u65b0\u3057\u3044\u8cea\u554f\u3092\u6295\u7a3f\u3059\u308b\u3053\u3068\u3067\u3001\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u306e\u30b5\u30dd\u30fc\u30c8\u3092\u53d7\u3051\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4ee5\u4e0a\u306e\u8cc7\u6599\u3092\u6d3b\u7528\u3059\u308b\u3053\u3068\u3067\u3001Altair\u3092\u4f7f\u3063\u305f\u30c7\u30fc\u30bf\u53ef\u8996\u5316\u306e\u6280\u8853\u3092\u52b9\u679c\u7684\u306b\u5b66\u3076\u3053\u3068\u304c\u3067\u304d\u308b\u3067\u3057\u3087\u3046\u3002\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u4e2d\u5fc3\u306b\u3001\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u96c6\u3084\u30c1\u30fc\u30c8\u30b7\u30fc\u30c8\u3092\u53c2\u8003\u306b\u3057\u306a\u304c\u3089\u3001\u5b9f\u969b\u306e\u30c7\u30fc\u30bf\u3092\u4f7f\u3063\u3066\u7df4\u7fd2\u3059\u308b\u3053\u3068\u3092\u304a\u3059\u3059\u3081\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"i-23\">\u7d50\u8ad6\uff1aAltair\u3067\u30c7\u30fc\u30bf\u53ef\u8996\u5316\u306e\u53ef\u80fd\u6027\u3092\u5e83\u3052\u3088\u3046<\/h2>\n\n\n\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001Python\u306e\u30c7\u30fc\u30bf\u53ef\u8996\u5316\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3042\u308bAltair\u306e\u7279\u5fb4\u3068\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u89e3\u8aac\u3057\u3066\u304d\u307e\u3057\u305f\u3002Altair\u3092\u4f7f\u3048\u3070\u3001\u30b7\u30f3\u30d7\u30eb\u3067\u5ba3\u8a00\u7684\u306a\u6587\u6cd5\u306b\u3088\u308a\u3001\u5c11\u306a\u3044\u30b3\u30fc\u30c9\u91cf\u3067\u7f8e\u3057\u3044\u30b0\u30e9\u30d5\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u6298\u308c\u7dda\u30b0\u30e9\u30d5\u3001\u6563\u5e03\u56f3\u3001\u30d2\u30b9\u30c8\u30b0\u30e9\u30e0\u3001\u68d2\u30b0\u30e9\u30d5\u3001\u7bb1\u3072\u3052\u56f3\u3001\u30d2\u30fc\u30c8\u30de\u30c3\u30d7\u3001\u5730\u56f3\u306a\u3069\u3001\u69d8\u3005\u306a\u30bf\u30a4\u30d7\u306e\u30b0\u30e9\u30d5\u306b\u5bfe\u5fdc\u3057\u3066\u304a\u308a\u3001\u30c7\u30fc\u30bf\u306e\u7279\u6027\u306b\u5408\u308f\u305b\u3066\u6700\u9069\u306a\u53ef\u8996\u5316\u304c\u884c\u3048\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u307e\u305f\u3001Altair\u306f\u3001\u30a4\u30f3\u30bf\u30e9\u30af\u30c6\u30a3\u30d6\u6a5f\u80fd\u3084\u8907\u5408\u30b0\u30e9\u30d5\u306a\u3069\u3001\u9ad8\u5ea6\u306a\u30c7\u30fc\u30bf\u53ef\u8996\u5316\u306b\u3082\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002\u30ba\u30fc\u30e0\u3084\u30d1\u30f3\u306a\u3069\u306e\u30a4\u30f3\u30bf\u30e9\u30af\u30b7\u30e7\u30f3\u3092\u8ffd\u52a0\u3057\u305f\u308a\u3001\u8907\u6570\u306e\u30b0\u30e9\u30d5\u3092\u7d44\u307f\u5408\u308f\u305b\u305f\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u3092\u4f5c\u6210\u3057\u305f\u308a\u3068\u3001\u30c7\u30fc\u30bf\u304b\u3089\u3088\u308a\u6df1\u3044\u6d1e\u5bdf\u3092\u5f15\u304d\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3055\u3089\u306b\u3001Altair\u3067\u4f5c\u6210\u3057\u305f\u30b0\u30e9\u30d5\u306f\u3001Streamlit\u306a\u3069\u306eWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3068\u7d44\u307f\u5408\u308f\u305b\u308b\u3053\u3068\u3067\u3001\u7c21\u5358\u306bWeb\u4e0a\u3067\u516c\u958b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u30a4\u30f3\u30bf\u30e9\u30af\u30c6\u30a3\u30d6\u306a\u64cd\u4f5c\u304c\u53ef\u80fd\u306a\u30c7\u30fc\u30bf\u53ef\u8996\u5316\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u3001\u30ed\u30fc\u30b3\u30fc\u30c9\u3067\u958b\u767a\u3067\u304d\u308b\u306e\u3082\u5927\u304d\u306a\u9b45\u529b\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u4ee5\u4e0b\u306f\u3001Streamlit\u3092\u4f7f\u3063\u3066Altair\u306e\u30b0\u30e9\u30d5\u3092\u7d44\u307f\u8fbc\u3093\u3060\u7c21\u5358\u306aWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u4f8b\u3067\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">import streamlit as st\nimport altair as alt\nfrom vega_datasets import data\n\nst.title('Interactive Car Data Visualization')\n\nsource = data.cars()\n\nchart = alt.Chart(source).mark_point().encode(\n    x='Horsepower',\n    y='Miles_per_Gallon',\n    color='Origin',\n    tooltip=['Name', 'Origin', 'Horsepower', 'Miles_per_Gallon']\n).interactive()\n\nst.altair_chart(chart, use_container_width=True)<\/pre>\n\n\n\n<p>\u3053\u306e\u3088\u3046\u306b\u3001\u308f\u305a\u304b\u6570\u884c\u306e\u30b3\u30fc\u30c9\u3067\u30a4\u30f3\u30bf\u30e9\u30af\u30c6\u30a3\u30d6\u306a\u30c7\u30fc\u30bf\u53ef\u8996\u5316\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u4f5c\u6210\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>Altair\u306f\u3001\u8c4a\u5bcc\u306a\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3084\u30ae\u30e3\u30e9\u30ea\u30fc\u304c\u63d0\u4f9b\u3055\u308c\u3066\u3044\u308b\u305f\u3081\u3001\u521d\u5fc3\u8005\u3067\u3082\u52b9\u679c\u7684\u306b\u5b66\u7fd2\u3092\u9032\u3081\u3089\u308c\u307e\u3059\u3002\u672c\u8a18\u4e8b\u3067\u7d39\u4ecb\u3057\u305f\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u53c2\u8003\u306b\u3057\u306a\u304c\u3089\u3001\u5b9f\u969b\u306e\u30c7\u30fc\u30bf\u3092\u4f7f\u3063\u3066\u53ef\u8996\u5316\u3092\u7df4\u7fd2\u3059\u308b\u3053\u3068\u3092\u304a\u3059\u3059\u3081\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30c7\u30fc\u30bf\u30b5\u30a4\u30a8\u30f3\u30c6\u30a3\u30b9\u30c8\u3084\u7814\u7a76\u8005\u306b\u9650\u3089\u305a\u3001Python\u3092\u4f7f\u3063\u305f\u30c7\u30fc\u30bf\u5206\u6790\u306e\u73fe\u5834\u3067\u5e83\u304f\u6d3b\u7528\u3067\u304d\u308b\u306e\u304cAltair\u306e\u5f37\u307f\u3067\u3059\u3002\u7f8e\u3057\u304f\u8868\u73fe\u529b\u8c4a\u304b\u306a\u30b0\u30e9\u30d5\u3092\u3001\u624b\u8efd\u306b\u4f5c\u6210\u3067\u304d\u308b\u5229\u70b9\u306f\u3001\u3042\u3089\u3086\u308b\u5206\u91ce\u3067\u5f79\u7acb\u3064\u3067\u3057\u3087\u3046\u3002\u305c\u3072Altair\u3092\u4f7f\u3063\u3066\u3001\u30c7\u30fc\u30bf\u53ef\u8996\u5316\u306e\u53ef\u80fd\u6027\u3092\u5e83\u3052\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002\u65b0\u3057\u3044\u767a\u898b\u3068\u3088\u308a\u826f\u3044\u610f\u601d\u6c7a\u5b9a\u306b\u7e4b\u304c\u308b\u306f\u305a\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Python\u3067\u30c7\u30fc\u30bf\u53ef\u8996\u5316\u3092\u3059\u308b\u969b\u306b\u3001Altair\u306f\u5f37\u529b\u306a\u9078\u629e\u80a2\u306e\u4e00\u3064\u3067\u3059\u3002\u30b7\u30f3\u30d7\u30eb\u3067\u5ba3\u8a00\u7684\u306a\u6587\u6cd5\u306b\u3088\u308a\u3001\u5c11\u306a\u3044\u30b3\u30fc\u30c9\u91cf\u3067\u7f8e\u3057\u304f\u8868\u73fe\u529b\u8c4a\u304b\u306a\u30b0\u30e9\u30d5\u3092\u4f5c\u6210\u3067\u304d\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001Altair\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\u304b\u3089\u5fdc\u7528\u7684\u306a\u30c6\u30af &#8230; <\/p>\n","protected":false},"author":1,"featured_media":782,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":{"0":"post-767","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-python"},"_links":{"self":[{"href":"https:\/\/chocottopro.com\/index.php?rest_route=\/wp\/v2\/posts\/767","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chocottopro.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chocottopro.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chocottopro.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/chocottopro.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=767"}],"version-history":[{"count":1,"href":"https:\/\/chocottopro.com\/index.php?rest_route=\/wp\/v2\/posts\/767\/revisions"}],"predecessor-version":[{"id":783,"href":"https:\/\/chocottopro.com\/index.php?rest_route=\/wp\/v2\/posts\/767\/revisions\/783"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/chocottopro.com\/index.php?rest_route=\/wp\/v2\/media\/782"}],"wp:attachment":[{"href":"https:\/\/chocottopro.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=767"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chocottopro.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=767"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chocottopro.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=767"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}