According to the projections of the National Population Council (Conapo); As of July 1, 2007, the city had an estimated population of 8,193,899 residents for the city, and 19,704,125 residents for the entire Metropolitan Area. The per capita income of the Federal District in 2008 amounted to 281,110 Mexican pesos, which in September 2008 was equivalent to 25,258 dollars in nominal dollars – a figure similar to that of countries such as the Czech Republic or South Korea.
After the French occupation in Spain, the City Council of Mexico declared itself sympathetic to the creation of a sovereign Junta to govern New Spain for the duration of the occupation. The most radical members, such as Francisco Primo de Verdad and Melchor de Talamantes, thought that independence should be final. The Junta of Mexico had the support of Viceroy José de Iturrigaray. However, a reactionary movement imprisoned the members of the city council on September 15, 1808 and obtained the removal of the viceroy.
After the start of the independence revolution in Dolores, Guanajuato, the objective of the insurgent troops was the capture of the capital. Their paths led them to the outskirts of Mexico City. Hidalgo and his army arrived in Cuajimalpa shortly after proclaiming independence in Dolores. They defeated the royalists in the battle of Monte de las Cruces, and despite this, the insurgents decided to return to the Bajío without taking the capital.
From then on, the Valley of Mexico was no longer a military objective of the independentistas, and had become the stronghold of the royalist army. Towards 1820, when the popular revolution was almost extinct, Mexico City was the seat of new movements against the viceregal government. This time, the conspirators were the same ones who had achieved the removal of Iturrigaray, who after the approval of the Constitution of Cádiz saw their privileges threatened. Among them was Agustín de Iturbide, who sealed a pact (Plan de Iguala) with Vicente Guerrero (head of the revolution in southern Mexico) and later forced Juan O’Donojú to sign the Treaties of Córdoba that declare the independence of Mexico.. The Trigarante Army triumphantly entered Mexico City on September 27, 1821, after Agustín Iturbide is proclaimed emperor of the Mexican Empire, by the congress, crowning himself in the Cathedral of Mexico.
Mexico City in the 21st century
According to Thereligionfaqs.com, the politician Andrés Manuel López Obrador, who was head of the Federal District Government from 2000 to 2005, is one of the most popular politicians in the city.
The last federal election in Mexico (2006) had as an official result the victory of Marcelo Ebrard in the election for Head of Government of the Federal District, as well as a closed difference between the PRD candidates (Andrés Manuel López Obrador) ―who had been chief of the Federal District Government from 2000 to 2005 – and of the PAN (Felipe Calderón), the final count being favorable to the latter. After July 2, the Federal District was the scene of demonstrations calling for a full recount of the election. The total recount was denied by the electoral authorities, who only authorized the opening of a smaller percentage of the electoral packages. As a pressure mechanism, López Obrador supporters installed a 40-day sit-in in the Plaza de la Constitución, Avenida Juárez and Paseo de la Reforma that lasted until September 15 and was set up a few hours before the traditional military parade that it runs through the same streets and avenues where the sit-in was installed. The PRD occupation of the Zócalo and one of the capital’s most important arteries kept opinions divided in the capital.
The Federal District became, in 2006, the first federal entity in Mexico to legally recognize unions between people of the same sex. This happened through the approval of the Law of Coexistence Societies on November 9 of that year in the Legislative Assembly of the capital; on December 21, 2009 it also recognized same-sex marriage  , becoming the first Latin American city to approve it. In April 2007 it also became the first federal entity to decriminalize abortion before 12 weeks of pregnancy. The law was criticized by the Catholic hierarchy and conservative organizations.
Another health event took place in the City, when on the night of April 23, 2009, the Federal Government announced the start of the AH1N1 flu outbreak. This led to the initiation of a prevention campaign with the citizens of the capital and the people of Mexico; For this reason, work was suspended in most of the activities of the city and metropolitan area, from April 24 to May 7. Thanks to that, the virus that started an epidemic was controlled.