五月天青色头像情侣网名,国产亚洲av片在线观看18女人,黑人巨茎大战俄罗斯美女,扒下她的小内裤打屁股

歡迎光臨散文網(wǎng) 會(huì)員登陸 & 注冊

R語言ggplot2 對Facebook用戶數(shù)據(jù)可視化分析

2021-02-17 22:17 作者:拓端tecdat  | 我要投稿

原文鏈接:http://tecdat.cn/?p=5895

讀取Facebook的用戶數(shù)據(jù)?

?

getwd()## [1]“C:/ Users / HH / Desktop / R Data analyst”list.files()## [1]“07-tidy-data.pdf”“demystifying.R”## [3 ]“demystifyingR2_v3.html”“demystifyingR2_v3.Rmd”## [5]“EDA_Course_Materials.zip”“l(fā)esson3_student.html”## [7]“l(fā)esson3_student.rmd”“pseudo_facebook.tsv”## [9]“reddit.csv “”stateData.csv“## [11]”tidy-data.pdf“pf <-read.delim('pseudo_facebook.tsv')name(pf)## [1]”userid“”age“## [3 ]“dob_day”“dob_year”## [5]“dob_month”“gender”## [7]“tenure”“friend_count”## [9]“friendships_initiated”“l(fā)ikes”## [11]“l(fā)ikes_received”“mobile_likes “## [13]”mobile_likes_received“”www_likes“## [15]”www_likes_received“

?

用戶生日直方圖?

?

library(ggplot2)qplot(x = dob_day,data = pf)+ scale_x_continuous(breaks = 1:31)##`stat_bin()`using`bins = 30`。用`binwidth`選擇更好的價(jià)值。

?

?

qplot(x = dob_day,data = pf)+ scale_x_continuous(breaks = 1:31)+ facet_wrap(~dob_month,ncol = 3)##`stat_bin()`使用`bins = 30`。用`binwidth`選擇更好的價(jià)值。

?

?

??

朋友數(shù)

?

  1. qplot(friend_count,data = pf)##`stat_bin()`使用`bins = 30`。用`binwidth`選擇更好的價(jià)值。

?

??

qplot(friend_count,data = pf)+ scale_x_continuous(limits = c(0,1000))##`stat_bin()`使用`bins = 30`。用`binwidth`選擇更好的值。##警告:刪除了包含非有限值(stat_bin)的2951行。

?

??

按性別創(chuàng)建直方圖

qplot(x = friend_count,data = pf,binwidth = 10)+ scale_x_continuous(limits = c(0,1000) ),break = seq(0,1000,50))+ facet_wrap(?sex)

?

?

qplot(friend_count,data = subset(pf,!is.na(gender)),binwidth = 25)+ scale_x_continuous(limits = c(0,1000),breaks = seq(0,1000,50))+ facet_wrap(?性別)##警告:刪除了包含非有限值(stat_bin)的2949行。

?

?

table(pf $ gender)## ## female male ## 40254 58574by(pf $ friend_count,pf $ gender,summary)## pf $ gender:female ## Min。第一曲。中位數(shù)第3曲。最大。## 0 37 96 242 244 4923 ## --------------------------------------- - ---------------- ## pf $性別:男## Min。第一曲。中位數(shù)第3曲。最大。## 0 27 74 165 182 4917

?

誰有更多的朋友??

?

qplot(x = tenure,data = pf,binwidth = 30,color = I('black'),fill = I('#099DD9'))##警告:刪除了包含非有限值(stat_bin)的2行。

?

?

qplot(x = tenure / 365,data = pf,binwidth = .25,color = I('black'),fill = I('#F79420'))+ scale_x_continuous(breaks = seq(1,7,1), limits = c(0,7))##警告:刪除了包含非有限值(stat_bin)的26行。

?

?

?

?用戶年齡

?

?

?

?

?

?

箱線圖

?

?

?調(diào)整代碼以關(guān)注朋友數(shù)在0到1000之間的用戶。

?

▍需要幫助?聯(lián)系我們

?


R語言ggplot2 對Facebook用戶數(shù)據(jù)可視化分析的評論 (共 條)

分享到微博請遵守國家法律
水富县| 同德县| 稷山县| 吉安县| 新竹县| 呼伦贝尔市| 深水埗区| 山东省| 遵义县| 泗洪县| 阜康市| 台湾省| 渑池县| 什邡市| 武宁县| 西丰县| 安国市| 靖远县| 班戈县| 乐清市| 饶河县| 河北省| 高台县| 营山县| 涪陵区| 苍梧县| 台东县| 大丰市| 石家庄市| 紫阳县| 平邑县| 策勒县| 永顺县| 昭通市| 上犹县| 谷城县| 马边| 民勤县| 东海县| 文安县| 陇南市|