Iowa ( EYE-ə-wə) is a state in the upper Midwestern region of the United States. It borders the Mississippi River to the east and the Missouri River and Big Sioux River to the west; Wisconsin to the northeast, Illinois to the east and southeast, Missouri to the south, Nebraska to the west, South Dakota to the northwest, and Minnesota to the north. Iowa is the 26th largest in total area and the 31st most populous of the 50 U.S. states, with a population of 3.19 million. The state's capital, most populous city, and largest metropolitan area fully located within the state is Des Moines. A portion of the larger Omaha, Nebraska, metropolitan area extends into three counties of southwest Iowa. Other metropolitan statistical areas in Iowa include Iowa City, Cedar Rapids, Waterloo-Cedar Falls, Ames, Dubuque, Sioux City, and the Iowa portion of the Quad Cities. Iowa is home to 940 small towns, though its population is increasingly urbanized as small communities and rural areas decline in population. During the 18th and early 19th centuries, Iowa was a part of French Louisiana and Spanish Louisiana; its state flag is patterned after the flag of France. After the Louisiana Purchase, pioneers laid the foundation for an agriculture-based economy in the heart of the Corn Belt. In the latter half of the 20th century, Iowa's agricultural economy began to transition to a diversified economy of advanced manufacturing, processing, financial services, information technology, biotechnology, and green energy production. Politically, Iowa is notable for the Iowa Caucuses, an influential event in national politics, as well as its high levels of voter turnout and foundational leadership in civil rights including early adoption or support of black suffrage, women's rights, and same-sex marriage. Iowa's standard of living is ranked among the best states and it performs highly on metrics such as governance, education, infrastructure, and safety.