Welcome to the Stata Guide!
Last updated: Jan 2023
and thank you for the support! At the time of this update (January 2023), the Guide has crossed over 900 followers (800 in Aug 2022, 600 in Dec 2021, 450 in Sept 2021). Might not be a lot in the grand scheme of Medium publications, but for me personally, this is a huge number, given that it was 0 followers in August 2020. The guide is now 2.5 years old, and as of now, has 58 articles plus one guest article. The articles have an average reading time of 14.47 minutes and an average length of 3,703 words. That is over 214,784 words that were written at the time of updating this post. That is almost two book lengths!
This year, a new publication page, The Stata Gallery was also launched, which allows anyone to submit their Stata articles. Do consider submitting if you have some cool application, or data visualization, or some code block that others can benefit from.
Additional, a Stata visualization or StataViz portfolio website was launched to showcase all the cool visuals made since this project started. Check it out!
The guides were written in addition to regular work. This extra time came from almost now two years of working from home. Since, I am more of a coder than a writer, learning to write these articles was a steep learning curve. Additionally, each guide requires a tremendous effort, starting from concept design, writing and streamlining the code, generating the figures, explaining all of it, and then marketing it through various channels including Twitter, LinkedIn, Mastodon, Post, Facebook, GitHub, and Discord!
The aim of this post is to share some statistics on how the Guide has grown over time. From the statistics, it is fairly clear that there is a lot of interest in articles that provide high utility for day-to-day stuff like converting tables to LaTeX or making maps or dealing with workflow management.
Based on online interactions across various social media channels, the audience can be divided into two groups. First are those that come here for the data visualization stuff, and the second are those that want to get more utility out of Stata for their research work. The latter is the more active group based on user engagement. That’s why the guides that cater to the researchers are also open ended, and get intermittent updates. These guides, like the Stata-to-LaTeX guide or the Maps in Stata II posts, also generate the most interaction through emails, suggestions, direct messages, etc. The dataviz guides, which are a personal interest of mine, mostly cater to a specialized audience. Most of the people that write to me regarding these guides are really senior researchers, professors, heads of various centers and organizations, that want to go the extra mile. Some of these guides are very general (like color schemes, and stacked area graphs), while others are purely self-assigned coding challenges, that for some reason I find relaxing (and also frustrating at times).
In 2021, I was asked often to covert some of the guides into ready-to-use Stata packages. In 2022, I decided to jump on the package bandwagon and released 16 dataviz packages. Here is a preview of the packages in alphabetical order:
Each package has it’s own GitHub respository where the latest versions are released:
These releases are also pushed to SSC to allow users to easily install them: ssc install <packagename>, replace
.
I have also written articles which are just blog posts. For example, why this guide exists on Medium or why we should learn to code or what it meant doing the #30DayMapChallenge with Stata.
On the whole, the posts on the Stata Guide also help me a lot, especially to find code snippets rather than sift through old dofiles scattered all over the place.
As the guide continues to grow, articles are partitioned by tags which are then converted to submenus as we can see in the screenshot above. This helps you to jump right into the section you need. The way I have done it now is to reorganize the tags such that each category has at least four items. The current categories are as follows:
- Welcome is this post.
- LaTeX is the highly-popular Stata-to-LaTeX guide.
- Maps is a favorite of the audience covering all the spatial stuff. Learn how to make cool maps.
- Polar has all the visualizations that have anything to do with circles and polar coordinates.
- Workflow shows all the data management and automation guides. Read these if you are new to Stata or starting a project!
- Programming deals with Mata, MLE, regular expressions etc. For the advanced users or those trying to get into programming. Don’t forget to get your Mata and Regex cheat sheets.
- Blog has, as the name suggests, blog posts. Some thoughts and personal opinions on Stata, and coding, and related things. They are usually published at certain occasions, like anniversaries, or holidays.
So how are the different posts performing? Here are some lists:
Top 10 based on reads
- The Stata-to-LaTeX guide (6.6k)
- Maps in Stata I (3.9k)
- Stata schemes (3.1k)
- Stata graphs: Get those fonts right (2.8k)
- Maps in Stata II (2.3k)
- The Stata Workflow Guide (2k)
- Stata and GitHub Integration (1.95k)
- Stata graphs: Define your own color schemes (1.7k)
- COVID-19 visualizations with Stata Part 3: Heat plots (1.6k)
- Stata graphs: Sankey diagram (1.6k)
Top 5 based on views
- The Stata-to-LaTeX guide (79k)
- Stata graphs: Define your own color schemes (20k)
- Regular expressions (regex) in Stata (17k)
- Stata schemes (14.6k)
- Maps in Stata II (14.4k)
Guides I think everyone should read (Jan 2023)
There are also guides, that are very foundational and I think everyone should read (but people don’t!)
- The Stata workflow guide: A good starting point to help you organize your folders and files!
- The Power of Precision: One can really mess up the calculations if you are not aware of precision and floating point issues.
- Regular expressions (regex) in Stata: to help you with your string matches
- The Stata Frames Guide: learn to use Stata’s powerful feature to load and work with multiple data sets.
- The awesome Stata Tips collection! Countless tips for your day to day use! Regularly updated.
- Stata graph tips for academic articles: Simple tips to make your graphs publication ready!
- Maps in Stata II: I make a lot of maps and this guide has the code snippets.
- Mata: Stata’s End Game: Writing the Mata guide changed my whole approach to Stata and got me started with programming some fairly advanced stuff. Even if you don’t use Mata, this guide will definitely make you aware of its applications.
About the author
I am an economist by profession and I have been using Stata since 2003. I am currently based in Vienna, Austria. You can see my profile, research, and projects on GitHub or my website. You can connect with me via Medium, Twitter, LinkedIn, Mastodon, Post, or simply via email: asjadnaqvi@gmail.com. If you have questions regarding the Guide or Stata in general post them on The Code Block Discord server.
The Stata Guide releases awesome new content regularly. Subscribe, Clap, and/or Follow the guide if you like the content!