help geoboundarygeoboundary v1.1 (GitHub)

geoboundary

:

A Stata package for fetching boundary data from:

1. geoBoundaries database.
2. GADM database.

All files are in the standard EPSG:4326 or WGS84 system.

By using the data provided through this package, you are agreeing to the disclaimer below.

Syntax for meta data

geoboundary meta, [ country(list) iso(list) level(list) region(list) any(list) length(num) strict noseperator ]

(see meta options)

This is a helper function where users can recover the meta information by providing a set of search options. Multiple options can also be specified.
This command returns two r-class locals, r(geob) and r(gadm) for a list of iso countries that exist in the two databases.
These locals can be passed onto the function below for recovering boundary data. This is useful for pulling data for a set of regions.

Syntax for boundary data

geoboundary ISO3 list, level(string) [ convert name(str) source(name) replace remove ]

(see boundary options)

meta options

country(string) Search by country names. Currently a list of names with spaces is not possible (forthcoming).

iso(string) Search by iso3 names.

region(string) Search by region names. Correct options are World Bank region classifications, e.g. LAC for Latin America and the Carribbean.

any(string) Search for the given expression in any of the raw meta data columns.

strict Make the searches strictly limited to the expression specified. E.g. region(NA) will return both NA (North America) and MENA (Middle East and North Africa).
But if strict is specified only NA region countries will be returned.

level(string) Search by ADM levels. Options that will return results are ADM0, ADM1, ADM2, ADM3, ADM4, ADM5.

length(numeric) Limit the length of the table columns displayed after running the command. Might be useful if tables are spanning across multiple rows
and are misaligned. This can occur with long names. Default is length(30).

noseperator Do not add a separator line in the displayed table. Default separators are determined by ISO3s.

boundary options

geoboundary ISO3 Define a single or a list of 3-letter ISO3 codes. Note that if the code is not valid, the country will be skipped and an error will be displayed. The use of
is highly recommended to check for the correct ISO3 codes. For the world map, the correct ISO3 code is WLD.

level(string) Valid options are ADM0, ADM1, ADM2, ADM3, ADM4, ADM5, or ALL. A list can also be specified. If all is specified, then the command will try and download all the six levels.
If any level is not found, it will be skipped and an error message will be displayed. Note that finer levels, e.g. ADM4 or ADM5 have large file sizes so use carefully.

source(name) Options are source(geoboundary (default if nothing specified) or source(gadm). Both datasets can contain different boundary data and even
different availability of ADM levels. Note that geoBoundaries is more recent than GADM but please check before using. Another note of caution: GADM is downloaded as a zip file
containing all the ADM levels for each ISO3. This implies (a) all other options are overwritten, and (b) folder size can increases substantially. Other data sources will be added soon (forthcoming).

replace Replace the raw files if they exist.

convert Convert to Stata shapefiles.

name(string) Define a custom name for the the Stata shapefiles. If this option is not used, the default name pattern is ISO3_ADMx.
For example, USA_ADM1.dta and USA_ADM1_shp.dta would be the default Stata shapefile names.

remove Remove the raw shapefiles. This option is highly recommended especially if the command is being used for bulk downloads.
The recommendation is to convert the downloaded files to Stata format and then use this option to remove the raw files (.shp .prj .shx .dbf) to avoid an exploding folder size.

Dependencies

None

Examples

See GitHub for examples.

Package details

Version : geoboundary v1.1
This release : 08 Dec 2024
First release: 25 Nov 2024
Repository : GitHub
Keywords : Stata, maps, boundaries
License : MIT

Author : Asjad Naqvi
E-mail : asjadnaqvi@gmail.com
Twitter/X : @AsjadNaqvi

Feedback

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

Disclaimer

The Geographic Information System (GIS) data provided herein is for informational/educational purposes only and is not intended for use as a legal or engineering resource.
While every effort has been made to ensure the accuracy and reliability of the data, it is provided "as is" without warranty of any kind.

The data provided through this GIS package assumes no liability for any inaccuracies, errors, or omissions in the data, nor for any decision made
or action taken based on the information contained herein. Users of this data are responsible for verifying its accuracy and suitability for their intended purposes.

Please be advised that GIS data may be subject to change without notice due to updates, corrections, or other modifications.
Users are encouraged to consult the original data sources or contact the provider for the most current information.

By accessing or using the GIS data provided through this package, you acknowledge and agree to these terms and conditions.

Citation guidelines

Suggested citation for this package:

Naqvi, A. (2024). Stata package "geoboundary" version 1.1.
Release date 24 November 2024. https://github.com/asjadnaqvi/stata-geoboundary.

@software{geoboundary,
author = {Naqvi, Asjad},
title = {Stata package ``geoboundary''},
url = //github.com/asjadnaqvi/stata-geoboundary,
version = {1.1},
date = {2024-12-08}
}

References

for geoBoundaries:

Runfola, D. et al. (2020) geoBoundaries: A global database of political administrative boundaries. PLoS ONE 15(4): e0231866. https://doi.org/10.1371/journal.pone.0231866.

Other visualization packages

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

or visit GitHub.