JavaScript 資料公用程式庫:Datalib

來源:互聯網
上載者:User

標籤:

Datalib 是一個 JavaScript 資料公用程式庫。

快速使用Romanysoft LAB 的技術實現 HTML 開發Mac OS App,並銷售到蘋果市集中。  《HTML開發Mac OS App 視頻教程》
  • 馬鈴薯網同步更新:http://www.tudou.com/plcover/VHNh6ZopQ4E/
  • 百度網盤同步:http://pan.baidu.com/s/1jG1Q58M
  • 分享  [中文紀錄片]互連網時代   http://pan.baidu.com/s/1qWkJfcS
  官方QQ群:(申請加入,說是我推薦的
  • App實踐出真知 434558944       
  • App學習交流 452180823          
 

它提供用於資料載入、 型別推斷、 常見統計和字串的模板。包括:

  • 載入並解析資料檔案(JSON, TopoJSON, CSV, TSV).

  • 統計摘要(均值、偏差、中位元、相關測量等).

  • 資料驅動字串模版,包括一組篩選器.

  • 用於處理 JavaScript 對象和數組的公用程式.

程式碼範例:

?
12345678910111213141516171819 // Load datalib.var dl = require(‘datalib‘);  // Load and parse a CSV file. Datalib does type inference for you.// The result is an array of JavaScript objects with named values.// Parsed dates are stored as UNIX timestamp values.var data = dl.csv(‘http://uwdata.github.io/datalib/data/stocks.csv‘);  // Show summary statistics for each column of the data table.console.log(dl.summary(data).toString());  // Compute correlation measures between price and date.var price = dl.accessor(‘price‘);var date = dl.accessor(‘date‘);console.log(  dl.cor(data, price, date),      // Pearson product-moment correlation  dl.cor.rank(data, price, date), // Spearman rank correlation  dl.cor.dist(data, price, date)  // Distance correlation);

 

JavaScript 資料公用程式庫:Datalib

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.