2019年10月25日 星期五

Sentry - Software errors are inevitable. Chaos is not.

Sentry provides open-source and hosted error monitoring that helps all software
teams discover, triage, and prioritize errors in real-time.
One million developers at over fifty thousand companies already ship
better software faster with Sentry. Won’t you join them?

from : https://sentry.io/welcome/

了解Google Data Studio是什麼?如何輕鬆幫你將資料視覺化

Google Data Studio是什麼?

你是網路行銷人嗎?是否經常需要用數據做簡報?經常煩惱該如何製作精美的報表嗎?如果你符合上面的條件,awoo在這邊推薦你可以試試Google Data Studio。
Google Data Studio是一套免費的資料視覺化工具,可以串接多種google的資料源(像是GA、GSC、YouTube數據),將數據資料自訂轉換成所想要呈現的報表、圖表,並在Google Data Studio上製作成精美的報告,對於需要將多種資料源整合分析報告的數位行銷人來說是相當好用的。
假設今天需要做一份報告展示去年度SEO、Google廣告、Facebook廣告、社群經營的成效,我們就可以透過Google Data Studio 將Google Analytics、Search Console、Google Ads做串連,快速地拉出所需要的數據圖表來製作成報告。

開始使用 Google Data Studio

進入Google Data Studio 後,上方可以建立空白新報表,但如果空白報表一開始使用不知該從何做起,Google Data Studio也有內建多種資料報表的範本,例如: Search Console Report、Google Ads Overview、Google Merchandise Store,套用範本並串接對應的資料來源,就可以產生一份漂亮的報表,可以省去不少報表編排的時間。

串接資料源

在製作報表,一定要先確定報表會需要什麼樣的資料源(例: Search Console、Google Analytics),而在Google Data Studio 串接資料源可以從建立報表前或是建立報表時執行。

製作報表前

點選主介面左下方的”資料來源”進入後右下角有一個 “+”,點選之後就可以挑選加入的資料來源。

製作報表時

新增報表時,右方可以選取目前已有串接的資料來源,也可以在這時串接建立新的資料來源。
另外可以對匯入資料源的預設欄位名稱或類型做一些調整,例如 : 你可以修改欄位名稱讓欄位代表意思更好的被記憶,或是欄位數據類型的修改。

新增自訂欄位

Data Studio 還可以透過串接的資料源欄位來新增自訂欄位,可以透過資料源欄位來做一些公式設計,如下圖範例將點擊數/網站頁面數,計算出平均每個頁面帶來的點擊數的新欄位數據。

製作報表

資料源串接完成後,可以先開始試著拉出圖表完成簡易的報表,了解每種圖表的呈現方式設定或是資料的維度、指標編排。

版面主題配置

建立一個空白報表後,先設定整個大版面的設計配置,可以設定版面大小、格線、背景、文字、主題可以挑選簡單或極簡黑。

圖表類型

Data Studio 提供的圖表類型有時間序列、表格、長條圖、圓餅圖、折線圖等數十種類型的圖表可以使用。
每種圖表都可以針對細節樣式做調整,像是調整圖表顏色、數量、文字大小、字型等多種樣式調整。

資料設定

選擇好圖表類型後,挑選圖表要使用的資料來源,以及維度跟指標所要使用的欄位,一張圖表可以使用多個資料來源,例如:混合使用兩個不同的Google Analytics數據源Google文件參考:About data blending),也可以針對圖表數據自訂日期範圍或是篩選器。

自訂區塊

除了Data Studio內建的圖表外,另外也可以使用網址嵌入內容、自訂文字內容、圖片以及畫矩形或圓形在報表中。

建立Google Data Studio報表

建立報表前要先確認報表所要訴求的是什麼?是作為Dashboard可以週期性的監控所想要的數據狀況,或者是用來做一份精美簡報報告去年度網站成長狀況,再串接所需要的資料源來製作報表。
另外也可透過範本報表來熟悉Google Data Studio的報表應用,一開始更容易上手。
完成報表後,可以將此報表檢視或編輯權限分享給其他人以利於協作。
也可以將整個報表下載成PDF檔案報告使用。

如果想要針對報表中某個圖表數據更詳細了解,也可以單選某個圖表下載CSV檔案(Excel)或選擇匯出到試算表。
Google Data Studio 是一套非常方便的製作報表工具,更棒是免費使用!功能使用起來並不複雜,但要製作出一份精美好用的報表更多是看設計者的設計邏輯程度了,現在就上【Google Data Studio網站】申請試用看看吧!

from : https://www.awoo.com.tw/blog/google-data-studio/

2019年9月18日 星期三

JavaScript:使用 Array.map、Object.values 和 Object.keys 處理一連串的資料

使用 Array.map、Object.values 和 Object.keys 處理「物件中有物件」和「陣列中有物件」的情況。

物件中有物件

一個物件包含了一串物件。
範例如下,這裡有一串 ID 與名字。
{
  "1234567890": {
    id: "1234567890",
    name: "Nina Ricci",
  },
  "2345678901": {
    id: "2345678901",
    name: "Hello Kitty",
  },
  "3456789012": {
    id: "3456789012",
    name: "Pusheen the cat",
  },
}

取得 key 的陣列

在這一連串資料下取得 key 的陣列。
  • 使用 Object.keys 取得物件的鍵值,組成陣列後回傳。
const idList = Object.keys(list);

idList // ["1234567890", "2345678901", "3456789012"]

取得 value 的陣列

在這一連串資料下取得 value 之特性屬性的陣列。
  • 使用 Object.values 取得物件的 value,組成陣列。
  • 承上,使用 Array.map 將陣列中的特定屬性值取出,組成新陣列後回傳。
const nameList = Object.values(list).map(item => item.name);

nameList // ["Nina Ricci", "Hello Kitty", "Pusheen the cat"]

陣列中有物件 1

一個陣列包含了一串物件。
範例如下,這裡有一串 ID 與名字。
const list = [
  {
    id: "1234567890",
    name: "Nina Ricci",
  },
  {
    id: "2345678901",
    name: "Hello Kitty",
  },
  {
    id: "3456789012",
    name: "Pusheen the cat",
  },
];

取得特性屬性值的陣列

取得 id。
  • 使用 Array.map 迭代陣列,並將 callback 中的執行結果組成新陣列後回傳。
  • 承上,在迭代陣列過程中,使用 Object.values 取得第一個屬性值,也就是 id 的值。
const idList = list.map(item => Object.values(item)[0]); // 0 表示第一個屬性值

idList // ["1234567890", "2345678901", "3456789012"]
取得 name。
const nameList = list.map(item => Object.values(item)[1]); // 1 表示第二個屬性值

nameList // ["Nina Ricci", "Hello Kitty", "Pusheen the cat"]

陣列中有物件 2

一個陣列包含了一串物件。
範例如下,這裡有一串 ID 與名字,key 是 ID,value 是名字。
[
  {
    "1234567890": "Nina Ricci",
  },
  {
    "2345678901": "Hello Kitty",
  },
  {
    "3456789012": "Pusheen the cat",
  },
]

取得 key 的陣列

  • 使用 Array.map 迭代陣列,並將 callback 中的執行結果組成新陣列後回傳為最終結果 idList。
  • 使用 Object.keys 取得每個物件的鍵值,由於 Object.keys 會幫每個物件在取鍵值時建立一個陣列,因此要用 [0] 再取得內容,即字串後回傳結果。
const idList = list.map(item => Object.keys(item)[0]);

idList // ["1234567890", "2345678901", "3456789012"]

取得 value 的陣列

  • 使用 Array.map 迭代陣列,並將 callback 中的執行結果組成新陣列後回傳為最終結果 nameList。
  • 使用 Object.values 取得每個物件的 value,由於 Object.value 會幫每個物件在取值時建立一個陣列,因此要用 [0] 再取得內容,即字串後回傳結果。
const nameList = list.map(item => Object.values(item)[0]);

nameList // ["Nina Ricci", "Hello Kitty", "Pusheen the cat"]

from : https://cythilya.github.io/2018/06/17/array-and-object-handling/

Javascript - find duplicate value in array

var names = ['Mike', 'Matt', 'Nancy', 'Adam', 'Jenny', 'Nancy', 'Carl']

var uniq = names
  .map((name) => {
    return {
      count: 1,
      name: name
    }
  })
  .reduce((a, b) => {
    a[b.name] = (a[b.name] || 0) + b.count
    return a
  }, {})

var duplicates = Object.keys(uniq).filter((a) => uniq[a] > 1)

console.log(duplicates) // [ 'Nancy' ]

from : https://stackoverflow.com/questions/840781/get-all-non-unique-values-i-e-duplicate-more-than-one-occurrence-in-an-array

2019年8月14日 星期三

SideeX 2 - Smart Record-Playback Browser Automation

 What is SideeX
  • In a word, SideeX [sɪdɛks] is a free and open source smart record-playback automated web application testing tool
  • SideeX presents as an extended version of Selenium IDE with a number of superior expanded automation capabilities
  Smart Record and Playback Automations
  • Smart auto-wait for playing every command. No more need for manually adding any __AndWait commands
  • Smart auto-record/play commands for unnamed popup windows
  • Smart auto-record/play commands for mouseover, scrolling, drag&drop, dropdown, rich-text editor, etc
  Software Powered by SideeX

from : http://www.sideex.org/

2019年8月7日 星期三

Download Documentation Samples Github Contact English jQuery resizable tables and columns

About this plugin
colResizable is a jQuery plugin to resize table columns dragging them manually. It is compatible with both mouse and touch devices and has some nice features such as layout persistence after page refresh or postback.

This plugin comes in handy when dealing with large tables improving usability. It is tiny in size (colResizable 1.0 is only 2kb) and it is fully compatible with all major browsers (IE7+, Firefox, Chrome and Opera).

colResizable can also be used as multiple range slider, give it a try!

from : http://bacubacu.com/colresizable/#download

jQuery sortable column

163
I came across this, and thought I'd throw in my 2 cents. Click on the column headers to sort ascending, and again to sort descending.
  • Works in Chrome, Firefox, Opera AND IE(8)
  • Only uses JQuery
  • Does alpha and numeric sorting - ascending and descending
$('th').click(function(){
    var table = $(this).parents('table').eq(0)
    var rows = table.find('tr:gt(0)').toArray().sort(comparer($(this).index()))
    this.asc = !this.asc
    if (!this.asc){rows = rows.reverse()}
    for (var i = 0; i < rows.length; i++){table.append(rows[i])}
})
function comparer(index) {
    return function(a, b) {
        var valA = getCellValue(a, index), valB = getCellValue(b, index)
        return $.isNumeric(valA) && $.isNumeric(valB) ? valA - valB : valA.toString().localeCompare(valB)
    }
}
function getCellValue(row, index){ return $(row).children('td').eq(index).text() }
table, th, td {
    border: 1px solid black;
}
th {
    cursor: pointer;
}

Country
DateSize France2001-01-0125 href=#>spain 2005-05-05 Lebanon2002-02-02-17 Argentina2005-04-04100 USA-6
from : https://stackoverflow.com/questions/3160277/jquery-table-sort/19947532

wibiya widget