help geoflowgeoflow v1.0 (GitHub)

geoflow

: A Stata module for generating spatial flow arcs.

The package assumes that the users have the following two files:
- file1: This file should contain a numeric flow variable defined by from() and to() identifiers. The file should already be loaded before using the command.
- file2: This file should contain a unique key() variable, for which coordinates are also defined, and can be merged with from() and to() variables.
The coordinates should be in the form _CX and _CY. These are generated by default if spshape2dta is used.

Basic use is as follows:
- use file1.dta, clear
- geoflow numvar using file2, from(var) to(var) key(var) [other geoflow options]

The command will generate a new file that contains the coordinates for the arcs. How these arcs are plotted depends on the user
and it is outside the scope of this command. See GitHub page for examples.

Syntax

geoflow numvar [if] [in] , from(varname) to(varname) key(var) saving(filename) [ replace cuts(num) top(num) points(num) ]

geoflow numvar using filename, from(var) to(var) key(var) The command assumes that the data is already loaded with data containing the
from() and to() variables. These variables should contain the identifiers that can be merged with the using data using the
key() variable.

points(num) Number of points to generate for each arc. Default is points(40).

save(filename) Name of the file that will be saved containing the arc data.

geoframe Convert the data to a geoframe.

replace Replace saved files and geoframe.

groups(num) Number of quantile groups to generate for the numvar variable.

top(num) Keep the top num() values from numvar. This option is recommended if the data contains a very
large number of pairs.

radius(num) Radius of the arcs. Default is radius(350) which fits well for globals maps in WGS84 projection.
Smaller values will result in larger arcs.

mark Generates a variable _mark in the using file which equals one for each key() that
matches with from() and to() variables.

Dependencies

ssc install graphfunctions, replace

Examples

See GitHub for examples.

Feedback

Please submit bugs, errors, feature requests on GitHub by opening a new issue.

Citation guidelines

See XXXX for the official SSC citation.
Please note that the GitHub version might be newer than the SSC version.

Package details

Version : geoflow v1.0
This release : 12 Jan 2025
First release: 12 Jan 2025
Author : Asjad Naqvi (asjadnaqvi@gmail.com)
Repository : GitHub
Keywords : Stata, graph, flow, arcs
License : MIT

Other visualization packages

arcplot, alluvial, bimap, bumparea, bumpline, circlebar, circlepack, clipgeo, delaunay, graphfunctions, geoboundary, geoflow, joyplot,
marimekko, polarspike, sankey, schemepack, spider, splinefit, streamplot, sunburst, ternary, treecluster, treemap, trimap, waffle

Visit GitHub for further information.