{"id":14010,"date":"2024-02-01T00:09:10","date_gmt":"2024-01-31T23:09:10","guid":{"rendered":"https:\/\/linux-bibel.at\/?p=14010"},"modified":"2024-02-01T00:09:11","modified_gmt":"2024-01-31T23:09:11","slug":"daten-am-linux-terminal-analysieren-mit-visidata","status":"publish","type":"post","link":"https:\/\/linux-bibel.at\/index.php\/2024\/02\/01\/daten-am-linux-terminal-analysieren-mit-visidata\/","title":{"rendered":"Daten am Linux-Terminal analysieren mit Visidata"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Nehmen wir einmal an, ich habe mir Daten aus einer Datenbank auf einem Server gezogen, im Beispiel eine einfache CSV-Datei &#8211; der Server hat keine grafische Oberfl\u00e4che. Mit dem Befehl <code>less<\/code> &#8211; kann ich mir die Datei ansehen, die Datei nennt sich hier einfach &#8222;<strong>beispiel.csv<\/strong>&#8222;:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>less beispiel.csv<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/01\/vd-scaled.jpeg\" rel=\"lightbox-0\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/01\/vd-1024x640.jpeg\" alt=\"\" class=\"wp-image-14011\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/01\/vd-1024x640.jpeg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/01\/vd-1536x960.jpeg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/01\/vd-2048x1280.jpeg 2048w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/01\/vd-150x94.jpeg 150w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/01\/vd-300x188.jpeg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/01\/vd-768x480.jpeg 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Man hat nicht wirklich viel davon &#8211; nat\u00fcrlich k\u00f6nnte man die Ausgabe mit den passenden Befehlen aufbereiten, ist aber doch etwas umst\u00e4ndlich. In LibreOffice w\u00fcrde dies schon etwas anders aussehen:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/01\/vd-1-scaled.jpeg\" rel=\"lightbox-1\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/01\/vd-1-1024x640.jpeg\" alt=\"\" class=\"wp-image-14012\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/01\/vd-1-1024x640.jpeg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/01\/vd-1-1536x960.jpeg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/01\/vd-1-2048x1280.jpeg 2048w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/01\/vd-1-150x94.jpeg 150w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/01\/vd-1-300x188.jpeg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/01\/vd-1-768x480.jpeg 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Doch &#8211; wie schon beschrieben, wir wollen uns die Ausgabe ohne grafische Oberfl\u00e4che genauer ansehen und vielleicht auch analysieren. Hier kann die Software Visidata helfen &#8211; die Software kann mit CSV-Dateien, Excel-Dateien und SQL-Dateien umgehen.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Visidata installieren<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Sie installieren sich diese Software \u00fcber das <a href=\"https:\/\/linux-bibel.at\/index.php\/2023\/09\/09\/python-software-unter-linux-aus-dem-python-package-index-installieren\/\" data-type=\"post\" data-id=\"1910\">Python-Repository<\/a>. In meinem Beispiel einfach \u00fcber PIPX:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pipx install visidata<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Visidata nutzen<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Mittels PIPX installiert sich die Software im Home-Verzeichnis unter &#8222;<em>.local\/bin<\/em>&#8220; unter dem Namen &#8222;<strong>vd<\/strong>&#8220; und &#8222;<strong>visidata<\/strong>&#8222;. Sie k\u00f6nnen also beide Befehle nutzen. Ohne jetzt lange zu lamentieren, wir wollen die Datei erst einmal damit \u00f6ffnen:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>.local\/bin\/visidata beispiel.csv<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/01\/vd-2-scaled.jpeg\" rel=\"lightbox-2\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/01\/vd-2-1024x640.jpeg\" alt=\"\" class=\"wp-image-14013\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/01\/vd-2-1024x640.jpeg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/01\/vd-2-1536x960.jpeg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/01\/vd-2-2048x1280.jpeg 2048w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/01\/vd-2-150x94.jpeg 150w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/01\/vd-2-300x188.jpeg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/01\/vd-2-768x480.jpeg 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Zu Beginn sieht die Ausgabe nicht viel anders aus, sehen Sie aber genauer hin, sehen Sie schon Men\u00fcs. Mit den <kbd>Pfeiltasten<\/kbd> k\u00f6nnen Sie Spalten markieren, die Men\u00fcs k\u00f6nnen Sie mit der Maus bedienen, und darin mit den <kbd>Pfeiltasten<\/kbd> navigieren:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/01\/vd-3-scaled.jpeg\" rel=\"lightbox-3\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/01\/vd-3-1024x640.jpeg\" alt=\"\" class=\"wp-image-14014\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/01\/vd-3-1024x640.jpeg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/01\/vd-3-1536x960.jpeg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/01\/vd-3-2048x1280.jpeg 2048w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/01\/vd-3-150x94.jpeg 150w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/01\/vd-3-300x188.jpeg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2024\/01\/vd-3-768x480.jpeg 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Anschlie\u00dfend k\u00f6nnen Sie die Daten nach von Ihnen beliebigen Vorgaben auswerten und darstellen lassen &#8211; mehr dazu unter <a href=\"https:\/\/www.visidata.org\/docs\/\" target=\"_blank\" rel=\"noreferrer noopener\">Visidata<\/a>.<\/p>\n<div class=\"pld-like-dislike-wrap pld-custom\">\r\n    <div class=\"pld-like-wrap  pld-common-wrap\">\r\n    <a href=\"javascript:void(0)\" class=\"pld-like-trigger pld-like-dislike-trigger  \" title=\"Gef\u00e4llt mir\" data-post-id=\"14010\" data-trigger-type=\"like\" data-restriction=\"cookie\" data-already-liked=\"0\">\r\n                            <img src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/12\/Daumen-Hoch.png\" alt=\"Gef\u00e4llt mir\" \/>\r\n            <\/a>\r\n    <span class=\"pld-like-count-wrap pld-count-wrap\">2    <\/span>\r\n<\/div><div class=\"pld-dislike-wrap  pld-common-wrap\">\r\n    <a href=\"javascript:void(0)\" class=\"pld-dislike-trigger pld-like-dislike-trigger  \" title=\"Gef\u00e4llt mir nicht\" data-post-id=\"14010\" data-trigger-type=\"dislike\" data-restriction=\"cookie\" data-already-liked=\"0\">\r\n                            <img src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/12\/Daumen-Runter.png\" alt=\"Gef\u00e4llt mir nicht\" \/>\r\n            <\/a>\r\n    <span class=\"pld-dislike-count-wrap pld-count-wrap\"><\/span>\r\n<\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Nehmen wir einmal an, ich habe mir Daten aus einer Datenbank auf einem Server gezogen, im Beispiel eine einfache CSV-Datei &#8211; der Server hat keine grafische Oberfl\u00e4che. Mit dem Befehl less &#8211; kann ich mir die Datei ansehen, die Datei nennt sich hier einfach &#8222;beispiel.csv&#8222;: Man hat nicht wirklich viel davon &#8211; nat\u00fcrlich k\u00f6nnte man [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":14014,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[12,7,6],"class_list":["post-14010","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-terminal","tag-kommandozeile","tag-shell","tag-terminal"],"_links":{"self":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts\/14010","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/comments?post=14010"}],"version-history":[{"count":1,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts\/14010\/revisions"}],"predecessor-version":[{"id":14015,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts\/14010\/revisions\/14015"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/media\/14014"}],"wp:attachment":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/media?parent=14010"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/categories?post=14010"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/tags?post=14010"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}