Importing Social Network Data into R through CSV Files

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 ต.ค. 2016
  • This video walks through the process of loading social network data into R for use with the package igraph by 1) typing in a short edge list into an R script), 2) importing a CSV file of an edge list, 3) importing a CSV file of an adjacency matrix. Shot for the University of Maine at Augusta

ความคิดเห็น • 35

  • @mayarapardiikeda7435
    @mayarapardiikeda7435 3 ปีที่แล้ว +2

    Exactly what I needed! Thank you professor!

  • @octo571
    @octo571 6 ปีที่แล้ว +2

    Perfect lesson for a work project. I know exactly how to proceed now. A thousand thank yous!!!!

    • @asakareem4574
      @asakareem4574 2 ปีที่แล้ว

      I guess im randomly asking but does any of you know of a trick to get back into an Instagram account..?
      I somehow forgot my login password. I love any tips you can give me

  • @sylusmutabazi
    @sylusmutabazi 6 ปีที่แล้ว +1

    Thank you Dr Cook. This is very informative

  • @brunoalvim8063
    @brunoalvim8063 6 ปีที่แล้ว

    Your videos are fantastic, thanks from Brazil.

  • @calculusfreakinmeout
    @calculusfreakinmeout 6 ปีที่แล้ว

    Hi I am trying to create a graph based on common characteristics. So I have a list of households and 5 characteristic variables. Now depending on which household have the common characteristics they are connected. So if household 10 and 15 have the common characteristic 3, they're connected. How could I go about creating a graph
    for this?

  • @prosto_komputer
    @prosto_komputer 3 ปีที่แล้ว +1

    Thank you for lesson.
    If I have about 1500 nodes.
    Haw can I make this matrix automatically or maybe only fill half of matrix. For example only under diagonal?

  • @anarjalil9069
    @anarjalil9069 4 ปีที่แล้ว +2

    HI, James, many thanks, it is useful, and could you please make a video SNA with NodeXLPro and what kind of analyses could be considered?

  • @adrianalozada6049
    @adrianalozada6049 4 ปีที่แล้ว

    Hello, I need to create an igraph object and calculate from it some connectivity indices. I have 40 nodes connected to each other nodes from a probability matrix (used as link). Each node has an xy position, but I do not know how conect those positions to my igraph object (not using layout in a plot). Without using this coordinates I am getting the same results to "degree", "closeness", etc.

  • @lisannewinter6324
    @lisannewinter6324 5 ปีที่แล้ว +3

    Thank you very much for this video. I have 46 nodes that I want to turn into a network. I followed all your steps and my CSV file that I created in Excel is 46Rx46C, however I keep getting the following error: Error in graph.adjacency.dense(adjmatrix, mode = mode, weighted = weighted, :
    At structure_generators.c:274 : Non-square matrix, Non-square matrix
    It says my file is not a square matrix, but it is, just like yours, only bigger... How do I solve this problem?

    • @fabioiam3568
      @fabioiam3568 4 ปีที่แล้ว

      Hey Lisanne, did you solve the problem?

  • @Ikarus2985
    @Ikarus2985 3 ปีที่แล้ว

    Kudos

  • @connorloomis9143
    @connorloomis9143 4 ปีที่แล้ว

    Hello, Thank you so much for this awesomely informative video!
    I am working on a social network adjacency list for a population of Crows at a communal foraging site
    Unfortunately after loading "my_data

    • @JamesCookUMA
      @JamesCookUMA  4 ปีที่แล้ว

      Hi, Connor. It's hard to say without you sharing your script and your data. The problem is in one or the other. Could you send them on to my e-mail address, which is here: www.uma.edu/directory/staff/james-m-cook/ ???

  • @user-xt9xl3hv5r
    @user-xt9xl3hv5r 5 ปีที่แล้ว

    Dear Mr. Cook, first of all: Thanks so much for this Video! Perfect for newcomers. I do have the same problem as Kingkar though.. When I choose my csv-file I do not get a graph, instead it tells me:
    > library(igraph)
    > my_data my_network my_network
    Error: Object 'my_network' not found
    > plot(my_network)
    Error in plot(my_network) : Object 'my_network' not found
    Do you have any advice for me?
    Cheers!

    • @TragoudistrosMPH
      @TragoudistrosMPH 5 ปีที่แล้ว

      European computers use ; instead of , as Americans have true comma delimited files, since we dont use , with numbers.
      That can be an issue.

  • @sfsamkari1549
    @sfsamkari1549 4 ปีที่แล้ว

    Thank you so much for great effort.. I did every thing the same but still it gives me the( Error in plot(mynetwork) : object 'mynetwork' not found)
    Could you please help

    • @JamesCookUMA
      @JamesCookUMA  4 ปีที่แล้ว +1

      Hi, sfsamkari! The first step I would try is to look through your code for typographical errors. Is there an inserted space, a missing vowel, or something like that? That’s the most likely reason and the one I always look for first. When you define the network name at the top, is it exactly spelled “mynetwork”?

    • @sfsamkari1549
      @sfsamkari1549 4 ปีที่แล้ว

      James Cook thanks a lot

  • @i.g.8206
    @i.g.8206 3 ปีที่แล้ว

    Hi, I would like to import Register Data from a Content Management Software into R for statistical analysis. Can I do so without creating an excel file by hand first? Since it is a lot of data it would take me weeks to create an excel file from all the cases. Is there maybe a better solution maybe by prgoramming an API in the R environment or so that can import the data from the software directly into R? Ty

    • @JamesCookUMA
      @JamesCookUMA  3 ปีที่แล้ว

      Absolutely - there are 40 different ways to do things in R. Working with csv files is just one of the simplest. Best of luck!

    • @i.g.8206
      @i.g.8206 3 ปีที่แล้ว

      @@JamesCookUMA Hey ty for your quick answer. Do you have literature or tutorial videos or other for my special case? Greetings.

    • @JamesCookUMA
      @JamesCookUMA  3 ปีที่แล้ว

      @@i.g.8206 Sorry, nope. Your particular case, with your particular CMS, will require a particular programming strategy to scrape data.

  • @kingkarghosh
    @kingkarghosh 6 ปีที่แล้ว +2

    > my_network
    Why I got these?

    • @kingkarghosh
      @kingkarghosh 6 ปีที่แล้ว

      library(igraph)
      my_data

    • @user-xt9xl3hv5r
      @user-xt9xl3hv5r 5 ปีที่แล้ว

      Hey there! I seem to have the same issue and I can't get it to work (I have no experience in writing code, just trying to figure out how I can create graphs). Did you find a solution? Would appriciate very much, if you could help. Best regards!

    • @camiloverts
      @camiloverts 5 ปีที่แล้ว +2

      I put sep = ";" and it worked

    • @dmega03
      @dmega03 4 ปีที่แล้ว

      @@camiloverts Could you tell me where do I have to put that? I'm a bit lost.

  • @user-kv6ul7so1o
    @user-kv6ul7so1o หลายเดือนก่อน

    咕的咕的

  • @ziggyai
    @ziggyai 4 ปีที่แล้ว

    How to export the igraph back to a CSV file?

    • @JamesCookUMA
      @JamesCookUMA  4 ปีที่แล้ว

      the command write.csv will do that for you. :)

    • @ziggyai
      @ziggyai 4 ปีที่แล้ว

      @@JamesCookUMA thanks!!! I am trying to run regression between vertex attributes but I don't know how to convert the igraph object to. Data frame, could you again give me a hint?

  • @mohamedelfodilihaddaden9978
    @mohamedelfodilihaddaden9978 4 ปีที่แล้ว

    I hope since then you installed Rstudio

    • @JamesCookUMA
      @JamesCookUMA  4 ปีที่แล้ว +1

      Ihaddaden MEF ha, yes! I enjoy RStudio now.

    • @mattsrinc
      @mattsrinc 3 ปีที่แล้ว

      @@JamesCookUMA And you use Excel shortcuts to speed up the "boring" work. I believe selecting a number of cells than dragging the black cross over the empty cells to copy the content was available in 2016 17:38.