Advancements in electricity access, economic development, and population increase are just some of the elements driving electricity demand growth in Africa. Open and transparent energy system models, coupled with geographically detailed and reliable data, are essential tools for planning sustainable systems capable of providing low-cost electricity for all. This study helps address these challenges by introducing a methodology to identify the optimal locations for solar and wind power plants, considering the trade-off between exploiting the best resources and the costs of expanding the electrical grid to reach them. The method, readily applicable to all African countries, is showcased in Kenya, where solar and wind resources, coupled with batteries, could constitute the backbone of a diversified power system. The optimal selection of sites is driven by a nontrivial interaction between resource strength, distance from the grid, and temporal profiles, proving the added value of introducing explicit geospatial information in energy system models.