I've been to Lagos and it rains a lot sometimes overflooding but it's pretty sunny. I'm aware that it rains a lot too in Miami. Is the climate the same apart from Lagos being near Equator and ITCZ region?
Lagos experiences a tropical savanna and Miami a tropical monsoon climate. Rainfall and temperature are indeed not too different in the two cities but - as their different climate classifications imply - the annual cycles as well as the underlying drivers in these respects do differ (Figs. 1,2).
Although located in the Northern Hemisphere, temperature in Lagos is lowest in summer when the Intertropical Convergent Zone (ITCZ) migrates over the region and the associated cloud cover effectively blocks sunlight (https://en.wikipedia.org/wiki/Geography_of_Nigeria#Temperature). The rainfall annual cycle is again dictated by the seasonal evolution and latitudinal migrations of the ITCZ.
A more typical temperature annual cycle is evident in Miami with a maximum in summer. Rainfall in Miami exhibits peaks in June and September (as in Lagos; interestingly) mostly associated with the formation of thunderstorms that are driven by large summer insolation (leading to unstable air), moisture supply, and the favorable interaction between the subtropical high and the local sea breezes (https://www.weather.gov/tbw/Thunderstorm_Climatology).
Fig. 1: Annual cycle of rainfall (bars) and daily min/max temperature (blue/red lines) in Lagos, Nigeria (https://worldweather.wmo.int/en/city.html?cityId=258)
Fig. 2: As in Fig. 1, but for Miami, USA (https://worldweather.wmo.int/en/city.html?cityId=267)