Sociogram for stingrays

using Rstudio, I am trying to make a social diagram of stingrays.
I have been having two issues:

  1. the stingrays denoted by a node 1-30 move location on the plot everytime I re run the code
  2. the stingrays that are lower numbers should be in the central
    Is there any way to fix this?
    See screenshot below:

my data is in an edge and node list of weights for each individual essentially looks like this:
sting.edge:
From To Weight
1 2 15
1 3 14

sting.node:
1
2
3

library(readr)

Import Data

link ← read_csv("~/Desktop/sting.edge.csv")
node ← read.csv("~/Desktop/sting.node.csv")

examine

head(node)
head(link)
nrow(node); length(unique(node$Name))
nrow(link); nrow(unique(link[,c(“From”, “To”)]))

link ← link[order(link$From, link$To),]
colnames(link)[3] ← “weight”
rownames(link) ← NULL

library(‘igraph’)

Weights

wgt_df2 ← enframe(sort(table(unlist(link))^3),
value=“weight”)

edgelist2b ← left_join(link,
wgt_df2,by=c(“From”=“name”)) %>% left_join(wgt_df2,
by=c(“To”=“name”)) %>%
mutate(weight=(weight.xweight.y)/sum(weight.xweight.y)/spread_factor)

plotting

g2 ← graph_from_data_frame(link)
is_weighted(g2)
??node_size_factor
enframe(sort(strength(g2))) %>%
mutate(name=forcats::as_factor(name)) %>%
ggplot(aes(x=as_factor(as.integer(name)),y=value)) + geom_text(aes(label=name))
node_size_factor <-.03
plot(g2,layout= layout_with_fr(g2),rescale=TRUE,vertex.size=strength(g2)*node_size_factor,
remove.multiple=F, remove.loops=T, edge.arrow.size=.001, vertex.color=“lightblue”)