Geopolitical codes are how a country positions itself in the global neighborhood.
States and other geopolitical entities such as regions and places are like actors who interact on the world stage.  Each actor tries to determine for themselves how they will interact with the rest of the world. We call the calculation of how a country positions itself in the global neighborhood a geopolitical code. These examinations include five key points:
- Who are our allies now, and who could become our ally?
- Who are our enemies now, and who could become our enemy?
- How can we keep our current allies and make potential allies like us more?
- How can we defend against our current enemies and against new threats?
- How do we present and justify the previous four questions to our own public and to the rest of the global community?
Different countries consider different scales when making their geopolitical codes. Some countries may only concern themselves with their immediate neighbors. Questions addressed may include whether or not neighbors are friendly and what trading is appropriate or allowed between the two nations. Other countries develop codes which help them interact with or influence a wider region. Iran’s attempts to influence nations in the Middle Eastern region is evidence of the regional scope of its geopolitical code. Some nations, like the United States have global geopolitical codes. With a global geopolitical code the United States makes calculations about far more countries than just Canada and Mexico, such as its allies in NATO and its relations with Japan, South Korea, and China.
Political geographers are seeing increasing influence on the global stage from what we call non-state actors such as terrorist groups, insurgency groups, revolutionary forces, businesses, and social movements. Understanding the goals and viewpoints of non-state actors can help predict how they will act, in the same way we use geopolitical codes to understand how states act. For example, Al Qaeda developed its strategy as a global geopolitical code, whereas ISIS sees its influence as largely regional. These different organizations will enact plans based on their geopolitical codes just like a state would.
 Colin Flint, Introduction to Geopolitics, 3rd edition, pp. 52-56
Czech Gen. Petr Pavel, center, the chairman of NATO’s Military Committee, responds to a question during a news conference at NATO headquarters in Brussels after a meeting of the alliance’s Military Committee, Jan, 17, 2018. He is flanked by U.S. Army Gen. Curtis M. Scaparrotti, the supreme allied commander for Europe, left, and Gen. Denis Mercier of the French Air Force. NATO photo
An Air Force B-1B Lancer prepares to receive fuel from a KC-135 Stratotanker during a mission from Andersen Air Force Base, Guam, over the Korean Peninsula, Aug. 31, 2017. After refueling, the Lancers flew with Japanese and South Korean fighter jets for parts of the mission as a demonstration of U.S. commitment to its allies in the region. Air Force photo by Staff Sgt. Joshua Smoot