Applications Of R - Packages (Libraries) In Solving Real Problems
R is a statistical software that is used to analyse varying amounts of data and execute both simple and complex commands dealing with different data sizes. Leaflet is one of the over 8000 packages (R libraries) and is used in R to help in the internet to draw maps and allocate specific features such as bounds, pop ups, markers, directions et al. To start using leaflet one downloads it from CRAN website and loads it into R alongside its dependencies i.e. the other packages that leaflet might need in the execution of some or all of its commands.In this study, we hope to use leaflet to draw a map of Kenya indicating the geographical boundaries, main physical and man-made features and narrow down to the distribution of major towns together with the populations associated with them. Over the years, there have been so many maps drawn about Kenya with almost everything clustered so close together such that it makes it complicated to really get the nitty gritty of specific aspects within the country. However, with detailed emphasis of salient features, we can be able to appreciate the importance on specifically studying a specific aspect of the population.Our study majored on all the major towns in Kenya. We extracted the list of all major towns, with populations above 1000 people and generated their coordinates in terms of longitudes and latitudes. We saved the data in excel with Comma Delimited (.csv) extension so that it's possible to read in R. To get more detailed results we filtered the top 50 cities and towns in Kenya as per their populations and since they are randomly distributed there wouldn't be any bias. By drawing a map showing major towns and attaching their population, we hope to save the government, supra national organizations, businesses and even individuals the headache of trying to find the most densely populated areas that can help them make informed, serious decisions that should boil down to planning and strategizing on how to use this knowledge to their advantage. We have made the study detailed yet simple to understand at a glance.