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 draw maps and allocate specific features such as bounds, pop ups, markers, directions. 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, there is usage of 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 of our 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.\ This study majored on all the major towns in Kenya. A list of all major towns, with populations above 1000 people and generated their coordinates in terms of longitudes and latitudes has been generated. 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, will save the government, most especially in the Ministry of Devolution that can help them make informed, serious decisions on the county level. The study detailed yet simple to understand at a glance.