diff --git a/source/_posts/visualize-first-try.md b/source/_posts/visualize-first-try.md index 7597ce6..e8defc9 100644 --- a/source/_posts/visualize-first-try.md +++ b/source/_posts/visualize-first-try.md @@ -1,9 +1,48 @@ --- -title: 視覺化探險日記(1) - 以 Python-Doc-ZH-TW 為例 +title: 視覺化探險日記(1) - 以 python-docs-zh-tw 為例 date: 2023-09-11 22:35:00 tags: - dev - diary --- -{% asset_img pageviews_visitors.png [pageviews_visitors] %} \ No newline at end of file +自從加入了 [python-docs-zh-tw](https://github.com/python/python-docs-zh-tw) 翻譯計畫,好像越做越有心得(?) +畢竟以前沒有這種可以加入社群貢獻的機會,所以這次我沒有放掉這個機會了。 + +本次任務是因為取得了每個頁面的瀏覽次數等資料 [1] , +我想配合上 Organizer 一直有在使用的 [potodo](https://pypi.org/project/potodo/) 工具去計算出每個 po 檔案的翻譯完成度為何 [2] , +進行了本次的資料視覺化挑戰。 + +{% asset_img code_views.png [code_pageviews] %} +> [1] : [python-docs-zh-tw](https://github.com/python/python-docs-zh-tw) 個別頁面的瀏覽資料 + +{% asset_img code_potodo.png [code_potodo] %} +> [2] : [python-docs-zh-tw](https://github.com/python/python-docs-zh-tw) 各項檔案的翻譯完成度資料 + +本來想說都靠著前人有經驗產生過的資料,也來自己產生看看, +產生過程都沒問題,**這兩個檔案的正規化 (Normalized) 才是挑戰**。 + +這個機會又讓我跟 [Pandas.DataFrame](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html) 再次熟悉了一下。 + +最後的結果如下: +1. 頁面瀏覽次數及訪客數的曲線圖 + + Color => Folder + + X-axis => Visitors + + Y-axis => Pageviews + + Filter : 500 < Pageviews < 2500 + + (500 以下過於密集、2500 以上只有Tutorial/index, Library/datetime ) +{% asset_img pageviews_visitors.png [pageviews_visitors] %} + +2. 頁面瀏覽次數及訪客數的曲線圖 + + Color => Filename + + X-axis => Pageviews + + Y-axis => Translated Percent + + Filter : 500 < Pageviews , Remove Tutorial, Installing + + Note : 移掉後面兩個是不知道為什麼跟 potodo 的資料對不上 + + Note : 圖片中 Translated Percent 為 0 的也是 potodo 無資料 +{% asset_img pageviews_translated.png [pageviews_translated] %} + +以前擅長的都是結合 GeoData 的地圖視覺化,這次挑戰純數字資料的視覺化是個挑戰啊。 + +P.S. 好的資料集真的很重要,向所有的 Data Scientist 看齊! +P.P.S. 不小心喚起了記憶,大學時期分數最慘的科目就是*統計*。 \ No newline at end of file diff --git a/source/_posts/visualize-first-try/code_potodo.png b/source/_posts/visualize-first-try/code_potodo.png new file mode 100644 index 0000000..e00524c Binary files /dev/null and b/source/_posts/visualize-first-try/code_potodo.png differ diff --git a/source/_posts/visualize-first-try/code_views.png b/source/_posts/visualize-first-try/code_views.png new file mode 100644 index 0000000..72e89a9 Binary files /dev/null and b/source/_posts/visualize-first-try/code_views.png differ diff --git a/source/_posts/visualize-first-try/pageviews_translated.png b/source/_posts/visualize-first-try/pageviews_translated.png new file mode 100644 index 0000000..564c83d Binary files /dev/null and b/source/_posts/visualize-first-try/pageviews_translated.png differ diff --git a/themes/frame/_config.yml b/themes/frame/_config.yml new file mode 100644 index 0000000..7895cfe --- /dev/null +++ b/themes/frame/_config.yml @@ -0,0 +1,85 @@ + +# html lang +language: zh-tw + +# header +site_brand_name: RockLeon.DevBlog + +logo_image: + enable: false + image_path: /logo.png # path to your logo image + +menu: + Home: / + Posts: /archives/ + Profile: https://cv.rockleon.dev + LinkTree: https://cv.rockleon.dev/linktree + +# stylesheets loaded in the
+stylesheets: +- /css/style.css + +# scripts loaded in the end of the body +scripts: +- /js/frame.js + +# favicon +favicon: /favicon.ico + +date_format: MMM D, YYYY + +# profile +profile: + title: 嗨,陌生人 + body: 這邊是我的開發小窩 + image: /profile_cover.jpg + + links: + Home: / + Posts: /archives/ + Profile: https://cv.rockleon.dev + LinkTree: https://cv.rockleon.dev/linktree + +# footer +footer: + copyright_info: + enable: false + author: + + powered_by: # Powered by Hexo & Frame + enable: true + + other_info: + enable: false + content: + +# color mode: default / classic / dark +color_mode: default + +# mathjax setting +# note: need to install the hexo plugin for math: https://github.com/hexojs/hexo-math +mathjax_enable: false + +# comments: support disqus and valine +valine: # valine setup guide: https://valine.js.org/quickstart.html + enable: false + appId: # Your valine app Id + appKey: # Your valine app Key + lang: 'en' + placeholder: 'Say something' + avatar: 'mp' + meta: ['nick', 'mail'] + +disqus: # disqus setup guide: https://help.disqus.com/en/articles/1717056-publisher-quick-start-guide + enable: false + disqus_url: # your diqsuq url or shortname + language: 'en' + +# local search +local_search: + enable: false + place_holder: Search Anything + trigger: auto # auto: trigger search whenever input changes + top_n_per_article: 1 # show top n results per article, show all results by setting to -1 + unescape: false # unescape html strings to the readable one + preload: false # reload the search data when the page loads, this will accelerate the search process diff --git a/themes/frame/layout/archive.ejs b/themes/frame/layout/archive.ejs new file mode 100644 index 0000000..426f6a8 --- /dev/null +++ b/themes/frame/layout/archive.ejs @@ -0,0 +1 @@ +<%- partial('partials/post_list') %> \ No newline at end of file diff --git a/themes/frame/layout/category.ejs b/themes/frame/layout/category.ejs new file mode 100644 index 0000000..aad151a --- /dev/null +++ b/themes/frame/layout/category.ejs @@ -0,0 +1,4 @@ ++ / tags + / <%=page.tag%> / +
+ <%- partial('partials/post_list') %> + + <% }else{ %> + +/ tags /
+ <%- partial('partials/tag_cloud') %> + + <% } %> + +