Friday, March 15, 2019

Creating a simple world map of cities in R

Mike (from cool but useless) asked on twitter if there is any package in R with with lats/longs of lots of cities. In fact there is. Here is a simple code to create a world map of cities with population larger than 40K in R using maps::world.cities and ggplot2.

ps. These population data in the maps package refers to 2016 estimates. If you want city population data from previous years, you might remember that we have previously posted about this open dataset with 6,000 years of global urbanization.

5 comments:

3phaselemon said...

It looks a bit like there are problems with the data. China is similarly dense to Brazil...

Rafael H M Pereira said...

This is probably a matter of how one sets the color, transparency and size of the dots.

Erlinda Kaes said...

I read testimonies and reviews about him so I contacted him immediately, explained my problems to him. Same day , he casted a spell for me and assured me for 2 days that my husband will return to me and to my greatest surprise the third day my husband came knocking on my door and begged for forgiveness. I am so happy that my love is back again and not only that, we are about to get married again, he proposed. I wouldn't stop talking about him. Contact him today if you need his help via email: emutemple@gmail.com and you will see that your problem will be solved without any delay. Website: https://emutemple.wordpress.com/

Brittany Seiber said...

To know more about Chief Dr Lucky you can visit his website (https://chiefdrluckyherbaltherapy.wordpress.com/)

A friend that suffered from Herpes and was cure with the help of this great herbal doctor Chief Lucky so i decided to contact him for help in getting rid of my families genital herpes virus 1/2 which i did and all i was told to provide was just some useful information and some materials used in preparation of the natural cure and that i did and now i am the happiest person on earth because i am writing this testimony of mine with joy and happiness in my heart to the whole world to know that natural remedy is real because i am a living testimony of Chief Lucky traditional herbal cure and i want you all to contact Chief Lucky via his email: chiefdrlucky@gmail.com or WhatsApp him +2348132777335 am sure he will help you too.

Nitish Kumar said...
This comment has been removed by a blog administrator.