“…> worldcities <-read.csv("worldcities.csv") > sph <-geo2sph(data.frame(lon = pi/180*worldcities$lng, lat = pi/180*worldcities$lat)) > df1 <-data.frame(phi = sph$phi, theta = sph$theta, I = rep(1,nrow(sph))) > hp <-HPDataFrame(df1, auto.spix = TRUE, nside = 1024) > plot(hp, size = 3, col = "darkgreen", back.col = "white") Some other examples of converting directional and star-shaped data into rcosmo formats are given in (Fryer and Olenko, 2019).…”