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
Exactly what I needed! Thank you professor!
Perfect lesson for a work project. I know exactly how to proceed now. A thousand thank yous!!!!
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
Thank you Dr Cook. This is very informative
Your videos are fantastic, thanks from Brazil.
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?
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?
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?
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.
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?
Hey Lisanne, did you solve the problem?
Kudos
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
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/ ???
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!
European computers use ; instead of , as Americans have true comma delimited files, since we dont use , with numbers.
That can be an issue.
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
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”?
James Cook thanks a lot
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
Absolutely - there are 40 different ways to do things in R. Working with csv files is just one of the simplest. Best of luck!
@@JamesCookUMA Hey ty for your quick answer. Do you have literature or tutorial videos or other for my special case? Greetings.
@@i.g.8206 Sorry, nope. Your particular case, with your particular CMS, will require a particular programming strategy to scrape data.
> my_network
Why I got these?
library(igraph)
my_data
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!
I put sep = ";" and it worked
@@camiloverts Could you tell me where do I have to put that? I'm a bit lost.
咕的咕的
❤
How to export the igraph back to a CSV file?
the command write.csv will do that for you. :)
@@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?
I hope since then you installed Rstudio
Ihaddaden MEF ha, yes! I enjoy RStudio now.
@@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.