Prediction of Salesrank for Amazon products

Social Network Analysis

Team 2: Maryna Pavlenko, Daniel Lee, Yuzi Liu, Ziwei Liang
Analysis of product co-purchase data from Amazon. Poisson regression is used to predict salesrank of all the books using products’ own information and their neighbor’s information.

Data file

INDEX:

1: Data processing
2: Subcomponent
3: Visualizations
4: Network Statistics
5: Poisson Regression

6: Conclusion

Importing libraries

In [33]:
library("igraph")
library("dplyr")
library("sqldf")

Loading datasets

In [2]:
products <- read.csv("products.csv")
copurchase <- read.csv("copurchase.csv")

Data processing

Deleting products that are not books from "products" and "copurchase" files

In [3]:
products1 <- products[products$group == "Book", ]
Book <- subset(products1, salesrank <= 150000 & salesrank != -1)
Book$downloads <- NULL
copurchase1 <- subset(copurchase, Source %in% Book$id & Target %in% Book$id)

Creating a variable named 'in-degree', to show how many "Source" products people who buy "Target" products buy; i.e. how many edges to the focal product are in "co-purchase" network

In [7]:
network <- graph.data.frame(copurchase1, directed = T)
indegree <- degree(network, mode = 'in')

Creating a variable named 'out-degree', to show how many "Target" products people who buy "Source" product also buy; i.e., how many edges from the focal product are in "co-purchase" network.

In [8]:
outdegree <- degree(network, mode = 'out')

Subcomponent

Picking up one of the products with highest degree (in-degree + out-degree) to find its subcomponent, i.e., to find all the products that are connected to this focal product.

In [9]:
alldegree <- degree(network, mode = 'total')
max(alldegree)
53
In [10]:
which(alldegree==53)
4429
308
33
17290
In [11]:
sub_all <- subcomponent(network, "33",'all')

Visualizations

In [14]:
newgraph<-suppressWarnings(subgraph(network,sub_all))
diameter(newgraph, directed=F, weights=NA)
41
In [15]:
diam <- get_diameter(newgraph, directed=T)
as.vector(diam)
  1. 332
  2. 265
  3. 226
  4. 138
  5. 140
  6. 162
  7. 62
  8. 30
  9. 45
  10. 837
In [16]:
# Visualizing the subcomponent using iGraph, highlighting the diameter, and coloring the nodes along the diameter.
# The graph demonstrates 904 vertices, 904 book ids which are connected with each other.  Some of them have stronger 
# connections like clusters in the middle with short edges, some of them have weaker ties which are nodes on the edges 
# of the plot. Diameter shows the longest geodesic distance between two vertices. We have defined node attributes for the 
# diameter that is why it is plotted with larger nodes of dark blue color. In our visualization, the distance is 41 
# and there are 10 vertices in the diameter (37895 27936 21584 10889 11080 14111 4429  2501  3588  6676) which have the 
# longest distance between them.
V(newgraph)$color<-"skyblue"
V(newgraph)$size<-2
V(newgraph)[diam]$color<-"darkblue"
V(newgraph)[diam]$size<-5
par(mar=c(.1,.1,.1,.1))
plot.igraph(newgraph,
            vertex.label=NA,
            edge.arrow.size=0.00001,
            layout=layout.kamada.kawai)

Network Statistics

Computing various statistics about this network (i.e., subcomponent), including degree distribution, density, and centrality (degree centrality, closeness centrality and between centrality), hub/authority scores, etc.

In [17]:
deg1 <- degree(newgraph, mode = "all")
deg.dist.all <- degree_distribution(newgraph, cumulative=T, mode="all")
centr_degree(newgraph,mode="all",normalized=T)
$res
  1. 4
  2. 2
  3. 2
  4. 6
  5. 11
  6. 4
  7. 5
  8. 6
  9. 4
  10. 5
  11. 3
  12. 19
  13. 2
  14. 2
  15. 5
  16. 1
  17. 2
  18. 1
  19. 1
  20. 3
  21. 4
  22. 5
  23. 3
  24. 3
  25. 5
  26. 1
  27. 3
  28. 11
  29. 2
  30. 21
  31. 5
  32. 11
  33. 2
  34. 1
  35. 2
  36. 1
  37. 4
  38. 1
  39. 2
  40. 1
  41. 1
  42. 3
  43. 2
  44. 1
  45. 3
  46. 2
  47. 1
  48. 6
  49. 3
  50. 3
  51. 6
  52. 3
  53. 2
  54. 4
  55. 2
  56. 3
  57. 2
  58. 5
  59. 2
  60. 4
  61. 2
  62. 53
  63. 2
  64. 7
  65. 3
  66. 1
  67. 3
  68. 4
  69. 5
  70. 4
  71. 1
  72. 3
  73. 3
  74. 2
  75. 3
  76. 1
  77. 4
  78. 3
  79. 1
  80. 9
  81. 7
  82. 1
  83. 4
  84. 5
  85. 2
  86. 1
  87. 1
  88. 2
  89. 2
  90. 2
  91. 9
  92. 1
  93. 2
  94. 2
  95. 3
  96. 3
  97. 3
  98. 4
  99. 6
  100. 2
  101. 2
  102. 9
  103. 5
  104. 6
  105. 5
  106. 2
  107. 1
  108. 2
  109. 3
  110. 3
  111. 2
  112. 9
  113. 3
  114. 3
  115. 1
  116. 2
  117. 3
  118. 3
  119. 2
  120. 5
  121. 7
  122. 2
  123. 5
  124. 3
  125. 4
  126. 2
  127. 5
  128. 3
  129. 3
  130. 3
  131. 2
  132. 1
  133. 3
  134. 1
  135. 1
  136. 6
  137. 1
  138. 5
  139. 3
  140. 3
  141. 2
  142. 4
  143. 1
  144. 1
  145. 10
  146. 1
  147. 3
  148. 1
  149. 5
  150. 2
  151. 1
  152. 2
  153. 2
  154. 2
  155. 1
  156. 2
  157. 2
  158. 4
  159. 4
  160. 3
  161. 3
  162. 5
  163. 2
  164. 2
  165. 1
  166. 3
  167. 2
  168. 1
  169. 4
  170. 1
  171. 5
  172. 3
  173. 3
  174. 3
  175. 1
  176. 1
  177. 2
  178. 2
  179. 1
  180. 4
  181. 1
  182. 1
  183. 2
  184. 5
  185. 3
  186. 2
  187. 3
  188. 1
  189. 3
  190. 4
  191. 2
  192. 3
  193. 1
  194. 4
  195. 7
  196. 1
  197. 1
  198. 2
  199. 1
  200. 1
  201. 2
  202. 1
  203. 2
  204. 4
  205. 3
  206. 2
  207. 5
  208. 2
  209. 4
  210. 7
  211. 1
  212. 2
  213. 1
  214. 2
  215. 2
  216. 6
  217. 3
  218. 1
  219. 3
  220. 1
  221. 3
  222. 1
  223. 4
  224. 4
  225. 3
  226. 3
  227. 3
  228. 3
  229. 2
  230. 1
  231. 1
  232. 3
  233. 1
  234. 6
  235. 3
  236. 2
  237. 1
  238. 1
  239. 2
  240. 4
  241. 3
  242. 1
  243. 2
  244. 4
  245. 2
  246. 6
  247. 1
  248. 6
  249. 7
  250. 3
  251. 3
  252. 1
  253. 1
  254. 2
  255. 1
  256. 3
  257. 2
  258. 3
  259. 1
  260. 4
  261. 2
  262. 1
  263. 1
  264. 1
  265. 3
  266. 5
  267. 2
  268. 2
  269. 3
  270. 1
  271. 2
  272. 1
  273. 3
  274. 2
  275. 1
  276. 4
  277. 2
  278. 2
  279. 5
  280. 1
  281. 4
  282. 4
  283. 1
  284. 1
  285. 1
  286. 2
  287. 3
  288. 1
  289. 7
  290. 2
  291. 1
  292. 1
  293. 3
  294. 3
  295. 2
  296. 3
  297. 1
  298. 4
  299. 4
  300. 1
  301. 1
  302. 1
  303. 1
  304. 6
  305. 1
  306. 2
  307. 3
  308. 2
  309. 1
  310. 2
  311. 5
  312. 2
  313. 1
  314. 1
  315. 2
  316. 1
  317. 1
  318. 3
  319. 5
  320. 2
  321. 4
  322. 3
  323. 1
  324. 2
  325. 3
  326. 2
  327. 1
  328. 3
  329. 1
  330. 2
  331. 3
  332. 2
  333. 1
  334. 1
  335. 2
  336. 1
  337. 2
  338. 1
  339. 2
  340. 2
  341. 3
  342. 3
  343. 3
  344. 7
  345. 2
  346. 2
  347. 5
  348. 1
  349. 1
  350. 1
  351. 6
  352. 2
  353. 3
  354. 2
  355. 1
  356. 4
  357. 2
  358. 4
  359. 5
  360. 4
  361. 2
  362. 2
  363. 1
  364. 4
  365. 4
  366. 1
  367. 1
  368. 1
  369. 5
  370. 2
  371. 2
  372. 3
  373. 3
  374. 6
  375. 1
  376. 2
  377. 7
  378. 1
  379. 3
  380. 1
  381. 1
  382. 3
  383. 4
  384. 1
  385. 3
  386. 3
  387. 3
  388. 2
  389. 1
  390. 2
  391. 3
  392. 2
  393. 3
  394. 3
  395. 1
  396. 1
  397. 1
  398. 1
  399. 3
  400. 1
  401. 1
  402. 10
  403. 3
  404. 3
  405. 3
  406. 1
  407. 6
  408. 2
  409. 1
  410. 1
  411. 1
  412. 1
  413. 2
  414. 3
  415. 3
  416. 1
  417. 1
  418. 3
  419. 3
  420. 2
  421. 1
  422. 5
  423. 1
  424. 1
  425. 2
  426. 3
  427. 1
  428. 5
  429. 1
  430. 2
  431. 2
  432. 3
  433. 1
  434. 3
  435. 2
  436. 3
  437. 1
  438. 1
  439. 3
  440. 3
  441. 3
  442. 2
  443. 1
  444. 3
  445. 2
  446. 2
  447. 1
  448. 1
  449. 1
  450. 1
  451. 1
  452. 2
  453. 2
  454. 1
  455. 5
  456. 1
  457. 3
  458. 2
  459. 2
  460. 2
  461. 5
  462. 2
  463. 1
  464. 4
  465. 2
  466. 2
  467. 3
  468. 2
  469. 1
  470. 1
  471. 1
  472. 4
  473. 1
  474. 2
  475. 1
  476. 1
  477. 1
  478. 2
  479. 4
  480. 1
  481. 3
  482. 1
  483. 4
  484. 3
  485. 3
  486. 5
  487. 2
  488. 3
  489. 1
  490. 2
  491. 6
  492. 2
  493. 3
  494. 1
  495. 2
  496. 2
  497. 3
  498. 1
  499. 5
  500. 7
  501. 1
  502. 2
  503. 1
  504. 1
  505. 4
  506. 4
  507. 1
  508. 2
  509. 2
  510. 2
  511. 3
  512. 1
  513. 2
  514. 1
  515. 1
  516. 2
  517. 3
  518. 1
  519. 1
  520. 1
  521. 4
  522. 4
  523. 3
  524. 1
  525. 2
  526. 1
  527. 1
  528. 3
  529. 2
  530. 1
  531. 2
  532. 1
  533. 1
  534. 2
  535. 2
  536. 2
  537. 1
  538. 1
  539. 1
  540. 1
  541. 2
  542. 2
  543. 3
  544. 1
  545. 1
  546. 2
  547. 2
  548. 1
  549. 1
  550. 1
  551. 3
  552. 3
  553. 1
  554. 1
  555. 1
  556. 1
  557. 1
  558. 2
  559. 1
  560. 1
  561. 1
  562. 2
  563. 2
  564. 2
  565. 1
  566. 1
  567. 2
  568. 4
  569. 3
  570. 7
  571. 4
  572. 1
  573. 2
  574. 3
  575. 1
  576. 1
  577. 2
  578. 5
  579. 1
  580. 4
  581. 1
  582. 1
  583. 1
  584. 1
  585. 1
  586. 5
  587. 4
  588. 1
  589. 1
  590. 2
  591. 1
  592. 1
  593. 1
  594. 1
  595. 3
  596. 3
  597. 3
  598. 1
  599. 2
  600. 2
  601. 4
  602. 1
  603. 1
  604. 2
  605. 1
  606. 1
  607. 3
  608. 4
  609. 1
  610. 3
  611. 3
  612. 2
  613. 3
  614. 4
  615. 2
  616. 1
  617. 4
  618. 1
  619. 1
  620. 3
  621. 1
  622. 2
  623. 1
  624. 1
  625. 3
  626. 5
  627. 1
  628. 3
  629. 1
  630. 2
  631. 2
  632. 2
  633. 2
  634. 1
  635. 3
  636. 2
  637. 3
  638. 3
  639. 3
  640. 3
  641. 2
  642. 1
  643. 1
  644. 2
  645. 3
  646. 3
  647. 1
  648. 2
  649. 2
  650. 1
  651. 4
  652. 1
  653. 1
  654. 1
  655. 2
  656. 2
  657. 4
  658. 2
  659. 5
  660. 1
  661. 1
  662. 2
  663. 1
  664. 2
  665. 1
  666. 2
  667. 2
  668. 3
  669. 3
  670. 2
  671. 3
  672. 1
  673. 6
  674. 3
  675. 1
  676. 4
  677. 3
  678. 1
  679. 1
  680. 1
  681. 1
  682. 1
  683. 2
  684. 3
  685. 2
  686. 1
  687. 1
  688. 1
  689. 1
  690. 1
  691. 2
  692. 2
  693. 3
  694. 1
  695. 3
  696. 2
  697. 3
  698. 1
  699. 1
  700. 1
  701. 1
  702. 3
  703. 1
  704. 3
  705. 1
  706. 3
  707. 3
  708. 1
  709. 1
  710. 1
  711. 1
  712. 1
  713. 3
  714. 2
  715. 4
  716. 3
  717. 3
  718. 1
  719. 1
  720. 1
  721. 2
  722. 1
  723. 1
  724. 1
  725. 3
  726. 3
  727. 2
  728. 1
  729. 2
  730. 1
  731. 1
  732. 1
  733. 1
  734. 2
  735. 1
  736. 1
  737. 3
  738. 1
  739. 3
  740. 3
  741. 2
  742. 1
  743. 1
  744. 1
  745. 2
  746. 2
  747. 2
  748. 2
  749. 1
  750. 1
  751. 3
  752. 2
  753. 1
  754. 1
  755. 3
  756. 1
  757. 3
  758. 2
  759. 2
  760. 2
  761. 1
  762. 2
  763. 2
  764. 3
  765. 1
  766. 2
  767. 2
  768. 1
  769. 1
  770. 3
  771. 2
  772. 1
  773. 1
  774. 1
  775. 1
  776. 2
  777. 2
  778. 3
  779. 2
  780. 1
  781. 1
  782. 1
  783. 1
  784. 1
  785. 2
  786. 3
  787. 1
  788. 2
  789. 1
  790. 2
  791. 3
  792. 1
  793. 1
  794. 1
  795. 1
  796. 1
  797. 1
  798. 2
  799. 1
  800. 1
  801. 1
  802. 1
  803. 2
  804. 1
  805. 1
  806. 5
  807. 1
  808. 1
  809. 4
  810. 2
  811. 2
  812. 4
  813. 3
  814. 4
  815. 3
  816. 2
  817. 1
  818. 3
  819. 1
  820. 3
  821. 3
  822. 2
  823. 2
  824. 4
  825. 3
  826. 2
  827. 11
  828. 22
  829. 53
  830. 10
  831. 12
  832. 2
  833. 2
  834. 5
  835. 1
  836. 2
  837. 2
  838. 15
  839. 2
  840. 10
  841. 3
  842. 8
  843. 3
  844. 14
  845. 3
  846. 1
  847. 2
  848. 4
  849. 1
  850. 8
  851. 2
  852. 3
  853. 1
  854. 1
  855. 13
  856. 1
  857. 5
  858. 4
  859. 1
  860. 8
  861. 2
  862. 3
  863. 2
  864. 1
  865. 1
  866. 1
  867. 1
  868. 1
  869. 2
  870. 1
  871. 1
  872. 1
  873. 4
  874. 1
  875. 1
  876. 1
  877. 1
  878. 2
  879. 2
  880. 1
  881. 4
  882. 1
  883. 4
  884. 2
  885. 2
  886. 1
  887. 1
  888. 1
  889. 1
  890. 4
  891. 2
  892. 3
  893. 1
  894. 1
  895. 1
  896. 1
  897. 1
  898. 1
  899. 2
  900. 1
  901. 1
  902. 1
  903. 1
  904. 1
$centralization
0.027940579512858
$theoretical_max
1630818
In [18]:
plot( x=0:max(deg1), y=1-deg.dist.all, pch=19, cex=1.2, col="orange", 
      xlab="Degree", ylab="Cumulative Frequency")
In [19]:
deg2 <- degree(newgraph, mode = "in")
deg.dist.in <- degree_distribution(newgraph, cumulative=T, mode="in")
centr_degree(newgraph,mode="in",normalized=T)
$res
  1. 3
  2. 1
  3. 1
  4. 3
  5. 10
  6. 2
  7. 2
  8. 3
  9. 2
  10. 4
  11. 2
  12. 18
  13. 1
  14. 1
  15. 3
  16. 0
  17. 0
  18. 0
  19. 0
  20. 2
  21. 2
  22. 3
  23. 2
  24. 1
  25. 3
  26. 0
  27. 1
  28. 10
  29. 1
  30. 20
  31. 4
  32. 10
  33. 0
  34. 0
  35. 1
  36. 0
  37. 3
  38. 0
  39. 1
  40. 0
  41. 0
  42. 2
  43. 0
  44. 0
  45. 1
  46. 0
  47. 0
  48. 5
  49. 2
  50. 2
  51. 5
  52. 1
  53. 1
  54. 2
  55. 1
  56. 1
  57. 1
  58. 2
  59. 1
  60. 2
  61. 1
  62. 52
  63. 1
  64. 3
  65. 2
  66. 0
  67. 2
  68. 3
  69. 4
  70. 2
  71. 0
  72. 2
  73. 1
  74. 1
  75. 1
  76. 0
  77. 3
  78. 2
  79. 0
  80. 8
  81. 6
  82. 0
  83. 2
  84. 3
  85. 0
  86. 0
  87. 0
  88. 0
  89. 1
  90. 1
  91. 8
  92. 0
  93. 1
  94. 0
  95. 1
  96. 2
  97. 1
  98. 1
  99. 4
  100. 1
  101. 1
  102. 7
  103. 3
  104. 5
  105. 3
  106. 1
  107. 0
  108. 1
  109. 1
  110. 1
  111. 1
  112. 7
  113. 1
  114. 1
  115. 0
  116. 1
  117. 2
  118. 1
  119. 0
  120. 3
  121. 6
  122. 0
  123. 2
  124. 2
  125. 3
  126. 1
  127. 4
  128. 2
  129. 2
  130. 1
  131. 0
  132. 0
  133. 1
  134. 0
  135. 0
  136. 5
  137. 0
  138. 4
  139. 2
  140. 1
  141. 1
  142. 2
  143. 0
  144. 0
  145. 8
  146. 0
  147. 2
  148. 0
  149. 3
  150. 0
  151. 0
  152. 1
  153. 1
  154. 1
  155. 0
  156. 1
  157. 0
  158. 2
  159. 2
  160. 1
  161. 2
  162. 3
  163. 1
  164. 1
  165. 0
  166. 2
  167. 0
  168. 0
  169. 3
  170. 0
  171. 4
  172. 1
  173. 1
  174. 2
  175. 0
  176. 0
  177. 0
  178. 1
  179. 0
  180. 1
  181. 0
  182. 0
  183. 1
  184. 2
  185. 2
  186. 0
  187. 1
  188. 0
  189. 1
  190. 3
  191. 0
  192. 1
  193. 0
  194. 2
  195. 4
  196. 0
  197. 0
  198. 1
  199. 0
  200. 0
  201. 1
  202. 0
  203. 1
  204. 3
  205. 2
  206. 1
  207. 2
  208. 0
  209. 2
  210. 5
  211. 0
  212. 0
  213. 0
  214. 1
  215. 1
  216. 4
  217. 1
  218. 0
  219. 2
  220. 0
  221. 2
  222. 0
  223. 1
  224. 2
  225. 2
  226. 1
  227. 1
  228. 2
  229. 1
  230. 0
  231. 0
  232. 2
  233. 0
  234. 5
  235. 1
  236. 1
  237. 0
  238. 0
  239. 1
  240. 1
  241. 2
  242. 0
  243. 1
  244. 1
  245. 1
  246. 4
  247. 0
  248. 3
  249. 3
  250. 2
  251. 1
  252. 0
  253. 0
  254. 1
  255. 0
  256. 1
  257. 1
  258. 2
  259. 0
  260. 2
  261. 1
  262. 0
  263. 0
  264. 0
  265. 2
  266. 1
  267. 1
  268. 1
  269. 2
  270. 0
  271. 1
  272. 0
  273. 2
  274. 0
  275. 0
  276. 2
  277. 0
  278. 1
  279. 2
  280. 0
  281. 1
  282. 1
  283. 0
  284. 0
  285. 0
  286. 1
  287. 1
  288. 0
  289. 5
  290. 1
  291. 0
  292. 0
  293. 1
  294. 2
  295. 1
  296. 1
  297. 0
  298. 2
  299. 2
  300. 0
  301. 0
  302. 0
  303. 0
  304. 3
  305. 0
  306. 0
  307. 2
  308. 1
  309. 0
  310. 1
  311. 3
  312. 0
  313. 0
  314. 0
  315. 0
  316. 0
  317. 0
  318. 1
  319. 3
  320. 1
  321. 2
  322. 1
  323. 0
  324. 1
  325. 2
  326. 0
  327. 0
  328. 2
  329. 0
  330. 1
  331. 1
  332. 0
  333. 0
  334. 0
  335. 1
  336. 0
  337. 1
  338. 0
  339. 1
  340. 1
  341. 1
  342. 1
  343. 1
  344. 3
  345. 1
  346. 0
  347. 4
  348. 0
  349. 0
  350. 0
  351. 2
  352. 1
  353. 1
  354. 1
  355. 0
  356. 2
  357. 1
  358. 2
  359. 3
  360. 2
  361. 1
  362. 1
  363. 0
  364. 2
  365. 2
  366. 0
  367. 0
  368. 0
  369. 3
  370. 1
  371. 1
  372. 1
  373. 2
  374. 2
  375. 0
  376. 0
  377. 4
  378. 0
  379. 2
  380. 0
  381. 0
  382. 1
  383. 1
  384. 0
  385. 1
  386. 1
  387. 2
  388. 0
  389. 0
  390. 0
  391. 2
  392. 0
  393. 1
  394. 1
  395. 0
  396. 0
  397. 0
  398. 0
  399. 1
  400. 0
  401. 0
  402. 7
  403. 1
  404. 1
  405. 1
  406. 0
  407. 4
  408. 0
  409. 0
  410. 0
  411. 0
  412. 0
  413. 1
  414. 2
  415. 1
  416. 0
  417. 0
  418. 2
  419. 1
  420. 0
  421. 0
  422. 3
  423. 0
  424. 0
  425. 0
  426. 2
  427. 0
  428. 3
  429. 0
  430. 1
  431. 1
  432. 1
  433. 0
  434. 2
  435. 1
  436. 1
  437. 0
  438. 0
  439. 1
  440. 1
  441. 1
  442. 0
  443. 0
  444. 1
  445. 0
  446. 0
  447. 0
  448. 0
  449. 0
  450. 0
  451. 0
  452. 1
  453. 1
  454. 0
  455. 3
  456. 0
  457. 1
  458. 1
  459. 0
  460. 1
  461. 4
  462. 0
  463. 0
  464. 1
  465. 0
  466. 1
  467. 1
  468. 1
  469. 0
  470. 0
  471. 0
  472. 3
  473. 0
  474. 1
  475. 0
  476. 0
  477. 0
  478. 1
  479. 2
  480. 0
  481. 1
  482. 0
  483. 2
  484. 1
  485. 1
  486. 2
  487. 0
  488. 0
  489. 0
  490. 0
  491. 4
  492. 0
  493. 2
  494. 0
  495. 1
  496. 0
  497. 1
  498. 0
  499. 3
  500. 5
  501. 0
  502. 0
  503. 0
  504. 0
  505. 2
  506. 2
  507. 0
  508. 0
  509. 1
  510. 0
  511. 2
  512. 0
  513. 0
  514. 0
  515. 0
  516. 1
  517. 1
  518. 0
  519. 0
  520. 0
  521. 2
  522. 2
  523. 1
  524. 0
  525. 0
  526. 0
  527. 0
  528. 1
  529. 1
  530. 0
  531. 1
  532. 0
  533. 0
  534. 1
  535. 0
  536. 1
  537. 0
  538. 0
  539. 0
  540. 0
  541. 1
  542. 1
  543. 0
  544. 0
  545. 0
  546. 0
  547. 1
  548. 0
  549. 0
  550. 0
  551. 1
  552. 1
  553. 0
  554. 0
  555. 0
  556. 0
  557. 0
  558. 0
  559. 0
  560. 0
  561. 0
  562. 0
  563. 1
  564. 1
  565. 0
  566. 0
  567. 0
  568. 1
  569. 2
  570. 5
  571. 1
  572. 0
  573. 1
  574. 1
  575. 0
  576. 0
  577. 0
  578. 3
  579. 0
  580. 2
  581. 0
  582. 0
  583. 0
  584. 0
  585. 0
  586. 2
  587. 2
  588. 0
  589. 0
  590. 1
  591. 0
  592. 0
  593. 0
  594. 0
  595. 1
  596. 1
  597. 1
  598. 0
  599. 1
  600. 1
  601. 2
  602. 0
  603. 0
  604. 0
  605. 0
  606. 0
  607. 1
  608. 2
  609. 0
  610. 1
  611. 2
  612. 1
  613. 1
  614. 1
  615. 1
  616. 0
  617. 2
  618. 0
  619. 0
  620. 1
  621. 0
  622. 1
  623. 0
  624. 0
  625. 2
  626. 2
  627. 0
  628. 1
  629. 0
  630. 1
  631. 1
  632. 0
  633. 1
  634. 0
  635. 1
  636. 0
  637. 2
  638. 1
  639. 2
  640. 2
  641. 1
  642. 0
  643. 0
  644. 0
  645. 1
  646. 2
  647. 0
  648. 1
  649. 1
  650. 0
  651. 2
  652. 0
  653. 0
  654. 0
  655. 1
  656. 1
  657. 2
  658. 0
  659. 2
  660. 0
  661. 0
  662. 1
  663. 0
  664. 1
  665. 0
  666. 1
  667. 1
  668. 1
  669. 2
  670. 1
  671. 1
  672. 0
  673. 5
  674. 1
  675. 0
  676. 3
  677. 1
  678. 0
  679. 0
  680. 0
  681. 0
  682. 0
  683. 0
  684. 1
  685. 0
  686. 0
  687. 0
  688. 0
  689. 0
  690. 0
  691. 0
  692. 1
  693. 1
  694. 0
  695. 1
  696. 0
  697. 1
  698. 0
  699. 0
  700. 0
  701. 0
  702. 1
  703. 0
  704. 1
  705. 0
  706. 1
  707. 1
  708. 0
  709. 0
  710. 0
  711. 0
  712. 0
  713. 1
  714. 0
  715. 1
  716. 1
  717. 1
  718. 0
  719. 0
  720. 0
  721. 1
  722. 0
  723. 0
  724. 0
  725. 0
  726. 1
  727. 1
  728. 0
  729. 1
  730. 0
  731. 0
  732. 0
  733. 0
  734. 1
  735. 0
  736. 0
  737. 1
  738. 0
  739. 1
  740. 1
  741. 0
  742. 0
  743. 0
  744. 0
  745. 0
  746. 1
  747. 1
  748. 1
  749. 0
  750. 0
  751. 1
  752. 1
  753. 0
  754. 0
  755. 1
  756. 0
  757. 1
  758. 1
  759. 1
  760. 0
  761. 0
  762. 1
  763. 1
  764. 1
  765. 0
  766. 0
  767. 0
  768. 0
  769. 0
  770. 2
  771. 0
  772. 0
  773. 0
  774. 0
  775. 0
  776. 0
  777. 0
  778. 2
  779. 0
  780. 0
  781. 0
  782. 0
  783. 0
  784. 0
  785. 0
  786. 0
  787. 0
  788. 0
  789. 0
  790. 1
  791. 1
  792. 0
  793. 0
  794. 0
  795. 0
  796. 0
  797. 0
  798. 0
  799. 0
  800. 0
  801. 0
  802. 0
  803. 0
  804. 0
  805. 0
  806. 3
  807. 0
  808. 0
  809. 2
  810. 0
  811. 0
  812. 2
  813. 1
  814. 2
  815. 1
  816. 1
  817. 0
  818. 1
  819. 0
  820. 1
  821. 1
  822. 0
  823. 1
  824. 2
  825. 1
  826. 1
  827. 11
  828. 22
  829. 53
  830. 10
  831. 12
  832. 2
  833. 2
  834. 5
  835. 1
  836. 2
  837. 2
  838. 15
  839. 2
  840. 10
  841. 3
  842. 8
  843. 3
  844. 14
  845. 3
  846. 1
  847. 2
  848. 4
  849. 1
  850. 8
  851. 2
  852. 3
  853. 1
  854. 1
  855. 13
  856. 1
  857. 5
  858. 4
  859. 1
  860. 8
  861. 2
  862. 3
  863. 2
  864. 1
  865. 1
  866. 1
  867. 1
  868. 1
  869. 2
  870. 1
  871. 1
  872. 1
  873. 4
  874. 1
  875. 1
  876. 1
  877. 1
  878. 2
  879. 2
  880. 1
  881. 4
  882. 1
  883. 4
  884. 2
  885. 2
  886. 1
  887. 1
  888. 1
  889. 1
  890. 4
  891. 2
  892. 3
  893. 1
  894. 1
  895. 1
  896. 1
  897. 1
  898. 1
  899. 2
  900. 1
  901. 1
  902. 1
  903. 1
  904. 1
$centralization
0.0572562941620361
$theoretical_max
816312
In [20]:
plot( x=0:max(deg2), y=1-deg.dist.in, pch=19, cex=1.2, col="blue",      
      xlab="Degree", ylab="Cumulative Frequency")
In [21]:
deg3 <- degree(newgraph, mode = "out")
deg.dist.out <- degree_distribution(newgraph, cumulative=T, mode="out")
centr_degree(newgraph,mode="out",normalized=T)
$res
  1. 1
  2. 1
  3. 1
  4. 3
  5. 1
  6. 2
  7. 3
  8. 3
  9. 2
  10. 1
  11. 1
  12. 1
  13. 1
  14. 1
  15. 2
  16. 1
  17. 2
  18. 1
  19. 1
  20. 1
  21. 2
  22. 2
  23. 1
  24. 2
  25. 2
  26. 1
  27. 2
  28. 1
  29. 1
  30. 1
  31. 1
  32. 1
  33. 2
  34. 1
  35. 1
  36. 1
  37. 1
  38. 1
  39. 1
  40. 1
  41. 1
  42. 1
  43. 2
  44. 1
  45. 2
  46. 2
  47. 1
  48. 1
  49. 1
  50. 1
  51. 1
  52. 2
  53. 1
  54. 2
  55. 1
  56. 2
  57. 1
  58. 3
  59. 1
  60. 2
  61. 1
  62. 1
  63. 1
  64. 4
  65. 1
  66. 1
  67. 1
  68. 1
  69. 1
  70. 2
  71. 1
  72. 1
  73. 2
  74. 1
  75. 2
  76. 1
  77. 1
  78. 1
  79. 1
  80. 1
  81. 1
  82. 1
  83. 2
  84. 2
  85. 2
  86. 1
  87. 1
  88. 2
  89. 1
  90. 1
  91. 1
  92. 1
  93. 1
  94. 2
  95. 2
  96. 1
  97. 2
  98. 3
  99. 2
  100. 1
  101. 1
  102. 2
  103. 2
  104. 1
  105. 2
  106. 1
  107. 1
  108. 1
  109. 2
  110. 2
  111. 1
  112. 2
  113. 2
  114. 2
  115. 1
  116. 1
  117. 1
  118. 2
  119. 2
  120. 2
  121. 1
  122. 2
  123. 3
  124. 1
  125. 1
  126. 1
  127. 1
  128. 1
  129. 1
  130. 2
  131. 2
  132. 1
  133. 2
  134. 1
  135. 1
  136. 1
  137. 1
  138. 1
  139. 1
  140. 2
  141. 1
  142. 2
  143. 1
  144. 1
  145. 2
  146. 1
  147. 1
  148. 1
  149. 2
  150. 2
  151. 1
  152. 1
  153. 1
  154. 1
  155. 1
  156. 1
  157. 2
  158. 2
  159. 2
  160. 2
  161. 1
  162. 2
  163. 1
  164. 1
  165. 1
  166. 1
  167. 2
  168. 1
  169. 1
  170. 1
  171. 1
  172. 2
  173. 2
  174. 1
  175. 1
  176. 1
  177. 2
  178. 1
  179. 1
  180. 3
  181. 1
  182. 1
  183. 1
  184. 3
  185. 1
  186. 2
  187. 2
  188. 1
  189. 2
  190. 1
  191. 2
  192. 2
  193. 1
  194. 2
  195. 3
  196. 1
  197. 1
  198. 1
  199. 1
  200. 1
  201. 1
  202. 1
  203. 1
  204. 1
  205. 1
  206. 1
  207. 3
  208. 2
  209. 2
  210. 2
  211. 1
  212. 2
  213. 1
  214. 1
  215. 1
  216. 2
  217. 2
  218. 1
  219. 1
  220. 1
  221. 1
  222. 1
  223. 3
  224. 2
  225. 1
  226. 2
  227. 2
  228. 1
  229. 1
  230. 1
  231. 1
  232. 1
  233. 1
  234. 1
  235. 2
  236. 1
  237. 1
  238. 1
  239. 1
  240. 3
  241. 1
  242. 1
  243. 1
  244. 3
  245. 1
  246. 2
  247. 1
  248. 3
  249. 4
  250. 1
  251. 2
  252. 1
  253. 1
  254. 1
  255. 1
  256. 2
  257. 1
  258. 1
  259. 1
  260. 2
  261. 1
  262. 1
  263. 1
  264. 1
  265. 1
  266. 4
  267. 1
  268. 1
  269. 1
  270. 1
  271. 1
  272. 1
  273. 1
  274. 2
  275. 1
  276. 2
  277. 2
  278. 1
  279. 3
  280. 1
  281. 3
  282. 3
  283. 1
  284. 1
  285. 1
  286. 1
  287. 2
  288. 1
  289. 2
  290. 1
  291. 1
  292. 1
  293. 2
  294. 1
  295. 1
  296. 2
  297. 1
  298. 2
  299. 2
  300. 1
  301. 1
  302. 1
  303. 1
  304. 3
  305. 1
  306. 2
  307. 1
  308. 1
  309. 1
  310. 1
  311. 2
  312. 2
  313. 1
  314. 1
  315. 2
  316. 1
  317. 1
  318. 2
  319. 2
  320. 1
  321. 2
  322. 2
  323. 1
  324. 1
  325. 1
  326. 2
  327. 1
  328. 1
  329. 1
  330. 1
  331. 2
  332. 2
  333. 1
  334. 1
  335. 1
  336. 1
  337. 1
  338. 1
  339. 1
  340. 1
  341. 2
  342. 2
  343. 2
  344. 4
  345. 1
  346. 2
  347. 1
  348. 1
  349. 1
  350. 1
  351. 4
  352. 1
  353. 2
  354. 1
  355. 1
  356. 2
  357. 1
  358. 2
  359. 2
  360. 2
  361. 1
  362. 1
  363. 1
  364. 2
  365. 2
  366. 1
  367. 1
  368. 1
  369. 2
  370. 1
  371. 1
  372. 2
  373. 1
  374. 4
  375. 1
  376. 2
  377. 3
  378. 1
  379. 1
  380. 1
  381. 1
  382. 2
  383. 3
  384. 1
  385. 2
  386. 2
  387. 1
  388. 2
  389. 1
  390. 2
  391. 1
  392. 2
  393. 2
  394. 2
  395. 1
  396. 1
  397. 1
  398. 1
  399. 2
  400. 1
  401. 1
  402. 3
  403. 2
  404. 2
  405. 2
  406. 1
  407. 2
  408. 2
  409. 1
  410. 1
  411. 1
  412. 1
  413. 1
  414. 1
  415. 2
  416. 1
  417. 1
  418. 1
  419. 2
  420. 2
  421. 1
  422. 2
  423. 1
  424. 1
  425. 2
  426. 1
  427. 1
  428. 2
  429. 1
  430. 1
  431. 1
  432. 2
  433. 1
  434. 1
  435. 1
  436. 2
  437. 1
  438. 1
  439. 2
  440. 2
  441. 2
  442. 2
  443. 1
  444. 2
  445. 2
  446. 2
  447. 1
  448. 1
  449. 1
  450. 1
  451. 1
  452. 1
  453. 1
  454. 1
  455. 2
  456. 1
  457. 2
  458. 1
  459. 2
  460. 1
  461. 1
  462. 2
  463. 1
  464. 3
  465. 2
  466. 1
  467. 2
  468. 1
  469. 1
  470. 1
  471. 1
  472. 1
  473. 1
  474. 1
  475. 1
  476. 1
  477. 1
  478. 1
  479. 2
  480. 1
  481. 2
  482. 1
  483. 2
  484. 2
  485. 2
  486. 3
  487. 2
  488. 3
  489. 1
  490. 2
  491. 2
  492. 2
  493. 1
  494. 1
  495. 1
  496. 2
  497. 2
  498. 1
  499. 2
  500. 2
  501. 1
  502. 2
  503. 1
  504. 1
  505. 2
  506. 2
  507. 1
  508. 2
  509. 1
  510. 2
  511. 1
  512. 1
  513. 2
  514. 1
  515. 1
  516. 1
  517. 2
  518. 1
  519. 1
  520. 1
  521. 2
  522. 2
  523. 2
  524. 1
  525. 2
  526. 1
  527. 1
  528. 2
  529. 1
  530. 1
  531. 1
  532. 1
  533. 1
  534. 1
  535. 2
  536. 1
  537. 1
  538. 1
  539. 1
  540. 1
  541. 1
  542. 1
  543. 3
  544. 1
  545. 1
  546. 2
  547. 1
  548. 1
  549. 1
  550. 1
  551. 2
  552. 2
  553. 1
  554. 1
  555. 1
  556. 1
  557. 1
  558. 2
  559. 1
  560. 1
  561. 1
  562. 2
  563. 1
  564. 1
  565. 1
  566. 1
  567. 2
  568. 3
  569. 1
  570. 2
  571. 3
  572. 1
  573. 1
  574. 2
  575. 1
  576. 1
  577. 2
  578. 2
  579. 1
  580. 2
  581. 1
  582. 1
  583. 1
  584. 1
  585. 1
  586. 3
  587. 2
  588. 1
  589. 1
  590. 1
  591. 1
  592. 1
  593. 1
  594. 1
  595. 2
  596. 2
  597. 2
  598. 1
  599. 1
  600. 1
  601. 2
  602. 1
  603. 1
  604. 2
  605. 1
  606. 1
  607. 2
  608. 2
  609. 1
  610. 2
  611. 1
  612. 1
  613. 2
  614. 3
  615. 1
  616. 1
  617. 2
  618. 1
  619. 1
  620. 2
  621. 1
  622. 1
  623. 1
  624. 1
  625. 1
  626. 3
  627. 1
  628. 2
  629. 1
  630. 1
  631. 1
  632. 2
  633. 1
  634. 1
  635. 2
  636. 2
  637. 1
  638. 2
  639. 1
  640. 1
  641. 1
  642. 1
  643. 1
  644. 2
  645. 2
  646. 1
  647. 1
  648. 1
  649. 1
  650. 1
  651. 2
  652. 1
  653. 1
  654. 1
  655. 1
  656. 1
  657. 2
  658. 2
  659. 3
  660. 1
  661. 1
  662. 1
  663. 1
  664. 1
  665. 1
  666. 1
  667. 1
  668. 2
  669. 1
  670. 1
  671. 2
  672. 1
  673. 1
  674. 2
  675. 1
  676. 1
  677. 2
  678. 1
  679. 1
  680. 1
  681. 1
  682. 1
  683. 2
  684. 2
  685. 2
  686. 1
  687. 1
  688. 1
  689. 1
  690. 1
  691. 2
  692. 1
  693. 2
  694. 1
  695. 2
  696. 2
  697. 2
  698. 1
  699. 1
  700. 1
  701. 1
  702. 2
  703. 1
  704. 2
  705. 1
  706. 2
  707. 2
  708. 1
  709. 1
  710. 1
  711. 1
  712. 1
  713. 2
  714. 2
  715. 3
  716. 2
  717. 2
  718. 1
  719. 1
  720. 1
  721. 1
  722. 1
  723. 1
  724. 1
  725. 3
  726. 2
  727. 1
  728. 1
  729. 1
  730. 1
  731. 1
  732. 1
  733. 1
  734. 1
  735. 1
  736. 1
  737. 2
  738. 1
  739. 2
  740. 2
  741. 2
  742. 1
  743. 1
  744. 1
  745. 2
  746. 1
  747. 1
  748. 1
  749. 1
  750. 1
  751. 2
  752. 1
  753. 1
  754. 1
  755. 2
  756. 1
  757. 2
  758. 1
  759. 1
  760. 2
  761. 1
  762. 1
  763. 1
  764. 2
  765. 1
  766. 2
  767. 2
  768. 1
  769. 1
  770. 1
  771. 2
  772. 1
  773. 1
  774. 1
  775. 1
  776. 2
  777. 2
  778. 1
  779. 2
  780. 1
  781. 1
  782. 1
  783. 1
  784. 1
  785. 2
  786. 3
  787. 1
  788. 2
  789. 1
  790. 1
  791. 2
  792. 1
  793. 1
  794. 1
  795. 1
  796. 1
  797. 1
  798. 2
  799. 1
  800. 1
  801. 1
  802. 1
  803. 2
  804. 1
  805. 1
  806. 2
  807. 1
  808. 1
  809. 2
  810. 2
  811. 2
  812. 2
  813. 2
  814. 2
  815. 2
  816. 1
  817. 1
  818. 2
  819. 1
  820. 2
  821. 2
  822. 2
  823. 1
  824. 2
  825. 2
  826. 1
  827. 0
  828. 0
  829. 0
  830. 0
  831. 0
  832. 0
  833. 0
  834. 0
  835. 0
  836. 0
  837. 0
  838. 0
  839. 0
  840. 0
  841. 0
  842. 0
  843. 0
  844. 0
  845. 0
  846. 0
  847. 0
  848. 0
  849. 0
  850. 0
  851. 0
  852. 0
  853. 0
  854. 0
  855. 0
  856. 0
  857. 0
  858. 0
  859. 0
  860. 0
  861. 0
  862. 0
  863. 0
  864. 0
  865. 0
  866. 0
  867. 0
  868. 0
  869. 0
  870. 0
  871. 0
  872. 0
  873. 0
  874. 0
  875. 0
  876. 0
  877. 0
  878. 0
  879. 0
  880. 0
  881. 0
  882. 0
  883. 0
  884. 0
  885. 0
  886. 0
  887. 0
  888. 0
  889. 0
  890. 0
  891. 0
  892. 0
  893. 0
  894. 0
  895. 0
  896. 0
  897. 0
  898. 0
  899. 0
  900. 0
  901. 0
  902. 0
  903. 0
  904. 0
$centralization
0.00299272827056322
$theoretical_max
816312
In [22]:
plot( x=0:max(deg3), y=1-deg.dist.out, pch=19, cex=1.2, col="red", 
      xlab="Degree", ylab="Cumulative Frequency")

The degree of a node refers to the number of ties associated with a node.

Deg1 measures all the ties going in and out. In our case, deg1 gives an output of books ids and their corresponding total number of links going to and from the focal product in the network.Degree distribution deg.dist.all shows the cumulative frequency of nodes with degree Deg1. The centralization function centr_degree returned res - vertex centrality, centralization of 0.02794058, and theoretical_max 1630818 - maximum centralization score for the newgraph.

Deg2 measures all the ties going in. In our case, deg2 gives an output of books ids and their corresponding total number of links going to the focal product in the network.Degree distribution deg.dist.in shows the cumulative frequency of nodes with degree Deg2. The centralization function centr_degree returned res - vertex centrality, centralization of 0.05725629, and theoretical_max 816312- maximum centralization score for the newgraph.

Deg3 measures all the ties going out. In our case, deg3 gives an output of books ids and their corresponding total number of links going from the focal product.Degree distribution deg.dist.out shows the cumulative frequency of nodes with degree Deg3. The centralization function centr_degree returned res - vertex centrality, centralization of 0.002992728,and theoretical_max 816312- maximum centralization score for the newgraph. We can observe that maximum centralization score for indegree and outdegree ties is the same 816312.

In [23]:
# Density is the proportion of present edges from all possible ties. For our network, density is 0.001436951.
edge_density(newgraph, loops=F)
0.00143695057772028
In [24]:
# Closeness refers to how connected a node is to its neighbors. It is inverse of the node's average geodesic distance to
# others. The higher values are the less centrality is in the network. Besides that, centralization function centr_clo 
# returned centralization score of 0.1074443 and theoretical max of 451.2499 for the graph.
closeness<-closeness(newgraph, mode="all", weights=NA)
centr_clo(newgraph,mode="all",normalized=T)
$res
  1. 0.0816824966078697
  2. 0.0973375013474184
  3. 0.0911936982427792
  4. 0.0972326908581889
  5. 0.127704709376326
  6. 0.135098743267504
  7. 0.0972117558402412
  8. 0.0972326908581889
  9. 0.0755585306668898
  10. 0.106048150322959
  11. 0.127254791431793
  12. 0.143151553582752
  13. 0.107538406573776
  14. 0.0912121212121212
  15. 0.070277842633668
  16. 0.0694241562235719
  17. 0.116606404958678
  18. 0.0971699128376197
  19. 0.113257243195786
  20. 0.0730464326160815
  21. 0.111715947049363
  22. 0.106939838938892
  23. 0.110121951219512
  24. 0.117044718081659
  25. 0.109880749574106
  26. 0.0680687471732248
  27. 0.104032258064516
  28. 0.0954041204437401
  29. 0.0959005947323704
  30. 0.128779235596121
  31. 0.120560747663551
  32. 0.133540372670807
  33. 0.10464712017615
  34. 0.0702341137123746
  35. 0.0755332496863237
  36. 0.0836111111111111
  37. 0.0912305516265912
  38. 0.0722284434490481
  39. 0.118162784611358
  40. 0.0694241562235719
  41. 0.0966188743847635
  42. 0.082798459563543
  43. 0.0680841438588555
  44. 0.0440251572327044
  45. 0.114159292035398
  46. 0.0944560669456067
  47. 0.083564686285397
  48. 0.125695991091314
  49. 0.12739841986456
  50. 0.0682436517533253
  51. 0.0731766612641815
  52. 0.0482707008071845
  53. 0.127147282455646
  54. 0.0913320521897441
  55. 0.0730346166289227
  56. 0.0839297332465843
  57. 0.0951227220056884
  58. 0.116261104673619
  59. 0.0836653386454183
  60. 0.125923859991633
  61. 0.0680841438588555
  62. 0.140654205607477
  63. 0.0911752827140549
  64. 0.0682488096137858
  65. 0.063911104819874
  66. 0.117823590814196
  67. 0.0507046998708518
  68. 0.0731055699481865
  69. 0.0681715234787861
  70. 0.0656727272727273
  71. 0.125242718446602
  72. 0.113157894736842
  73. 0.0656727272727273
  74. 0.092416334049739
  75. 0.101815311760063
  76. 0.0694241562235719
  77. 0.0752186588921283
  78. 0.121961102106969
  79. 0.0722284434490481
  80. 0.096660244059088
  81. 0.092968186965922
  82. 0.0850682995760716
  83. 0.0831032578685809
  84. 0.0767596055763346
  85. 0.099602911978822
  86. 0.0811466570812365
  87. 0.0917123705057891
  88. 0.0912121212121212
  89. 0.0774376125546694
  90. 0.091591439294046
  91. 0.056363522876225
  92. 0.0506876227897839
  93. 0.0730346166289227
  94. 0.0806754221388368
  95. 0.111965282083075
  96. 0.100770003347841
  97. 0.0694455125740214
  98. 0.0913135807462837
  99. 0.125416666666667
  100. 0.113314092106914
  101. 0.112945590994371
  102. 0.126064498115315
  103. 0.126134935046794
  104. 0.113813965213007
  105. 0.0639156285390713
  106. 0.0911936982427792
  107. 0.0911568746214415
  108. 0.071293225959261
  109. 0.0682384946724099
  110. 0.063911104819874
  111. 0.111509014571499
  112. 0.091285887585928
  113. 0.0682178741406663
  114. 0.0682333383708629
  115. 0.0850682995760716
  116. 0.0850682995760716
  117. 0.127218934911243
  118. 0.0837118754055808
  119. 0.127183098591549
  120. 0.11794670846395
  121. 0.088304322315666
  122. 0.0902278177458034
  123. 0.0600918346975444
  124. 0.117915904936015
  125. 0.113699320070511
  126. 0.102114666968223
  127. 0.0596039603960396
  128. 0.127758913412564
  129. 0.0600918346975444
  130. 0.0566961763043888
  131. 0.0482655406488856
  132. 0.0699295283822504
  133. 0.105527638190955
  134. 0.0911568746214415
  135. 0.112818590704648
  136. 0.10080375083724
  137. 0.127111486486486
  138. 0.100199733688415
  139. 0.0840860415308688
  140. 0.111179512435361
  141. 0.0536573771465922
  142. 0.0882697947214076
  143. 0.0657253075187423
  144. 0.0911936982427792
  145. 0.0926153846153846
  146. 0.0694241562235719
  147. 0.0852530211480362
  148. 0.0750498670212766
  149. 0.091350531107739
  150. 0.0730346166289227
  151. 0.0837118754055808
  152. 0.105527638190955
  153. 0.0730464326160815
  154. 0.092350173859685
  155. 0.0837118754055808
  156. 0.0811320754716981
  157. 0.102114666968223
  158. 0.0840547333147166
  159. 0.0917496443812233
  160. 0.0776173285198556
  161. 0.107653791130186
  162. 0.124827204865911
  163. 0.0650295261414374
  164. 0.101437879128286
  165. 0.0911936982427792
  166. 0.112875
  167. 0.0533845699083654
  168. 0.0966188743847635
  169. 0.12536443148688
  170. 0.068130375735627
  171. 0.112243629583592
  172. 0.113857016769638
  173. 0.0840547333147166
  174. 0.0911936982427792
  175. 0.0911568746214415
  176. 0.0881491604841859
  177. 0.0912951167728238
  178. 0.0650295261414374
  179. 0.100646455639768
  180. 0.0996248896734334
  181. 0.0533593334515157
  182. 0.0835801554979637
  183. 0.0777242210363229
  184. 0.069547134935305
  185. 0.087686929500874
  186. 0.0923690671031097
  187. 0.053390882752912
  188. 0.087103308575287
  189. 0.0754322947122212
  190. 0.0631512693195328
  191. 0.0836653386454183
  192. 0.0783446121811557
  193. 0.127111486486486
  194. 0.0808632578131996
  195. 0.0878661087866109
  196. 0.0594039865798303
  197. 0.0847728126173489
  198. 0.0694348327566321
  199. 0.0837118754055808
  200. 0.10219556360344
  201. 0.100950251537172
  202. 0.11098820058997
  203. 0.0930352359365341
  204. 0.127903682719547
  205. 0.0917776196767964
  206. 0.0971908298353245
  207. 0.125329632199861
  208. 0.102369345879152
  209. 0.0912121212121212
  210. 0.091899043354366
  211. 0.0678539224526601
  212. 0.049804202746677
  213. 0.0533593334515157
  214. 0.0751810840063275
  215. 0.056097409455178
  216. 0.0748570007460831
  217. 0.0914986320802513
  218. 0.087103308575287
  219. 0.0963302752293578
  220. 0.0911936982427792
  221. 0.0696544276457883
  222. 0.0783310201249133
  223. 0.0594274432379072
  224. 0.0912397696271597
  225. 0.127183098591549
  226. 0.091138473960436
  227. 0.0871537496380658
  228. 0.0474688534931399
  229. 0.0523751522533496
  230. 0.0771794871794872
  231. 0.0912121212121212
  232. 0.123394370046461
  233. 0.100927685257628
  234. 0.101006711409396
  235. 0.10219556360344
  236. 0.123360655737705
  237. 0.08417225950783
  238. 0.0750873108265425
  239. 0.0696490551484767
  240. 0.0600918346975444
  241. 0.0672575599582899
  242. 0.111674499134306
  243. 0.100355634585463
  244. 0.125329632199861
  245. 0.0836265975180589
  246. 0.0838907469342252
  247. 0.0730228044638525
  248. 0.0836808451487351
  249. 0.0836808451487351
  250. 0.0776106574989257
  251. 0.125347029428096
  252. 0.080145557823733
  253. 0.113299874529486
  254. 0.0533624867036993
  255. 0.0751685673853326
  256. 0.123394370046461
  257. 0.0976216216216216
  258. 0.091591439294046
  259. 0.0917123705057891
  260. 0.101735015772871
  261. 0.101437879128286
  262. 0.0699620361044394
  263. 0.127111486486486
  264. 0.112875
  265. 0.083564686285397
  266. 0.0912489894907033
  267. 0.0906080674292595
  268. 0.072118840348215
  269. 0.112875
  270. 0.127111486486486
  271. 0.0747145457554195
  272. 0.125242718446602
  273. 0.0836033700583279
  274. 0.0992744063324538
  275. 0.125242718446602
  276. 0.10231135282121
  277. 0.0959821428571429
  278. 0.0871201157742402
  279. 0.106561246164739
  280. 0.10985401459854
  281. 0.0839141343741288
  282. 0.0776640577965081
  283. 0.0721130809774796
  284. 0.0928248355263158
  285. 0.101666291375816
  286. 0.0836265975180589
  287. 0.0802025046629363
  288. 0.0850682995760716
  289. 0.0840703845079602
  290. 0.0751810840063275
  291. 0.0680687471732248
  292. 0.100725041829336
  293. 0.125818587153407
  294. 0.0836343428730203
  295. 0.102241847826087
  296. 0.113356766256591
  297. 0.091703056768559
  298. 0.0774110587226747
  299. 0.0774110587226747
  300. 0.09108331652209
  301. 0.127111486486486
  302. 0.087103308575287
  303. 0.101437879128286
  304. 0.0839921867733234
  305. 0.113257243195786
  306. 0.100995414383179
  307. 0.0836343428730203
  308. 0.112903225806452
  309. 0.0638252756573367
  310. 0.0726585130350821
  311. 0.102555366269165
  312. 0.084836527621195
  313. 0.112020841086714
  314. 0.0911568746214415
  315. 0.0563108006984285
  316. 0.111674499134306
  317. 0.0699295283822504
  318. 0.0453381533363458
  319. 0.08291249655679
  320. 0.110095098756401
  321. 0.111826625386997
  322. 0.091304347826087
  323. 0.0840312674483529
  324. 0.0561043802423113
  325. 0.077710843373494
  326. 0.111440207330618
  327. 0.109827292629531
  328. 0.112875
  329. 0.0699620361044394
  330. 0.09173100365705
  331. 0.0848444987315606
  332. 0.0771399282419272
  333. 0.0730228044638525
  334. 0.117823590814196
  335. 0.125277469478357
  336. 0.125242718446602
  337. 0.123360655737705
  338. 0.109827292629531
  339. 0.123360655737705
  340. 0.0842193620593173
  341. 0.081175836030205
  342. 0.0836033700583279
  343. 0.0811685393258427
  344. 0.0836808451487351
  345. 0.0655630581572642
  346. 0.127183098591549
  347. 0.0927009547274407
  348. 0.123326959847036
  349. 0.0974951414381343
  350. 0.0901737567405632
  351. 0.0915079043372517
  352. 0.117854346123727
  353. 0.102045428862018
  354. 0.0751810840063275
  355. 0.0730228044638525
  356. 0.0916379135376497
  357. 0.0774907749077491
  358. 0.0839765646796243
  359. 0.0903722978382706
  360. 0.0829048843187661
  361. 0.112875
  362. 0.11134401972873
  363. 0.125242718446602
  364. 0.0672575599582899
  365. 0.0720958083832335
  366. 0.123326959847036
  367. 0.123326959847036
  368. 0.0783310201249133
  369. 0.0720958083832335
  370. 0.0720842979165004
  371. 0.100590397682968
  372. 0.0848524713399737
  373. 0.0848763981577216
  374. 0.0836808451487351
  375. 0.100646455639768
  376. 0.0771926825098307
  377. 0.0926819254849636
  378. 0.077404423109892
  379. 0.112875
  380. 0.0630322490576574
  381. 0.087103308575287
  382. 0.0658499234303216
  383. 0.0930448222565688
  384. 0.08417225950783
  385. 0.0848524713399737
  386. 0.0920114122681883
  387. 0.0811685393258427
  388. 0.0848843767625494
  389. 0.109934258582907
  390. 0.0914245216158753
  391. 0.0720095693779904
  392. 0.0888342351205116
  393. 0.0804167779855731
  394. 0.113285660519383
  395. 0.0941017090454356
  396. 0.0917123705057891
  397. 0.0835801554979637
  398. 0.087103308575287
  399. 0.0881922062701436
  400. 0.0911936982427792
  401. 0.0771794871794872
  402. 0.0469823100936524
  403. 0.0930735930735931
  404. 0.113785282258065
  405. 0.0839609483960948
  406. 0.0885902089669381
  407. 0.049242011124441
  408. 0.0835956304388076
  409. 0.0775573305849008
  410. 0.0751685673853326
  411. 0.10219556360344
  412. 0.123326959847036
  413. 0.123529411764706
  414. 0.0399363141833621
  415. 0.127183098591549
  416. 0.10985401459854
  417. 0.127111486486486
  418. 0.0919177524429967
  419. 0.0990783410138249
  420. 0.117885117493473
  421. 0.0699295283822504
  422. 0.102056962025316
  423. 0.10985401459854
  424. 0.127111486486486
  425. 0.09596174282678
  426. 0.105936180197091
  427. 0.0721130809774796
  428. 0.0882266731802638
  429. 0.107602478551001
  430. 0.095434369055168
  431. 0.0776373484653082
  432. 0.0930352359365341
  433. 0.11134401972873
  434. 0.105490654205607
  435. 0.090155750798722
  436. 0.109934258582907
  437. 0.123326959847036
  438. 0.0616929698708752
  439. 0.065744448489261
  440. 0.127183098591549
  441. 0.0839921867733234
  442. 0.105515307314793
  443. 0.11139896373057
  444. 0.0701577189029601
  445. 0.0982375979112272
  446. 0.0959005947323704
  447. 0.0971699128376197
  448. 0.0974951414381343
  449. 0.127111486486486
  450. 0.0775706554419723
  451. 0.0911936982427792
  452. 0.0963097269624573
  453. 0.119160728424386
  454. 0.123326959847036
  455. 0.0469627626378198
  456. 0.0678539224526601
  457. 0.109880749574106
  458. 0.0990131578947368
  459. 0.127183098591549
  460. 0.101769412825425
  461. 0.123647815966041
  462. 0.100848782666964
  463. 0.0888604605392639
  464. 0.0784262636789995
  465. 0.0916286149162862
  466. 0.0917682926829268
  467. 0.125277469478357
  468. 0.111993054694283
  469. 0.100927685257628
  470. 0.123326959847036
  471. 0.127111486486486
  472. 0.123495623632385
  473. 0.0917123705057891
  474. 0.0928630193336076
  475. 0.123326959847036
  476. 0.123326959847036
  477. 0.0678539224526601
  478. 0.0843452269755277
  479. 0.0926629040533607
  480. 0.0630322490576574
  481. 0.113456464379947
  482. 0.0847728126173489
  483. 0.0618874648756082
  484. 0.091350531107739
  485. 0.0837429286840397
  486. 0.077583984878426
  487. 0.0649500107890383
  488. 0.077087246030391
  489. 0.112846788302924
  490. 0.0696544276457883
  491. 0.0917682926829268
  492. 0.127758913412564
  493. 0.103864734299517
  494. 0.0929777594728171
  495. 0.123394370046461
  496. 0.113044566850275
  497. 0.0583672677913516
  498. 0.0836188535975553
  499. 0.110216038081289
  500. 0.0448963357032765
  501. 0.0992744063324538
  502. 0.0782563480370916
  503. 0.101437879128286
  504. 0.0684921116504854
  505. 0.0672575599582899
  506. 0.0672575599582899
  507. 0.105490654205607
  508. 0.0917496443812233
  509. 0.0782766990291262
  510. 0.0533624867036993
  511. 0.113527784762384
  512. 0.105441382531527
  513. 0.0750873108265425
  514. 0.0917123705057891
  515. 0.0836111111111111
  516. 0.0637531770686247
  517. 0.0680892776353491
  518. 0.100646455639768
  519. 0.123326959847036
  520. 0.109934258582907
  521. 0.123495623632385
  522. 0.0448896400874925
  523. 0.112973852120606
  524. 0.08417225950783
  525. 0.0523356902747189
  526. 0.0440294504851529
  527. 0.127111486486486
  528. 0.0720095693779904
  529. 0.0694348327566321
  530. 0.0775506698728959
  531. 0.112048641270629
  532. 0.071293225959261
  533. 0.0448762548454428
  534. 0.060457953936797
  535. 0.108040201005025
  536. 0.0718491406747295
  537. 0.123326959847036
  538. 0.112846788302924
  539. 0.0974951414381343
  540. 0.11098820058997
  541. 0.0975161987041037
  542. 0.0992853216052776
  543. 0.109987819732034
  544. 0.0847728126173489
  545. 0.123326959847036
  546. 0.110108523350811
  547. 0.0771531100478469
  548. 0.0783310201249133
  549. 0.117823590814196
  550. 0.0847728126173489
  551. 0.105539971949509
  552. 0.0744496660895375
  553. 0.125242718446602
  554. 0.09108331652209
  555. 0.0847728126173489
  556. 0.0836963574010566
  557. 0.101460674157303
  558. 0.0632087358252835
  559. 0.0542212081181698
  560. 0.100770003347841
  561. 0.0835956304388076
  562. 0.092786683107275
  563. 0.0727287371134021
  564. 0.084996234939759
  565. 0.0638252756573367
  566. 0.0840625581828337
  567. 0.123597043525869
  568. 0.125329632199861
  569. 0.0776240006876988
  570. 0.0841330476101742
  571. 0.077630674002751
  572. 0.110054844606947
  573. 0.0384042869901756
  574. 0.0840782122905028
  575. 0.127111486486486
  576. 0.123326959847036
  577. 0.0673428294429115
  578. 0.0777442961687473
  579. 0.0928248355263158
  580. 0.0517122895430077
  581. 0.0638252756573367
  582. 0.0696275734443673
  583. 0.104164263467528
  584. 0.101437879128286
  585. 0.111965282083075
  586. 0.068752855185016
  587. 0.0544303797468354
  588. 0.0917123705057891
  589. 0.0917496443812233
  590. 0.0748321869561614
  591. 0.123326959847036
  592. 0.080625
  593. 0.109827292629531
  594. 0.111854329245634
  595. 0.109880749574106
  596. 0.101540537501406
  597. 0.123394370046461
  598. 0.0677013045434098
  599. 0.0694348327566321
  600. 0.0562616822429907
  601. 0.110014619883041
  602. 0.114101592115239
  603. 0.0684921116504854
  604. 0.091591439294046
  605. 0.0807764558547276
  606. 0.123326959847036
  607. 0.0645368782161235
  608. 0.0643437366395896
  609. 0.0811174991016888
  610. 0.123360655737705
  611. 0.112875
  612. 0.0523356902747189
  613. 0.0574427480916031
  614. 0.0886510897310033
  615. 0.0814393939393939
  616. 0.0772785622593068
  617. 0.0993399339933993
  618. 0.114101592115239
  619. 0.125242718446602
  620. 0.127183098591549
  621. 0.0827832783278328
  622. 0.0914708265802269
  623. 0.114101592115239
  624. 0.0673026757099203
  625. 0.0721534159009189
  626. 0.0842507930584064
  627. 0.127111486486486
  628. 0.111426456071076
  629. 0.0807764558547276
  630. 0.102450646698434
  631. 0.0573260538344337
  632. 0.123461853978671
  633. 0.0692962934540711
  634. 0.111674499134306
  635. 0.0835956304388076
  636. 0.0993508636813731
  637. 0.123461853978671
  638. 0.0448807157057654
  639. 0.099110964767863
  640. 0.099110964767863
  641. 0.0903722978382706
  642. 0.123326959847036
  643. 0.127111486486486
  644. 0.0841017043867002
  645. 0.114130434782609
  646. 0.0975372650680493
  647. 0.127111486486486
  648. 0.109827292629531
  649. 0.0921898928024502
  650. 0.123326959847036
  651. 0.0991653854601362
  652. 0.0691371257943496
  653. 0.0829277252272936
  654. 0.123326959847036
  655. 0.095474730386974
  656. 0.112818590704648
  657. 0.112903225806452
  658. 0.0720612880057458
  659. 0.123580128643766
  660. 0.0829277252272936
  661. 0.0635557432432432
  662. 0.0678641214489704
  663. 0.0448762548454428
  664. 0.0811102128806252
  665. 0.108716590416566
  666. 0.0720440402106271
  667. 0.0829048843187661
  668. 0.0903903903903904
  669. 0.0902458524885069
  670. 0.0429549995243079
  671. 0.0777309115950762
  672. 0.123326959847036
  673. 0.0929012345679012
  674. 0.0841879545030766
  675. 0.101472075514103
  676. 0.112917344004001
  677. 0.0848843767625494
  678. 0.127111486486486
  679. 0.123326959847036
  680. 0.0764735772357724
  681. 0.0847728126173489
  682. 0.0722284434490481
  683. 0.109961032635168
  684. 0.10066889632107
  685. 0.102265005662514
  686. 0.127111486486486
  687. 0.0532680509674375
  688. 0.0649313295462717
  689. 0.0783310201249133
  690. 0.087874659400545
  691. 0.0469554365347616
  692. 0.0776573787409701
  693. 0.127147282455646
  694. 0.0911568746214415
  695. 0.111993054694283
  696. 0.0789611752360965
  697. 0.127183098591549
  698. 0.127111486486486
  699. 0.114101592115239
  700. 0.123326959847036
  701. 0.0783310201249133
  702. 0.0694348327566321
  703. 0.0903361344537815
  704. 0.0926914391295422
  705. 0.0412046543463381
  706. 0.064940668824164
  707. 0.123360655737705
  708. 0.114101592115239
  709. 0.0972012917115178
  710. 0.0911568746214415
  711. 0.0573187761838263
  712. 0.0776106574989257
  713. 0.0917682926829268
  714. 0.0783446121811557
  715. 0.127218934911243
  716. 0.127147282455646
  717. 0.11002802485683
  718. 0.0638252756573367
  719. 0.0783310201249133
  720. 0.123326959847036
  721. 0.100725041829336
  722. 0.127111486486486
  723. 0.109934258582907
  724. 0.068130375735627
  725. 0.112201789264414
  726. 0.0836265975180589
  727. 0.0771794871794872
  728. 0.110054844606947
  729. 0.0840625581828337
  730. 0.123326959847036
  731. 0.0972012917115178
  732. 0.111674499134306
  733. 0.0448584202682563
  734. 0.0429733974206444
  735. 0.127111486486486
  736. 0.114101592115239
  737. 0.0826468973091708
  738. 0.127111486486486
  739. 0.0890356931571682
  740. 0.112875
  741. 0.075043630017452
  742. 0.0730228044638525
  743. 0.114101592115239
  744. 0.101437879128286
  745. 0.127183098591549
  746. 0.0992962392786453
  747. 0.109827292629531
  748. 0.0850122387497646
  749. 0.0801882603676405
  750. 0.127111486486486
  751. 0.0807909099042677
  752. 0.0747578441924
  753. 0.111965282083075
  754. 0.127111486486486
  755. 0.0818231243204059
  756. 0.0668097070139094
  757. 0.127147282455646
  758. 0.112818590704648
  759. 0.076344267839026
  760. 0.114130434782609
  761. 0.127111486486486
  762. 0.112818590704648
  763. 0.0617140513942045
  764. 0.065768390386016
  765. 0.127111486486486
  766. 0.0415918198148404
  767. 0.0429713524317122
  768. 0.0722284434490481
  769. 0.0992853216052776
  770. 0.075678846798525
  771. 0.119444444444444
  772. 0.0850682995760716
  773. 0.0810810810810811
  774. 0.111965282083075
  775. 0.076570847112694
  776. 0.114130434782609
  777. 0.0842350746268657
  778. 0.070381917381138
  779. 0.127147282455646
  780. 0.125242718446602
  781. 0.100646455639768
  782. 0.0783310201249133
  783. 0.0850122387497646
  784. 0.100590397682968
  785. 0.123495623632385
  786. 0.0924636493958632
  787. 0.0917496443812233
  788. 0.141869599371563
  789. 0.0672876304023845
  790. 0.112818590704648
  791. 0.127147282455646
  792. 0.127111486486486
  793. 0.127111486486486
  794. 0.114101592115239
  795. 0.127111486486486
  796. 0.114101592115239
  797. 0.114101592115239
  798. 0.0921052631578947
  799. 0.101964769647696
  800. 0.0881491604841859
  801. 0.123326959847036
  802. 0.0491722936179482
  803. 0.0850362557679631
  804. 0.0957988542329726
  805. 0.123326959847036
  806. 0.085052274653857
  807. 0.0746774727092292
  808. 0.111965282083075
  809. 0.102010845006778
  810. 0.111895910780669
  811. 0.123360655737705
  812. 0.0783990276089599
  813. 0.0925868963395878
  814. 0.0925868963395878
  815. 0.0783990276089599
  816. 0.109827292629531
  817. 0.0783310201249133
  818. 0.123360655737705
  819. 0.127111486486486
  820. 0.0888867014469928
  821. 0.0888867014469928
  822. 0.0991436100131752
  823. 0.0902278177458034
  824. 0.112875
  825. 0.127183098591549
  826. 0.101437879128286
  827. 0.107615302109403
  828. 0.100288760550866
  829. 0.145598194130926
  830. 0.0745972738537794
  831. 0.078768318213538
  832. 0.0991000877963126
  833. 0.0871705763104547
  834. 0.0778448275862069
  835. 0.0764735772357724
  836. 0.046050283033301
  837. 0.102497162315551
  838. 0.100333333333333
  839. 0.0460549803641557
  840. 0.0841330476101742
  841. 0.0871705763104547
  842. 0.0812708127081271
  843. 0.090065828845003
  844. 0.100961538461538
  845. 0.0836265975180589
  846. 0.064940668824164
  847. 0.0506990062321038
  848. 0.0703435382098621
  849. 0.0680687471732248
  850. 0.111895910780669
  851. 0.0721361239814667
  852. 0.0806970509383378
  853. 0.0845663982019105
  854. 0.0594039865798303
  855. 0.0849802371541502
  856. 0.08417225950783
  857. 0.0727873609543769
  858. 0.0552192258301229
  859. 0.10985401459854
  860. 0.108014354066986
  861. 0.07426597582038
  862. 0.102590320381731
  863. 0.043386345072791
  864. 0.0531270224157204
  865. 0.100277623542476
  866. 0.0782156777825899
  867. 0.071621192893401
  868. 0.0750873108265425
  869. 0.0991000877963126
  870. 0.101437879128286
  871. 0.0672425348127187
  872. 0.0716666666666667
  873. 0.0672675804529201
  874. 0.0771531100478469
  875. 0.0616929698708752
  876. 0.0954545454545455
  877. 0.0772785622593068
  878. 0.0715871254162042
  879. 0.117059891107078
  880. 0.101574803149606
  881. 0.11020258725897
  882. 0.0725825898239691
  883. 0.0735222276502198
  884. 0.0840625581828337
  885. 0.0726117722740431
  886. 0.0849163061876998
  887. 0.0783446121811557
  888. 0.0775639924411613
  889. 0.0990131578947368
  890. 0.0607998922704013
  891. 0.109987819732034
  892. 0.0904175428056473
  893. 0.0672225117248567
  894. 0.0726585130350821
  895. 0.0991327258755077
  896. 0.100893854748603
  897. 0.101437879128286
  898. 0.0698105914186316
  899. 0.112875
  900. 0.102450646698434
  901. 0.102450646698434
  902. 0.112818590704648
  903. 0.109827292629531
  904. 0.0827681026581118
$centralization
0.107444307026948
$theoretical_max
451.249861495845
In [25]:
# Betweenness is the number of shortest paths between two nodes that go through each node of interest. Betweenness
# calculates vertex betweenness, edge_betweenness calculates edge betweenness. Vertix 2501 has a high betweenness 298 
# which indicates that it has a considerable influence within a network due to its control over information passing 
# between others. Its removal from the network may disrupt communications between other vertices because it lies on the 
# largest number of paths. Its centralization function also returns centralization score of 0.0003616307 and theoretical 
# max of 735498918.
betweenness<-betweenness(newgraph, directed=T, weights=NA)
edge_betweenness(newgraph,directed = T, weights=NA)
  1. 16
  2. 2
  3. 3
  4. 2
  5. 1
  6. 2
  7. 42
  8. 6
  9. 27
  10. 1
  11. 1
  12. 1
  13. 1
  14. 2
  15. 2
  16. 4
  17. 15
  18. 5
  19. 5
  20. 32
  21. 2
  22. 3
  23. 6
  24. 12
  25. 1
  26. 3
  27. 2
  28. 1
  29. 3
  30. 3
  31. 6
  32. 20
  33. 15
  34. 16
  35. 18
  36. 15
  37. 6
  38. 24
  39. 16
  40. 2
  41. 10
  42. 2
  43. 20
  44. 2
  45. 300
  46. 48
  47. 23
  48. 2
  49. 6
  50. 6
  51. 10
  52. 2
  53. 5
  54. 1
  55. 8
  56. 1
  57. 10
  58. 3
  59. 2
  60. 1
  61. 1
  62. 1
  63. 151
  64. 2
  65. 1
  66. 2
  67. 12
  68. 7
  69. 2
  70. 14
  71. 1
  72. 4
  73. 2
  74. 2.5
  75. 2.5
  76. 2
  77. 1
  78. 16
  79. 2
  80. 9
  81. 3
  82. 3
  83. 3
  84. 21
  85. 7
  86. 2
  87. 263
  88. 2
  89. 7
  90. 10
  91. 6
  92. 17
  93. 15
  94. 2
  95. 6
  96. 8
  97. 10
  98. 3
  99. 7
  100. 2
  101. 10
  102. 3
  103. 1
  104. 5
  105. 1
  106. 8
  107. 1
  108. 4
  109. 6
  110. 1
  111. 12
  112. 6
  113. 2
  114. 4
  115. 5
  116. 6
  117. 4
  118. 1
  119. 1
  120. 2
  121. 1
  122. 1
  123. 1
  124. 9
  125. 21
  126. 8
  127. 6
  128. 2
  129. 2
  130. 1
  131. 25
  132. 1
  133. 24
  134. 1.5
  135. 2
  136. 2
  137. 1.5
  138. 1.5
  139. 8
  140. 12
  141. 9
  142. 2
  143. 31
  144. 9
  145. 30
  146. 10
  147. 24
  148. 15
  149. 14
  150. 2
  151. 1
  152. 3
  153. 5
  154. 10
  155. 16
  156. 1
  157. 15
  158. 7
  159. 7
  160. 2
  161. 7
  162. 2
  163. 18
  164. 2
  165. 1
  166. 4
  167. 3
  168. 2
  169. 2
  170. 1
  171. 10
  172. 7
  173. 7
  174. 2
  175. 1
  176. 8
  177. 4
  178. 6
  179. 6
  180. 8
  181. 3
  182. 4
  183. 14
  184. 15
  185. 12
  186. 1
  187. 1
  188. 1
  189. 2
  190. 3
  191. 4
  192. 1
  193. 2
  194. 7
  195. 1
  196. 42
  197. 2
  198. 1
  199. 42
  200. 7
  201. 4
  202. 4
  203. 1
  204. 1
  205. 8
  206. 9
  207. 1
  208. 4
  209. 4
  210. 4
  211. 4
  212. 1
  213. 1
  214. 3
  215. 4
  216. 3
  217. 4
  218. 3
  219. 6
  220. 3
  221. 1
  222. 2
  223. 2
  224. 2
  225. 3
  226. 3
  227. 1
  228. 12
  229. 40
  230. 10
  231. 4
  232. 1
  233. 1
  234. 2
  235. 2
  236. 1
  237. 10
  238. 5
  239. 2
  240. 30
  241. 6
  242. 4
  243. 1
  244. 2
  245. 3
  246. 1
  247. 2
  248. 1
  249. 1
  250. 4
  251. 1
  252. 1
  253. 2
  254. 2
  255. 2
  256. 2
  257. 2
  258. 2
  259. 2
  260. 6
  261. 3
  262. 5
  263. 1
  264. 6
  265. 4
  266. 2
  267. 3
  268. 3
  269. 5
  270. 1
  271. 3
  272. 1
  273. 2
  274. 1
  275. 12
  276. 24
  277. 16
  278. 20
  279. 8
  280. 2
  281. 3
  282. 2
  283. 3
  284. 3
  285. 12
  286. 6
  287. 5
  288. 13
  289. 2
  290. 2
  291. 2
  292. 1
  293. 7
  294. 2
  295. 6
  296. 4
  297. 4
  298. 10
  299. 10
  300. 1
  301. 3
  302. 2
  303. 2
  304. 2
  305. 5
  306. 10
  307. 11
  308. 5
  309. 5
  310. 2
  311. 12
  312. 1
  313. 2
  314. 1
  315. 4
  316. 1
  317. 4
  318. 2
  319. 2
  320. 3
  321. 24
  322. 1
  323. 4
  324. 2
  325. 4
  326. 2
  327. 1
  328. 7
  329. 12
  330. 6
  331. 14
  332. 1.5
  333. 6.5
  334. 8
  335. 3
  336. 4
  337. 2
  338. 4
  339. 4
  340. 1
  341. 2
  342. 3
  343. 12
  344. 2
  345. 1
  346. 1
  347. 4
  348. 10
  349. 10
  350. 1
  351. 3
  352. 1.5
  353. 1.5
  354. 3
  355. 1
  356. 1
  357. 1.5
  358. 12
  359. 4
  360. 6
  361. 3
  362. 2
  363. 2
  364. 1
  365. 8
  366. 2
  367. 3
  368. 1
  369. 1
  370. 9
  371. 2
  372. 1
  373. 2
  374. 1
  375. 2
  376. 18
  377. 1
  378. 2
  379. 2
  380. 2
  381. 3
  382. 10
  383. 4
  384. 1
  385. 4
  386. 2
  387. 5
  388. 6
  389. 3
  390. 2
  391. 9
  392. 9
  393. 2
  394. 2
  395. 4
  396. 2
  397. 3
  398. 16
  399. 6
  400. 1
  401. 4
  402. 1
  403. 27
  404. 27
  405. 18
  406. 5
  407. 7
  408. 3
  409. 4
  410. 3
  411. 2
  412. 2
  413. 72
  414. 35
  415. 2
  416. 2
  417. 6
  418. 12
  419. 4
  420. 1
  421. 6
  422. 32
  423. 32
  424. 7
  425. 1
  426. 1
  427. 1
  428. 1
  429. 8
  430. 1
  431. 2
  432. 3
  433. 7
  434. 4
  435. 3
  436. 3
  437. 6
  438. 2
  439. 1
  440. 4
  441. 3
  442. 2
  443. 12
  444. 4
  445. 8
  446. 6
  447. 5
  448. 1
  449. 1
  450. 1
  451. 3
  452. 2
  453. 1
  454. 3
  455. 2
  456. 2
  457. 10
  458. 15
  459. 2
  460. 3
  461. 1
  462. 2
  463. 3
  464. 12
  465. 3
  466. 1
  467. 5
  468. 2
  469. 2
  470. 2
  471. 12
  472. 7
  473. 10
  474. 1
  475. 1
  476. 2
  477. 4
  478. 2
  479. 8
  480. 5
  481. 8
  482. 12
  483. 4
  484. 2
  485. 4
  486. 1
  487. 3
  488. 1
  489. 3
  490. 1
  491. 1
  492. 1.5
  493. 4
  494. 2
  495. 1
  496. 5
  497. 4
  498. 1
  499. 1
  500. 24
  501. 10
  502. 7
  503. 7
  504. 4
  505. 4
  506. 4
  507. 2
  508. 1
  509. 8
  510. 3
  511. 5
  512. 4
  513. 3
  514. 2
  515. 2
  516. 1
  517. 1
  518. 2
  519. 3
  520. 2
  521. 1
  522. 2
  523. 10
  524. 10
  525. 4
  526. 4
  527. 1
  528. 10
  529. 10
  530. 10
  531. 6
  532. 2
  533. 1
  534. 2
  535. 3
  536. 1
  537. 1
  538. 1
  539. 1
  540. 3
  541. 1
  542. 12
  543. 25
  544. 5
  545. 3
  546. 4
  547. 1
  548. 2
  549. 3
  550. 3
  551. 2
  552. 5
  553. 1
  554. 3
  555. 2
  556. 1
  557. 4
  558. 2
  559. 3
  560. 4
  561. 1
  562. 5
  563. 15
  564. 1
  565. 18
  566. 5
  567. 2
  568. 3
  569. 3
  570. 6
  571. 1
  572. 3
  573. 1
  574. 2
  575. 2
  576. 2
  577. 1
  578. 1
  579. 1
  580. 10
  581. 10
  582. 24
  583. 4
  584. 1.5
  585. 6
  586. 1.5
  587. 10
  588. 5
  589. 2
  590. 15.5
  591. 6
  592. 2
  593. 1
  594. 16
  595. 1
  596. 3
  597. 4
  598. 12
  599. 2
  600. 1
  601. 3
  602. 5
  603. 1
  604. 14
  605. 1
  606. 12
  607. 2
  608. 2
  609. 2
  610. 63
  611. 12
  612. 5
  613. 1
  614. 2
  615. 4
  616. 9
  617. 5
  618. 8
  619. 4
  620. 4
  621. 1
  622. 2
  623. 5
  624. 2
  625. 3
  626. 2
  627. 7
  628. 12
  629. 3
  630. 4
  631. 3
  632. 2
  633. 2
  634. 1
  635. 3
  636. 12
  637. 1
  638. 3
  639. 1
  640. 6
  641. 6
  642. 1
  643. 1
  644. 1
  645. 2
  646. 1
  647. 1
  648. 1
  649. 1
  650. 2
  651. 1
  652. 6
  653. 15
  654. 4
  655. 6
  656. 2
  657. 1
  658. 1
  659. 10
  660. 6
  661. 2
  662. 1
  663. 4
  664. 28
  665. 5
  666. 1
  667. 2
  668. 1
  669. 2
  670. 2
  671. 2
  672. 4
  673. 4
  674. 4
  675. 1
  676. 10
  677. 6
  678. 4
  679. 1
  680. 16
  681. 1
  682. 8
  683. 4
  684. 4
  685. 1
  686. 3
  687. 3
  688. 15
  689. 1
  690. 6
  691. 3
  692. 3
  693. 4
  694. 4
  695. 3
  696. 3
  697. 6
  698. 2
  699. 48
  700. 1
  701. 2
  702. 2.5
  703. 1.5
  704. 4
  705. 2
  706. 1
  707. 2
  708. 2
  709. 1
  710. 6
  711. 16
  712. 4
  713. 1
  714. 6
  715. 1
  716. 12
  717. 2
  718. 1
  719. 3
  720. 3
  721. 3
  722. 20
  723. 3
  724. 11
  725. 16
  726. 1
  727. 2
  728. 1
  729. 3
  730. 1
  731. 1
  732. 1
  733. 1
  734. 1
  735. 3
  736. 1
  737. 1
  738. 3
  739. 2
  740. 1
  741. 10
  742. 3
  743. 2
  744. 2
  745. 1
  746. 2
  747. 3
  748. 4
  749. 1
  750. 1
  751. 4
  752. 8
  753. 24
  754. 6
  755. 4.5
  756. 1
  757. 6
  758. 3
  759. 3
  760. 1
  761. 1
  762. 1
  763. 1
  764. 1
  765. 17
  766. 1.5
  767. 1
  768. 10
  769. 4
  770. 5
  771. 5
  772. 1
  773. 1
  774. 2
  775. 4
  776. 2
  777. 1
  778. 6
  779. 2
  780. 6
  781. 5
  782. 1
  783. 1
  784. 3
  785. 4
  786. 2.5
  787. 6.5
  788. 3
  789. 1
  790. 2
  791. 3
  792. 10
  793. 1
  794. 6
  795. 1
  796. 2
  797. 8
  798. 3
  799. 3
  800. 3
  801. 2
  802. 1
  803. 2
  804. 6
  805. 4
  806. 4
  807. 1
  808. 3
  809. 5
  810. 3
  811. 3
  812. 4
  813. 1
  814. 3
  815. 1
  816. 1
  817. 4
  818. 15
  819. 6
  820. 2
  821. 8
  822. 1
  823. 5
  824. 1
  825. 3
  826. 9
  827. 1
  828. 4
  829. 2
  830. 6
  831. 3
  832. 15
  833. 7
  834. 20
  835. 6
  836. 3
  837. 9
  838. 6
  839. 3
  840. 5
  841. 6
  842. 4
  843. 4
  844. 12
  845. 6
  846. 1
  847. 2
  848. 16
  849. 4
  850. 2
  851. 5
  852. 5
  853. 5
  854. 2
  855. 8
  856. 1
  857. 8
  858. 2
  859. 1
  860. 1.5
  861. 4
  862. 20
  863. 6
  864. 3
  865. 1
  866. 1
  867. 1
  868. 8
  869. 4
  870. 4
  871. 4
  872. 3
  873. 8
  874. 3
  875. 8
  876. 1
  877. 4
  878. 1
  879. 7
  880. 4
  881. 4
  882. 4
  883. 1
  884. 5
  885. 5
  886. 3
  887. 4
  888. 3
  889. 2
  890. 1
  891. 3
  892. 8
  893. 2
  894. 3
  895. 7
  896. 12
  897. 15
  898. 2
  899. 4
  900. 1
  901. 2
  902. 2
  903. 8
  904. 4
  905. 2
  906. 4
  907. 1
  908. 4
  909. 3
  910. 4
  911. 1
  912. 7
  913. 1
  914. 9.5
  915. 10
  916. 1
  917. 1
  918. 1
  919. 2
  920. 4
  921. 1
  922. 3
  923. 2
  924. 6
  925. 1
  926. 3
  927. 1
  928. 5
  929. 5
  930. 4
  931. 18
  932. 4
  933. 1
  934. 1
  935. 4
  936. 6
  937. 2
  938. 1
  939. 6
  940. 2
  941. 1
  942. 6.5
  943. 7
  944. 4
  945. 1
  946. 2
  947. 2
  948. 5
  949. 8
  950. 3
  951. 6
  952. 4
  953. 6
  954. 1
  955. 14
  956. 6
  957. 2
  958. 4
  959. 4
  960. 7
  961. 6
  962. 1
  963. 4
  964. 6
  965. 4
  966. 15
  967. 1
  968. 4
  969. 2
  970. 3
  971. 1
  972. 5
  973. 1
  974. 1
  975. 2
  976. 3
  977. 2
  978. 1
  979. 3
  980. 2
  981. 1
  982. 7
  983. 2.5
  984. 2.5
  985. 4
  986. 1
  987. 2
  988. 1
  989. 10
  990. 1
  991. 3
  992. 1
  993. 2
  994. 2
  995. 1
  996. 3
  997. 4
  998. 1
  999. 2
  1000. 1.5
  1001. 2
  1002. 28
  1003. 3
  1004. 6
  1005. 2.5
  1006. 1.5
  1007. 8
  1008. 1
  1009. 3
  1010. 5
  1011. 1
  1012. 1
  1013. 5
  1014. 4
  1015. 1
  1016. 1
  1017. 1
  1018. 1
  1019. 1
  1020. 4
  1021. 1
  1022. 2
  1023. 6
  1024. 3
  1025. 3
  1026. 1
  1027. 4
  1028. 6
  1029. 1
  1030. 5
  1031. 2
  1032. 3
  1033. 3
  1034. 1
  1035. 4
  1036. 1
  1037. 3
  1038. 5
  1039. 3
  1040. 4
  1041. 5
  1042. 3
  1043. 5
  1044. 10
  1045. 1
  1046. 3
  1047. 1
  1048. 2
  1049. 1
  1050. 4
  1051. 3
  1052. 2
  1053. 2
  1054. 5
  1055. 1
  1056. 1
  1057. 3
  1058. 1
  1059. 1
  1060. 1
  1061. 2
  1062. 5
  1063. 1
  1064. 1
  1065. 1
  1066. 16
  1067. 1
  1068. 9
  1069. 5
  1070. 1
  1071. 3
  1072. 4
  1073. 1
  1074. 1
  1075. 2
  1076. 2
  1077. 2
  1078. 3
  1079. 1
  1080. 1
  1081. 2
  1082. 3
  1083. 1
  1084. 4
  1085. 1
  1086. 2
  1087. 1
  1088. 2.5
  1089. 2.5
  1090. 1
  1091. 7
  1092. 3
  1093. 2
  1094. 1
  1095. 2
  1096. 4
  1097. 5
  1098. 3
  1099. 3
  1100. 1
  1101. 2
  1102. 3
  1103. 3
  1104. 1
  1105. 1
  1106. 2
  1107. 1
  1108. 1
  1109. 2
  1110. 7
  1111. 4
  1112. 1
  1113. 2
  1114. 1
  1115. 1
  1116. 2
  1117. 2
  1118. 4
  1119. 1
  1120. 2
  1121. 1
  1122. 2
  1123. 1
  1124. 1
  1125. 3
  1126. 1
  1127. 3
  1128. 3
  1129. 1
  1130. 1
  1131. 3
  1132. 2
  1133. 4
  1134. 9
  1135. 2
  1136. 3
  1137. 4
  1138. 4
  1139. 6
  1140. 4
  1141. 1
  1142. 5
  1143. 9
  1144. 2
  1145. 3
  1146. 2
  1147. 4
  1148. 1
  1149. 3
  1150. 3
  1151. 4
  1152. 1
  1153. 4
  1154. 2
  1155. 3
  1156. 1
  1157. 5
  1158. 1
  1159. 8
  1160. 1
  1161. 1
  1162. 2
  1163. 1
  1164. 2
  1165. 1
  1166. 2
  1167. 1
  1168. 2
  1169. 4
  1170. 2
  1171. 2
  1172. 3
  1173. 3
In [26]:
centr_betw(newgraph,directed = T,normalized=T)
$res
  1. 12
  2. 1
  3. 2
  4. 2
  5. 40
  6. 31
  7. 0
  8. 2
  9. 15
  10. 4
  11. 4
  12. 31
  13. 1
  14. 2
  15. 14
  16. 0
  17. 0
  18. 0
  19. 0
  20. 2
  21. 17
  22. 22
  23. 15
  24. 12
  25. 37
  26. 0
  27. 9
  28. 19
  29. 0
  30. 298
  31. 45
  32. 22
  33. 0
  34. 0
  35. 5
  36. 0
  37. 4
  38. 0
  39. 6
  40. 0
  41. 0
  42. 2
  43. 0
  44. 0
  45. 150
  46. 0
  47. 0
  48. 10
  49. 6
  50. 0
  51. 13
  52. 3
  53. 1
  54. 3
  55. 1
  56. 8
  57. 1
  58. 10
  59. 0
  60. 24
  61. 0
  62. 260
  63. 1
  64. 31
  65. 6
  66. 0
  67. 4
  68. 7
  69. 8
  70. 6
  71. 0
  72. 8
  73. 0
  74. 0
  75. 4
  76. 0
  77. 3
  78. 4
  79. 0
  80. 11
  81. 5
  82. 0
  83. 6
  84. 7
  85. 0
  86. 0
  87. 0
  88. 0
  89. 0
  90. 14
  91. 7
  92. 0
  93. 1
  94. 0
  95. 20
  96. 18
  97. 1.5
  98. 1
  99. 16
  100. 6
  101. 0
  102. 36
  103. 36
  104. 22
  105. 20
  106. 1
  107. 0
  108. 0
  109. 12
  110. 12
  111. 10
  112. 12
  113. 0
  114. 11
  115. 0
  116. 0
  117. 3
  118. 1
  119. 0
  120. 13
  121. 6
  122. 0
  123. 9
  124. 4
  125. 6
  126. 0
  127. 3
  128. 13
  129. 10
  130. 6
  131. 0
  132. 0
  133. 3
  134. 0
  135. 0
  136. 6
  137. 0
  138. 35
  139. 1
  140. 36
  141. 0
  142. 6
  143. 0
  144. 0
  145. 15
  146. 0
  147. 2
  148. 0
  149. 6
  150. 0
  151. 0
  152. 0
  153. 2
  154. 0
  155. 0
  156. 3
  157. 0
  158. 1
  159. 2
  160. 0
  161. 8
  162. 45
  163. 0
  164. 0
  165. 0
  166. 1
  167. 0
  168. 0
  169. 3
  170. 0
  171. 25
  172. 5
  173. 0
  174. 2
  175. 0
  176. 0
  177. 0
  178. 0
  179. 0
  180. 2
  181. 0
  182. 0
  183. 1
  184. 6
  185. 2
  186. 0
  187. 5
  188. 0
  189. 4
  190. 4
  191. 0
  192. 1
  193. 0
  194. 29
  195. 37
  196. 0
  197. 0
  198. 1
  199. 0
  200. 0
  201. 6
  202. 0
  203. 0
  204. 12
  205. 1
  206. 1
  207. 6
  208. 0
  209. 5
  210. 18
  211. 0
  212. 0
  213. 0
  214. 1
  215. 0
  216. 19
  217. 8
  218. 0
  219. 6
  220. 0
  221. 0
  222. 0
  223. 4
  224. 2
  225. 2
  226. 16
  227. 2
  228. 2
  229. 1
  230. 0
  231. 0
  232. 8
  233. 0
  234. 13
  235. 3
  236. 4
  237. 0
  238. 0
  239. 0
  240. 0
  241. 0
  242. 0
  243. 6
  244. 0
  245. 0
  246. 18
  247. 0
  248. 0
  249. 0.5
  250. 8
  251. 5
  252. 0
  253. 0
  254. 0
  255. 0
  256. 5
  257. 2
  258. 0
  259. 0
  260. 7
  261. 0
  262. 0
  263. 0
  264. 0
  265. 9
  266. 3
  267. 0
  268. 5
  269. 2
  270. 0
  271. 3
  272. 0
  273. 2
  274. 0
  275. 0
  276. 12
  277. 0
  278. 2
  279. 15
  280. 0
  281. 2
  282. 64
  283. 0
  284. 0
  285. 0
  286. 2
  287. 1
  288. 0
  289. 92
  290. 1
  291. 0
  292. 0
  293. 12
  294. 0
  295. 3
  296. 56
  297. 0
  298. 0
  299. 0
  300. 0
  301. 0
  302. 0
  303. 0
  304. 9
  305. 0
  306. 0
  307. 0
  308. 2
  309. 0
  310. 0
  311. 12
  312. 0
  313. 0
  314. 0
  315. 0
  316. 0
  317. 0
  318. 2
  319. 2
  320. 5
  321. 11
  322. 2
  323. 0
  324. 2
  325. 8
  326. 0
  327. 0
  328. 1
  329. 0
  330. 1
  331. 6
  332. 0
  333. 0
  334. 0
  335. 2
  336. 0
  337. 4
  338. 0
  339. 4
  340. 9
  341. 3
  342. 2
  343. 1
  344. 0.5
  345. 0
  346. 0
  347. 4
  348. 0
  349. 0
  350. 0
  351. 33
  352. 2
  353. 2
  354. 1
  355. 0
  356. 6
  357. 0
  358. 2
  359. 2
  360. 0
  361. 1
  362. 0
  363. 0
  364. 1
  365. 18
  366. 0
  367. 0
  368. 0
  369. 18
  370. 9
  371. 0
  372. 0
  373. 1
  374. 0
  375. 0
  376. 0
  377. 29
  378. 0
  379. 2
  380. 0
  381. 0
  382. 2
  383. 1
  384. 0
  385. 0
  386. 3
  387. 1
  388. 0
  389. 0
  390. 0
  391. 0
  392. 0
  393. 4
  394. 3
  395. 0
  396. 0
  397. 0
  398. 0
  399. 0
  400. 0
  401. 0
  402. 40
  403. 0.5
  404. 4.5
  405. 0
  406. 0
  407. 17.5
  408. 0
  409. 0
  410. 0
  411. 0
  412. 0
  413. 8
  414. 1
  415. 2
  416. 0
  417. 0
  418. 12
  419. 6
  420. 0
  421. 0
  422. 62
  423. 0
  424. 0
  425. 0
  426. 6
  427. 0
  428. 9
  429. 0
  430. 0
  431. 1
  432. 0
  433. 0
  434. 1
  435. 0
  436. 10
  437. 0
  438. 0
  439. 2
  440. 2
  441. 9
  442. 0
  443. 0
  444. 3
  445. 0
  446. 0
  447. 0
  448. 0
  449. 0
  450. 0
  451. 0
  452. 0
  453. 12
  454. 0
  455. 4
  456. 0
  457. 5
  458. 0
  459. 0
  460. 0
  461. 24
  462. 0
  463. 0
  464. 2
  465. 0
  466. 2
  467. 2
  468. 5
  469. 0
  470. 0
  471. 0
  472. 12
  473. 0
  474. 6
  475. 0
  476. 0
  477. 0
  478. 2
  479. 5
  480. 0
  481. 3
  482. 0
  483. 4
  484. 4
  485. 4
  486. 33
  487. 0
  488. 0
  489. 0
  490. 0
  491. 18
  492. 0
  493. 4
  494. 0
  495. 8
  496. 0
  497. 2
  498. 0
  499. 17
  500. 23
  501. 0
  502. 0
  503. 0
  504. 0
  505. 0
  506. 0
  507. 0
  508. 0
  509. 2
  510. 0
  511. 8
  512. 0
  513. 0
  514. 0
  515. 0
  516. 0
  517. 2
  518. 0
  519. 0
  520. 0
  521. 23
  522. 1.5
  523. 6
  524. 0
  525. 0
  526. 0
  527. 0
  528. 0
  529. 0.5
  530. 0
  531. 5
  532. 0
  533. 0
  534. 0
  535. 0
  536. 1
  537. 0
  538. 0
  539. 0
  540. 0
  541. 1
  542. 0
  543. 0
  544. 0
  545. 0
  546. 0
  547. 0
  548. 0
  549. 0
  550. 0
  551. 5
  552. 3
  553. 0
  554. 0
  555. 0
  556. 0
  557. 0
  558. 0
  559. 0
  560. 0
  561. 0
  562. 0
  563. 0
  564. 4
  565. 0
  566. 0
  567. 0
  568. 1
  569. 0
  570. 17
  571. 5
  572. 0
  573. 0
  574. 8
  575. 0
  576. 0
  577. 0
  578. 12
  579. 0
  580. 18
  581. 0
  582. 0
  583. 0
  584. 0
  585. 0
  586. 9
  587. 10
  588. 0
  589. 0
  590. 8
  591. 0
  592. 0
  593. 0
  594. 0
  595. 1
  596. 4
  597. 4
  598. 0
  599. 0.5
  600. 2
  601. 19
  602. 0
  603. 0
  604. 0
  605. 0
  606. 0
  607. 3
  608. 6
  609. 0
  610. 4
  611. 2
  612. 0
  613. 3
  614. 4
  615. 0
  616. 0
  617. 5
  618. 0
  619. 0
  620. 2
  621. 0
  622. 0
  623. 0
  624. 0
  625. 6
  626. 15
  627. 0
  628. 0
  629. 0
  630. 0
  631. 1
  632. 0
  633. 0
  634. 0
  635. 2
  636. 0
  637. 5.5
  638. 5
  639. 0
  640. 0
  641. 0
  642. 0
  643. 0
  644. 0
  645. 3
  646. 2
  647. 0
  648. 0
  649. 0
  650. 0
  651. 15
  652. 0
  653. 0
  654. 0
  655. 0
  656. 0
  657. 4
  658. 0
  659. 10.5
  660. 0
  661. 0
  662. 1
  663. 0
  664. 4
  665. 0
  666. 0
  667. 0
  668. 3
  669. 7
  670. 0
  671. 0
  672. 0
  673. 6
  674. 3
  675. 0
  676. 3
  677. 2
  678. 0
  679. 0
  680. 0
  681. 0
  682. 0
  683. 0
  684. 1
  685. 0
  686. 0
  687. 0
  688. 0
  689. 0
  690. 0
  691. 0
  692. 0
  693. 1
  694. 0
  695. 5
  696. 0
  697. 1
  698. 0
  699. 0
  700. 0
  701. 0
  702. 0.5
  703. 0
  704. 14
  705. 0
  706. 1
  707. 4
  708. 0
  709. 0
  710. 0
  711. 0
  712. 0
  713. 2
  714. 0
  715. 3
  716. 1
  717. 2
  718. 0
  719. 0
  720. 0
  721. 0
  722. 0
  723. 0
  724. 0
  725. 0
  726. 2
  727. 0
  728. 0
  729. 0
  730. 0
  731. 0
  732. 0
  733. 0
  734. 5
  735. 0
  736. 0
  737. 1
  738. 0
  739. 2
  740. 1
  741. 0
  742. 0
  743. 0
  744. 0
  745. 0
  746. 1
  747. 0
  748. 0
  749. 0
  750. 0
  751. 8
  752. 0
  753. 0
  754. 0
  755. 2
  756. 0
  757. 1
  758. 0
  759. 0
  760. 0
  761. 0
  762. 0
  763. 0
  764. 2
  765. 0
  766. 0
  767. 0
  768. 0
  769. 0
  770. 2
  771. 0
  772. 0
  773. 0
  774. 0
  775. 0
  776. 0
  777. 0
  778. 2
  779. 0
  780. 0
  781. 0
  782. 0
  783. 0
  784. 0
  785. 0
  786. 0
  787. 0
  788. 0
  789. 0
  790. 0
  791. 1
  792. 0
  793. 0
  794. 0
  795. 0
  796. 0
  797. 0
  798. 0
  799. 0
  800. 0
  801. 0
  802. 0
  803. 0
  804. 0
  805. 0
  806. 6
  807. 0
  808. 0
  809. 6
  810. 0
  811. 0
  812. 2
  813. 0
  814. 1
  815. 0
  816. 0
  817. 0
  818. 4
  819. 0
  820. 0
  821. 0
  822. 0
  823. 1
  824. 3
  825. 2
  826. 0
  827. 0
  828. 0
  829. 0
  830. 0
  831. 0
  832. 0
  833. 0
  834. 0
  835. 0
  836. 0
  837. 0
  838. 0
  839. 0
  840. 0
  841. 0
  842. 0
  843. 0
  844. 0
  845. 0
  846. 0
  847. 0
  848. 0
  849. 0
  850. 0
  851. 0
  852. 0
  853. 0
  854. 0
  855. 0
  856. 0
  857. 0
  858. 0
  859. 0
  860. 0
  861. 0
  862. 0
  863. 0
  864. 0
  865. 0
  866. 0
  867. 0
  868. 0
  869. 0
  870. 0
  871. 0
  872. 0
  873. 0
  874. 0
  875. 0
  876. 0
  877. 0
  878. 0
  879. 0
  880. 0
  881. 0
  882. 0
  883. 0
  884. 0
  885. 0
  886. 0
  887. 0
  888. 0
  889. 0
  890. 0
  891. 0
  892. 0
  893. 0
  894. 0
  895. 0
  896. 0
  897. 0
  898. 0
  899. 0
  900. 0
  901. 0
  902. 0
  903. 0
  904. 0
$centralization
0.000361630715546478
$theoretical_max
735498918
In [27]:
# Hubs refer to max outgoing links whereas Authorities refer to max incoming links. 
# Hubs are pages that are not necessarily relevant to the query string, they are pages good at pointing at things that 
# maybe relevant. Given a query to a search engine: Root is set of highly relevant web pages(e.g. pages that contain the
# query string), i.e., the potential authorities. Potential hubs, on the other hand , are all the pages that link to a 
# page in root.
hub<-hub.score(newgraph)$vector
auth<-authority.score(newgraph)$vector
plot(newgraph,
     vertex.size=hub*5,
     main = 'Hubs',
     vertex.color.hub = "skyblue",
     vertex.label=NA,
     edge.arrow.size=0.00001,
     layout = layout.kamada.kawai)
In [28]:
plot(newgraph,
     vertex.size=auth*10,
     main = 'Authorities',
     vertex.color.auth = "skyblue",
     vertex.label=NA,
     edge.arrow.size=0.00001,
     layout = layout.kamada.kawai)

Creating a group of variables containing the information of neighbors that "point to" focal products. The variables include:

a. Neighbors' mean rating (nghb_mn_rating)

b. Neighbors' mean salesrank (nghb_mn_salesrank)

c. Neighbors' mean number of reviews (nghb_mn_review_cnt)

In [30]:
sub_all1 <-as_ids(sub_all)
Book$id <- as.character(Book$id)
filtered <- Book[Book$id %in% sub_all1,]
copurchase$Target <- as.character(copurchase$Target)
In [31]:
mean_values <- inner_join(copurchase, filtered, by = c("Target"="id")) %>%
  group_by(Target) %>%
  summarise(nghb_mn_rating = mean(rating),
            nghb_mn_salesrank = mean(salesrank),
            nghb_mn_review_cnt = mean(review_cnt))
In [34]:
in_degree1 <- as.data.frame(deg2)
in_degree1 <- cbind(id = rownames(in_degree1), in_degree1)
out_degree1 <- as.data.frame(deg3)
out_degree1 <- cbind(id = rownames(out_degree1), out_degree1)

closeness1 <- as.data.frame(closeness)
closeness1 <- cbind(id = rownames(closeness1), closeness1)
betweenness1 <- as.data.frame(betweenness)
betweenness1 <- cbind(id = rownames(betweenness1), betweenness1)

hub_score2 <- as.data.frame(hub)
hub_score2 <- cbind(id = rownames(hub_score2), hub_score2)
authority_score2 <- as.data.frame(auth)
authority_score2 <- cbind(id = rownames(authority_score2), authority_score2)

Poisson Regression

In [35]:
# Fitting a Poisson regression to predict salesrank of all the books in this subcomponent using products' own information 
# and their neighbor's information. 
newdf1 <- sqldf("SELECT hub_score2.id,hub, betweenness, auth, closeness, deg2, deg3 
                      FROM hub_score2, betweenness1, authority_score2, closeness1, in_degree1, out_degree1
                      WHERE hub_score2.id = betweenness1.id 
                      and hub_score2.id = authority_score2.id
                      and hub_score2.id = closeness1.id
                      and hub_score2.id = in_degree1.id
                      and hub_score2.id = out_degree1.id")

newdf2 <- sqldf("SELECT Book.id, Book.review_cnt, Book.rating, hub, betweenness, auth, closeness, 
                          deg2, deg3, Book.salesrank
                FROM Book, newdf1,mean_values 
                WHERE newdf1.id = Book.id
                and Book.id=mean_values.Target")

summary(salesrank_prediction<- glm(salesrank ~ review_cnt + rating + hub + betweenness + 
                                       auth + closeness + deg2 + deg3, family="poisson", data=newdf2))
Call:
glm(formula = salesrank ~ review_cnt + rating + hub + betweenness + 
    auth + closeness + deg2 + deg3, family = "poisson", data = newdf2)

Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-367.17  -157.71   -10.47   127.91   486.93  

Coefficients:
              Estimate Std. Error  z value Pr(>|z|)    
(Intercept)  1.128e+01  7.131e-04 15825.51   <2e-16 ***
review_cnt  -3.640e-03  3.496e-06 -1041.14   <2e-16 ***
rating      -2.219e-02  8.289e-05  -267.68   <2e-16 ***
hub          1.351e-01  5.723e-04   236.12   <2e-16 ***
betweenness -5.204e-04  1.087e-05   -47.87   <2e-16 ***
auth         3.986e-01  4.650e-03    85.72   <2e-16 ***
closeness   -6.295e+01  5.744e+00   -10.96   <2e-16 ***
deg2        -1.644e-03  6.376e-05   -25.79   <2e-16 ***
deg3         4.976e-02  1.792e-04   277.71   <2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for poisson family taken to be 1)

    Null deviance: 28309713  on 903  degrees of freedom
Residual deviance: 26141889  on 895  degrees of freedom
AIC: 26153385

Number of Fisher Scoring iterations: 5

Conclusion

From the regression result, we can see that all coefficients are highly significant with the small p-value. The coefficient for review_cnt is -3.640e-03. This means that the expected log count of sales rank for a one-unit increase in review_cnt is -3.640e-03. Since lower sales rank means higher sales, an increase in reviews decreases sales rank and increases sales. The coefficient for the rating is -2.219e-02 which indicates that the expected log count for a one-unit increase in rating is -2.219e-02. Since lower sales rank means higher sales, an increase in rating decreases sales rank and increases sales. The coefficient for the hub is 1.351e-01 which indicates that the expected log count for a one-unit increase in the hub is 1.351e-01. Since lower sales rank means higher sales, increase in hub score increases sales rank and decreases sales. The coefficient for betweenness is -5.204e-04, i.e., the expected log count for a one-unit increase in betweenness is -5.204e-04. Since lower sales rank means higher sales, increase in betweenness decreases sales rank, and increases sales. The coefficient for auth is 3.986e-01; the expected log count for a one-unit increase in auth is 3.986e-01. Since lower sales rank means higher sales, an increase in authority score increases sales rank and decreases sales. The coefficient for closeness is -6.295e+01, i.e the expected log count for a one-unit increase in closeness is -6.295e+01. Since lower sales rank means higher sales, increase in closeness decreases sales rank, and increases sales. The coefficient for deg2 is -1.644e-03, i.e. the expected log count for a one-unit increase in deg2 is -1.644e-03. Since lower sales rank means higher sales, increase in in-degree decreases sales rank, and increases sales. The coefficient for deg3 is 4.976e-02, i.e., the expected log count for a one-unit increase in deg3 is 4.976e-02. Since lower sales rank means higher sales, increase in out-degree increases sales rank, and decreases sales.