2014RePEc: Research Papers in EconomicsRequires access

Making interactive online visualizations with stata2leaflet and stata2d3

Robert Grant

Open publisher page 0 citations

Abstract

The last three years have seen explosive growth in the variety and sophistication of interactive online graphics. These are mostly implemented in the web language JavaScript, with the D3 (Data Driven Documents) library being the most popular and flexible at present. Leaflet is a mapping library also being widely used. R users have some packages that translate their data and specifications into interactive graphics and maps, which write a text file containing the HTML and JavaScript instructions that make up a web page containing the desired visualization. This translation into a web page is easily achieved in Stata, and I will present the -stata2leaflet- command which produces zoomable, clickable online maps. Contemporary interactive graphs benefit from allowing the viewer to filter and select data of interest, which is a second layer of specification implemented in the -stata2d3- commands. -stata2d3- capitalises on the consistency of Stata graph syntax by parsing and translating a standard Stata graph command into a web page. Users can choose to include explanatory comments against each line in the source code, invisible to viewers but helping them to learn HTML and JavaScript and make further refinements.

Open-access reader

About this research paper

What this paper is about

The last three years have seen explosive growth in the variety and sophistication of interactive online graphics. These are mostly implemented in the web language JavaScript, with the D3 (Data Driven Documents) library being the most popular and flexible at present. Leaflet is a mapping library also being widely used. R users have some packages that translate their data and specifications into interactive graphics and maps, which write a text file containing the HTML and JavaScript instructions that make up a web page containing the desired visualization. This translation into a web page is easily achieved in Stata, and I will present the -stata2leaflet- command which produces zoomable, clickable online maps. Contemporary interactive graphs benefit from allowing the viewer to filter and select data of interest, which is a second layer of specification implemented in the -stata2d3- commands. -stata2d3- capitalises on the consistency of Stata graph syntax by parsing and translating a standard Stata graph command into a web page. Users can choose to include explanatory comments against each line in the source code, invisible to viewers but helping them to learn HTML and JavaScript and make further refinements.

Why it matters

A significance statement is not available in the OpenAlex record.

Key contribution

A contribution statement is not available in the OpenAlex record.

Method / approach

Method details are not available in the OpenAlex metadata.

Main findings

Findings are not separately available in the OpenAlex metadata.

Limitations

Limitations are not available in the OpenAlex metadata.

Applications

Application details are not available in the OpenAlex metadata.

Available abstract

The last three years have seen explosive growth in the variety and sophistication of interactive online graphics. These are mostly implemented in the web language JavaScript, with the D3 (Data Driven Documents) library being the most popular and flexible at present. Leaflet is a mapping library also being widely used. R users have some packages that translate their data and specifications into interactive graphics and maps, which write a text file containing the HTML and JavaScript instructions that make up a web page containing the desired visualization. This translation into a web page is easily achieved in Stata, and I will present the -stata2leaflet- command which produces zoomable, clickable online maps. Contemporary interactive graphs benefit from allowing the viewer to filter and select data of interest, which is a second layer of specification implemented in the -stata2d3- commands. -stata2d3- capitalises on the consistency of Stata graph syntax by parsing and translating a standard Stata graph command into a web page. Users can choose to include explanatory comments against each line in the source code, invisible to viewers but helping them to learn HTML and JavaScript and make further refinements.

Key concepts: Computer science, JavaScript, Web page, World Wide Web, Parsing, Graphics, Web application, Programming language

Related papers

Back to paper searchBrowse research topicsOriginal source
Making interactive online visualizations with stata2leaflet and stata2d3 — Research Paper | ScholarLens