Asjad Naqvi Profile picture
PhD Econ @NSSRNews 12. Habilitated. Stata stuff. Climate analytics, diagnostic tools, data science. @WIFOat, @wu_vienna 🌍

Oct 31, 2022, 11 tweets

The #30DayMapChallenge 2022 starts tomorrow. In the last 2 years a lot of work has been put in @Stata to mainstream some of the map elements we find in other softwares. He is a 🧵 on the different types of maps one can make. If you want the code for any, just msg! Let's go 👇

The basic #spmap package can already do a lot! Here are some examples using standard spmap syntax.

These were made for the online #GIS tutorials earlier this year that were fairly well attended! Over 1400+ registrations and 500+ ppl online. Might repeat it again.

The #bimap package that actually was the result of the #30DayMapChallenge last year allows you to combine two variables to check for interesting spatial correlations.

Install from SSC (ssc install bimap, replace)

See GitHub for further instructions
github.com/asjadnaqvi/sta…

One can now also clip maps in @Stata using the #clipgeo package:

ssc install cligeo, replace
github.com/asjadnaqvi/sta…

Clip your polygons however you want! Rectangles, squares, or any other regular polygon shape.

Zoom in to the regions!

There are also several guides written in the past years to completely rework how maps are made. For example the #OpenStreetMaps to @Stata guide shows how to get the layers in Stata:

medium.com/the-stata-guid…

Some examples below including an entry from the 2021 #30DayMapChallege

This guide tells how to complete reprogram maps to draw whatever you want!
medium.com/the-stata-guid…

Some more examples from the challenge last year that use this:

One is also not confined to actual maps. Maps can also be made in a lot of other ways. Here are examples of #joyplots, #scatter plots, #tilemaps.

For these, data is usually extracted from rasters and other layers and plotted. Africa/USA tilemap guides:
medium.com/the-stata-guid…

Here is a classic one from 2 years ago for the #DuBoisChallenge that got my started on maps in #Stata.

This was the first complete fully customized map replication in #Stata. You can fine more on this here:
github.com/asjadnaqvi/DuB…

There are really cool packages out there as well. For example #getcensus allows direct access to ACS data. See detailed thread here on how to pull the data and map it:


Also see #hexmaps that are part of the #maptile package for some cool USA maps.

You can also look at the 2021 #30DayMapChallenge entries here

github.com/asjadnaqvi/30D…

where 20 of the 30 maps were made in @Stata. Here is one of my fav ones. Any animation that color blends across months and years to show the Antarctica ice sheet extent.

Some more map-related #Stata content will be released this month + early 2023, so stay tuned!

First releases r always here:
medium.com/the-stata-guide

Otherwise, if you want to make a particular map, or are lost, or need the code, support, just msg!

Good luck 😎

/END

Share this Scrolly Tale with your friends.

A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.

Keep scrolling