% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/source-network.R
\name{source_network}
\alias{source_network}
\title{Build a source (journal) network}
\usage{
source_network(
  data,
  type = "coupling",
  counting = "full",
  similarity = "none",
  threshold = 0,
  min_occur = 1L,
  top_n = NULL,
  self_loops = FALSE,
  deduplicate = TRUE,
  format = "edgelist"
)
}
\arguments{
\item{data}{A data frame with \code{id} and \code{journal} (character column).
For coupling, also needs \code{references}. For co-citation, needs a
\code{cited_journals} list-column.}

\item{type}{Character. \code{"coupling"} (default), \code{"co_citation"}, or
\code{"equivalence"}.}

\item{counting}{Character. Counting method. Default \code{"full"}.}

\item{similarity}{Character. Similarity measure. Default \code{"none"}.}

\item{threshold}{Numeric. Minimum edge weight. Default 0.}

\item{min_occur}{Integer. Minimum papers per source. Default 1.}

\item{top_n}{Integer or NULL. Return only the top n edges by weight.
Default NULL (all edges).}

\item{self_loops}{Logical. If \code{TRUE}, include self-loops (an entity linked
to itself). Default \code{FALSE}.}

\item{deduplicate}{Logical. If \code{TRUE} (default), each \verb{(paper, entity)}
pair is counted at most once — duplicate entries in the source data
(e.g., the same author listed twice on a paper) are treated as one
occurrence. Set to \code{FALSE} to count every raw occurrence.}

\item{format}{Character. Output format:
\describe{
\item{\code{"edgelist"}}{Default. A \code{bibnets_network} data frame with
columns \code{from}, \code{to}, \code{weight}, \code{count}.}
\item{\code{"gephi"}}{Gephi-ready data frame: \code{Source}, \code{Target},
\code{Weight}, \code{Count}, \code{Type}.}
\item{\code{"igraph"}}{An igraph graph object (requires igraph).}
\item{\code{"cograph"}}{A cograph_network object (requires cograph).}
\item{\code{"matrix"}}{A sparse adjacency matrix.}
}}
}
\value{
Depends on \code{format}: a \code{bibnets_network} data frame (default),
a Gephi-ready data frame, an igraph graph, a cograph_network, or a
sparse matrix.
}
\description{
Constructs a network between publication sources (journals, book series).
}
\examples{
data(biblio_data)
source_network(biblio_data, "coupling")
}
