Making interactive online visualizations with stata2d3 and stata2leaflet
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 Data Driven Documents (D3) 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 webpage containing the desired visualization. This translation into a webpage 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 capitalizes on the consistency of Stata graph syntax by parsing and translating a standard Stata graph command into a webpage. Users can choose to include explanatory comments against each line in the source code, which are invisible to viewers but help them to learn HTML and JavaScript and make further refinements.
Year of publication: |
2014-09-28
|
---|---|
Authors: | Grant, Robert |
Institutions: | Stata User Group |
Saved in:
freely available
Saved in favorites
Similar items by person
-
Experiences and lessons learned from bootstrapping random-effects predictions
Grant, Robert, (2011)
-
Producing animated graphs from Stata without having to learn any specialized software
Grant, Robert, (2012)
-
A multiple imputation and coarse data approach to residually confounded regression models
Grant, Robert, (2013)
- More ...