EconPapers    
Economics at your fingertips  
 

Interactive maps

Ali Lauer ()
Additional contact information
Ali Lauer: Abt Associates

2017 Stata Conference from Stata Users Group

Abstract: We present examples of how to construct interactive maps in Stata, using only built-in commands available even in secure environments. One can also use built-in commands to smooth geographic data as a pre-processing step. Smoothing can be done using methods from twoway contour, or predictions from a GMM model as described in Drukker , Prucha, and Raciborski (2013; SJ 13-2 pp.287-301). The basic approach to creating a map in Stata is twoway area, with the options nodropbase cmiss(no) yscale(off) xscale(off), with a polygon “shape file” dataset (often created by the user-written shp2dta by Kevin Crow, possible with a change of projection using programs by Robert Picard), and multiple calls to area with if qualifiers to build a choropleth or scatter to superimpose point data. This approach is automated by several user-written commands, and works well for static images, but is less effective for web content where a Javascript entity is desirable. However, it is straightforward to write out the requisite information using the file command, and to use open-source map tools to create interactive maps for the web. We present two useful examples.

Date: 2017-08-10
References: Add references at CitEc
Citations:

Downloads: (external link)
http://fmwww.bc.edu/repec/scon2017/Baltimore17_Lauer.pdf

Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.

Export reference: BibTeX RIS (EndNote, ProCite, RefMan) HTML/Text

Persistent link: https://EconPapers.repec.org/RePEc:boc:scon17:21

Access Statistics for this paper

More papers in 2017 Stata Conference from Stata Users Group Contact information at EDIRC.
Bibliographic data for series maintained by Christopher F Baum ().

 
Page updated 2025-03-19
Handle: RePEc:boc:scon17:21