Skip to content

Commit 952e81b

Browse files
committed
add some references and update readme
1 parent d56e5de commit 952e81b

File tree

8 files changed

+58
-21
lines changed

8 files changed

+58
-21
lines changed

R/RcppExports.R

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
#' @param alpha The tuning parameter controlling the weights for SP strength and
1313
#' prior information. The default setting is 1.
1414
#' @param type Which type of SP to calculate: "consumption"/"pull" (default) or "distribution"/"push".
15+
#' @references Xiao, S., Yan, J. and Zhang, P. (2022).
16+
#' "Incorporating Auxiliary Information in Betweenness Measure for Input-Output Networks".
17+
#' \emph{Physica A: Statistical Mechanics and its Applications}, 607, 128200.
1518
#' @return Lists of betweeness score, associated SPs, SP distance and SP strength.
1619
#' @export
1720
btw <- function(adjmat, gross, prior, alpha = 1, type = "consumption") {
@@ -20,8 +23,14 @@ btw <- function(adjmat, gross, prior, alpha = 1, type = "consumption") {
2023

2124
#' Dijkstra's algorithm
2225
#'
26+
#' Implement the Dijkstra's algorithm to find the shortest paths
27+
#' from the source node to all nodes in the given network.
28+
#'
2329
#' @param adjmat The adjacency matrix of an directed and weighted network.
2430
#' @param src The given source node to find the shortest distance.
31+
#' @references Dijkstra, E. W. (1959).
32+
#' "A Note on Two Problems in Connexion with Graphs".
33+
#' \emph{Numerische Mathematik}, 1, 269--271.
2534
#' @return Lists of distance, previous node.
2635
#' @export
2736
dijkstra <- function(adjmat, src) {

R/data_WIOD.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
#' \itemize{
1515
#' \item Dietzenbacher, E., Los, B., Stehrer R., Timmer, M. P. and de Vries, G. J. (2013).
1616
#' "The Construction of World Input-Output Tables in the WIOD Project".
17-
#' \emph{Economic Systems Research}, 25(1): 71--98.
17+
#' \emph{Economic Systems Research}, 25(1), 71--98.
1818
#' \item Timmer, M. P., Dietzenbacher, E., Los, B., Stehrer, R. and de Vries, G. J. (2015).
1919
#' "An Illustrated User Guide to the World Input-Output Database: the Case of Global Automotive Production".
20-
#' \emph{Review of International Economics}, 23(3): 575--605.
20+
#' \emph{Review of International Economics}, 23(3), 575--605.
2121
#' \item Timmer, M. P., Los, B., Stehrer, R. and de Vries, G. J. (2016).
2222
#' "An Anatomy of the Global Trade Slowdown based on the WIOD 2016 Release".
2323
#' \emph{GGDC Research Memorandum 162, University of Groningen}.

README.md

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,24 +27,32 @@ devtools::install_github("Carol-seven/ionet")
2727
`btw()`: betweenness centrality measure that incorporates available
2828
node-specific auxiliary information based on strongest path.
2929

30+
`data_WIOD()`: get data from the World Input-Output Database (WIOD).
31+
32+
`dijkstra()`: implementation of the Dijkstra's algorithm to find the shortest paths
33+
from the source node to all nodes in the given network.
34+
3035
## Data \| Input-Output Tables
3136

32-
| Database | Economies | Sectors | Years |
33-
|:-------------------------------------------|:---------:|:---------:|:-----:|
34-
| the National Bureau of Statistics of China | China | 2002 | 122 |
35-
| | | 2005 | 42 |
36-
| | | 2007 | 135 |
37-
| | | 2010 | 41 |
38-
| | | 2012 | 139 |
39-
| | | 2015 | 42 |
40-
| | | 2017 | 149 |
41-
| | | 2017 | 42 |
42-
| | | 2018 | 153 |
43-
| | | 2018 | 42 |
44-
| | | 2020 | 153 |
45-
| | | 2020 | 42 |
46-
| OECD Input-Output Tables 2021 edition | China | 1995–2018 | 45 |
47-
| OECD Input-Output Tables 2021 edition | Japan | 1995–2018 | 45 |
37+
| Database | Economies | Years |Sectors| Notes |
38+
|:-------------------------------------------|:---------:|:----------:|:-----:|:-------------:|
39+
| the National Bureau of Statistics of China | China | 2002 | 122 | Built-in |
40+
| | | 2005 | 42 |
41+
| | | 2007 | 135 |
42+
| | | 2010 | 41 |
43+
| | | 2012 | 139 |
44+
| | | 2015 | 42 |
45+
| | | 2017 | 149 |
46+
| | | 2017 | 42 |
47+
| | | 2018 | 153 |
48+
| | | 2018 | 42 |
49+
| | | 2020 | 153 |
50+
| | | 2020 | 42 |
51+
| OECD Input-Output Tables 2021 edition | China | 1995--2018 | 45 | Built-in |
52+
| OECD Input-Output Tables 2021 edition | Japan | 1995--2018 | 45 | Built-in |
53+
| WIOD 2013 Release | 40+RoW | 1995--2011 | 35 | `data_WIOD()` |
54+
| WIOD 2016 Release | 43+RoW | 2000--2014 | 56 | `data_WIOD()` |
55+
| Long-run WIOD | 25+RoW | 1965--2000 | 23 | `data_WIOD()` |
4856

4957
## Recommended Citation
5058

man/btw.Rd

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/data_WIOD.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/dijkstra.Rd

Lines changed: 7 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/btw.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ using namespace Rcpp;
1414
//' @param alpha The tuning parameter controlling the weights for SP strength and
1515
//' prior information. The default setting is 1.
1616
//' @param type Which type of SP to calculate: "consumption"/"pull" (default) or "distribution"/"push".
17+
//' @references Xiao, S., Yan, J. and Zhang, P. (2022).
18+
//' "Incorporating Auxiliary Information in Betweenness Measure for Input-Output Networks".
19+
//' \emph{Physica A: Statistical Mechanics and its Applications}, 607, 128200.
1720
//' @return Lists of betweeness score, associated SPs, SP distance and SP strength.
1821
//' @export
1922
// [[Rcpp::export]]

src/dijkstra.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,14 @@ int minDist(NumericVector dist, LogicalVector doneSet) {
2626

2727
//' Dijkstra's algorithm
2828
//'
29+
//' Implement the Dijkstra's algorithm to find the shortest paths
30+
//' from the source node to all nodes in the given network.
31+
//'
2932
//' @param adjmat The adjacency matrix of an directed and weighted network.
3033
//' @param src The given source node to find the shortest distance.
34+
//' @references Dijkstra, E. W. (1959).
35+
//' "A Note on Two Problems in Connexion with Graphs".
36+
//' \emph{Numerische Mathematik}, 1, 269--271.
3137
//' @return Lists of distance, previous node.
3238
//' @export
3339
// [[Rcpp::export]]

0 commit comments

Comments
 (0)