networkflow 0.1.0: from tables of links to networks that move

Bibliometrics
Network analysis
R Package
First CRAN release of networkflow, a pipeline to build networks from tabular data, detect communities, follow them over time, and name and draw them.
Author

Aurélien Goutsmedt

Published

November 30, 2026

I am happy to announce that networkflow 0.1.0 is now on CRAN. It is a project that started almost four years ago with the help of Alexandre Truc and, then, Thomas Delcey, and it is the first version we dare to call a package rather than a pile of messy scripts.

install.packages("networkflow")

Where it comes from

networkflow was born from a very concrete need: mapping how academic literatures, and more broadly disciplines, evolve. With Alexandre and Thomas, and in many discussions with other colleagues, we kept asking the same questions about the use of bibliometrics and network analysis for the history of economics and of other disciplines. How do we group articles? How do we follow a cluster from one period to the next? Which similarity measure, which threshold, which time window? The code written to answer these questions, project after project, gradually became the package. Alexandre initiated the alluvial method that remains at the core of it, and Thomas has used it extensively, for instance in his work on the dissemination of Fama (Delcey forthcoming).

What it does

Research data rarely come as networks: they come as tables of links between two kinds of entities (articles and the references they cite, authors and their papers, accounts and the hashtags they use). networkflow turns this into a sequence of explicit steps:

  1. Build networks from such tables, with biblionetwork similarity measures or statistical backbones, for a whole corpus or one network per time window.
  2. Detect communities with the igraph algorithms (Leiden, Louvain, Infomap…).
  3. Follow them over time, by linking the clusters of successive windows into dynamic clusters.
  4. Name, characterise and draw them, including alluvial plots.

Every choice (measure, threshold, window, algorithm, resolution, matching rule) is an explicit argument, so that it can be discussed, varied and reported. Everything returns tidygraph objects. The guides on the website walk through the whole pipeline based on the stagflation corpus used in Goutsmedt (2021).

A quick example: research on inflation, then and now

To give an idea of what this looks like, here is a corpus of 2,972 articles published between 1973 and 2025 in 15 economics journals (the “top 5”, the Economic Journal, the European Economic Review, the Review of Economics and Statistics, the International Economic Review, and macroeconomic journals such as the Journal of Monetary Economics, the Journal of Money, Credit and Banking, the Brookings Papers and AEJ: Macroeconomics), whose title or abstract mentions inflation (or disinflation, deflation…). The data come from OpenAlex, and they take the shape described above: a table nodes with one row per article (identifier, year, title, journal…), and a table references with one row per citation (the article work_id cites the work cited_id).

One network per window

Two articles are linked in a bibliographic coupling network when they cite the same references, and the more references they share, relative to the length of their bibliographies, the stronger the link. The weight of the links is computed by biblionetwork, which networkflow calls under the hood: here, the “similarity” measure, a cosine of the two reference lists in which a shared rare reference counts more than a shared classic (Shen et al. 2019). Rather than one network for fifty years of research, we build one network per window of seven years, with a new window every two years (1973-1979, 1975-1981… 2019-2025): 24 networks, each computed as if the corpus were limited to the articles of the window.

library(networkflow)

networks <- build_dynamic_networks(
  nodes = nodes,
  directed_edges = references,
  source_id = "work_id",       # the citing article
  target_id = "cited_id",      # the cited work
  time_variable = "year",
  time_window = 7,             # seven-year windows...
  window_step = 2,             # ...starting every two years
  method = "similarity",       # biblionetwork measure
  edges_threshold = 1,         # minimum number of shared references
  filter_components = TRUE     # keep the main component of each network
)

We then detect communities in each window with the Leiden algorithm, and give each one a provisional name made of the four terms of its titles that are the most specific to it (tf-idf):

networks <- add_clusters(networks, clustering_method = "leiden", seed = 123)
networks <- name_clusters(
  networks,
  method = "tf-idf",
  cluster_id = "cluster_leiden",
  text_columns = "title",
  nb_terms_label = 4,
  clean_word_method = "lemmatize"
)

Two windows, fifty years apart

Two network maps side by side, drawn with UMAP. Left, 1973-1979, 149 articles in six labelled clusters: unemployment, wage, variability, theory; interest rate, interest, real, effect; hyperinflation, rational expectation, expectation, rational; cost, finance, dynamic, growth; growth, economy, dynamic, macroeconomic; tax, demand, policy, price. Right, 2019-2025, 515 articles in seven clusters: fiscal, trap, interest rate, fiscal policy; bond, interest rate, uncertainty, shock; expectation, inflation expectation, household inflation, survey; open economy, contract, economy, trend; Phillips, curve, era, Phillips curve; welfare cost, welfare, money, bank; income, welfare, union, structural. Large nodes are highly cited articles.

Bibliographic coupling networks of the articles on inflation, 1973-1979 and 2019-2025. Colours are the Leiden communities (those gathering less than 4% of the articles are in grey), labels their four most specific title terms, and node size the number of citations received.

The two maps are drawn with networkflow’s UMAP layout and plotting function. To read a cluster, the labels are not enough: we look at its most cited articles and at the references most shared by its articles.

In 1973-1979, the largest community (44 of the 149 articles) deals with the relation between inflation and unemployment. Articles on wage inflation and unemployment sit there next to Lucas’s international evidence on output-inflation trade-offs, Barro on unanticipated money and Friedman’s Nobel lecture, and its most shared references are Friedman’s “The Role of Monetary Policy” (cited by 11 of its articles), Lucas (8), Phillips (7) and Sargent and Wallace (7). The other communities are smaller: inflation expectations and interest rates (26 articles, including two on the Gibson paradox), money demand during hyperinflations (26 articles, 19 of which cite Cagan’s study of hyperinflations), inflationary finance and its welfare cost, partly in developing economies (19), money in growth models (18), and a small mixed cluster (9) that includes tax-based incomes policies.

In 2019-2025, the largest community (150 of the 515 articles) is about monetary policy when interest rates are at their lower bound and about the interaction of monetary and fiscal policy: 34 of its titles mention the lower bound, the liquidity trap, forward guidance, secular stagnation or low interest rates, 33 mention fiscal policy, debt or deficits, and its most shared references are Leeper on active and passive monetary and fiscal policies and Eggertsson and Woodford on the zero bound. The Phillips curve is still there, as a community of its own (41 articles) that also discusses the pandemic-era inflation. Survey-based research on the inflation expectations of households and firms forms a community of 92 articles, as large as the one on the identification of monetary shocks and on interest rates. The others deal with price setting (menu costs, sticky prices, production networks), money in search models and the welfare cost of inflation, and the measurement of price indices and of inflation inequality.

Fifty years in one plot

The 22 windows in between are where the dynamic part of networkflow comes in. merge_dynamic_clusters() links a cluster to a cluster of the previous window when a majority of the articles of each comes from the other, so that the clusters of the 24 windows become dynamic clusters that can last several windows. networks_to_alluv() and plot_alluvial() then draw their history:

dynamic <- merge_dynamic_clusters(
  networks,
  cluster_id = "cluster_leiden",
  node_id = "work_id",
  method = "majority",
  threshold_similarity = 0.51,
  similarity_type = "partial"
)
dynamic <- name_clusters(
  dynamic,
  method = "tf-idf",
  name_dynamic_clusters = TRUE,
  cluster_id = "dynamic_cluster_leiden",
  text_columns = "title",
  nb_terms_label = 4
)
alluv_dt <- networks_to_alluv(dynamic, cluster_id = "dynamic_cluster_leiden", node_id = "work_id")
plot_alluvial(
  alluv_dt,
  cluster_id = "dynamic_cluster_leiden",
  node_id = "work_id",
  color_alluvial = TRUE,
  color = palette,             # colours for the main clusters, grey for the others
  minimize_crossing = TRUE
)

Alluvial plot over 24 windows from 1973-1979 to 2019-2025. Nine dynamic clusters are coloured, the others are grey. Two run through the whole period: welfare, money, growth, cost, at the top, and forecast, stock, interest, real, at the bottom. Variability, output inflation, wage, relative, from 1973-1979 to 1995-2001; central, monetary, bank, openness, from 1979-1985 to 2005-2011; hyperinflation, cointegration, currency substitution, money demand, from 1983-1989 to 1995-2001; monetary policy, target, rule, interest rate, from 1995-2001 to 1999-2005; monetary, target, policy, optimal, from 2003-2009 to 2009-2015; sticky, monetary, persistence, optimal, from 2003-2009 to 2017-2023; low, bind, monetary, policy, from 2009-2015 to 2019-2025.

Dynamic clusters of the articles on inflation, 1973-2025. Each bar is a seven-year window, each block a dynamic cluster with its share of the window’s articles, and the flows follow the articles from one window to the next. The 9 dynamic clusters (out of 62) that last at least three windows and gather at least 18% of one window are coloured and labelled; the others are in grey.

Read through the references their articles share most, the coloured clusters draw a succession. The cluster on the output-inflation trade-off and relative price variability, built on Lucas (1973) and on Fischer’s and Taylor’s models of contracts, lasts until 1995-2001. The cluster on central banks, whose most shared references are Kydland and Prescott, Barro and Gordon, and Rogoff, lives from 1979-1985 to 2005-2011. Research on hyperinflations and money demand, now estimated with cointegration methods, forms a cluster from 1983-1989 to 1995-2001. Monetary policy rules (Taylor, 1993; Clarida, Galí and Gertler, 1999) form a cluster around 2000. From 2003-2009, two clusters take over: optimal monetary policy and inflation targeting in New Keynesian models, until 2009-2015, and sticky prices and inflation persistence, until 2017-2023 (Calvo, 1983, is cited by 175 of its articles). From 2009-2015, the cluster on the lower bound grows until it gathers 29% of the last window. Two clusters run through the whole period: one on the welfare cost of inflation and money, from Bailey and Tobin to Lagos and Wright, and one on time series of inflation, interest rates and monetary policy. Grey flows remind us that many articles fall in small or short-lived clusters.

The cluster labels come from extract_tfidf(), which treats each cluster as one document made of the titles of its articles, and can be called directly to look at more terms than a label holds:

terms <- extract_tfidf(
  dynamic,
  text_columns = "title",
  grouping_columns = "dynamic_cluster_leiden",
  clean_word_method = "lemmatize",
  nb_terms = 10
)

Bar charts, one per coloured dynamic cluster, of its ten terms with the highest tf-idf. From 1973-1979 to 1995-2001: variability, output inflation, wage, output, relative, price variability, relative price, shock, inflation uncertainty, inflation tradeoff. From 1973-1979 to 2019-2025: forecast, stock, interest, real, term, shock, interest rate, monetary, bond, real interest; and welfare, welfare cost, money, growth, cost, optimal, search, monetary, inflation tax, financial. From 1979-1985 to 2005-2011: central, monetary, central bank, bank, openness, independence, target, bank independence, government, monetary policy. From 1983-1989 to 1995-2001: hyperinflation, cointegration, currency substitution, money demand, German hyperinflation, currency, demand, substitution, money, inflation economy. From 1995-2001 to 1999-2005: monetary policy, monetary, target, policy, rule, policy rule, inflation target, interest rate, bind, interest. From 2003-2009 to 2009-2015: monetary, monetary policy, target, inflation target, policy, optimal, rule, optimal monetary, Taylor, bank. From 2003-2009 to 2017-2023: sticky, monetary, persistence, optimal, trend, inflation dynamic, monetary policy, Keynesian, rigidity, dynamic. From 2009-2015 to 2019-2025: low, bind, low bind, monetary, monetary policy, policy, fiscal, trap, target, liquidity trap.

The ten title terms with the highest tf-idf in each coloured dynamic cluster (colours as in the alluvial plot), with the first and last windows of the cluster.

These readings are only a first pass, and the choices behind the plot (the matching rule, its threshold, the clusters coloured) matter as much as those behind the networks; networkflow has diagnostics to check them. For more details, see the guides on building networks, finding and reading clusters, following clusters over time, drawing networks and going beyond bibliographic coupling.

A word on how it got finished

Maintaining a package, writing its documentation, building a test suite and checking it on three operating systems is exactly the kind of work that an academic position leaves little time for, and rewards even less. For years, networkflow stayed in an in-between state. This is where we must confess that an AI assistant (Claude) helped a lot. It did not replace the research questions or the methodological choices, which remain ours, but it made the tedious part (tests, documentation, consistency checks, CRAN requirements) feasible in a few weeks rather than never. It allowed us to finish and share things that would otherwise stay in a drawer.

What next

The package is still marked as experimental, and I expect the interface to move as people use it. Other ways of following clusters over time are on our list. Bug reports, questions and ideas are welcome on GitHub.

Comments

References

Delcey, Thomas. forthcoming. “The Dissemination of Fama (1970): A Bibliometric Analysis.” Journal of the History of Economic Thought, Forthcoming forthcoming.
Goutsmedt, Aurélien. 2021. “From the Stagflation to the Great Inflation: Explaining the US Economy of the 1970s.” Revue d’Economie Politique Forthcoming. https://www.cairn.info/revue-d-economie-politique-2021-3-page-557.htm.
Shen, Si, Danhao Zhu, Ronald Rousseau, Xinning Su, and Dongbo Wang. 2019. “A Refined Method for Computing Bibliographic Coupling Strengths.” Journal of Informetrics 13 (2): 605–15. https://linkinghub.elsevier.com/retrieve/pii/S1751157716300244.