Visualizing time series in spirals using R or Python? -


does know how in r? is, represent cyclical data left plot right plot?

http://cs.lnu.se/isovis/courses/spring07/dac751/papers/timespiralsinfovis2001.pdf

enter image description here

here example data.

day = c(rep(1,5),rep(2,5),rep(3,5)) hour = rep(1:5,3) sunlight = c(0,1,2,3,0,1,2,3,2,1,0,0,4,2,1) data = cbind(day,hour,sunlight) 

enter image description here

this seems pretty close:

# sample data - hourly 10 days; daylight 6:00am 6:00pm set.seed(1)     # reproducibility day  <- c(rep(1:10,each=24)) hour <- rep(1:24) data <- data.frame(day,hour) data$sunlight <- with(data,-10*cos(2*pi*(hour-1+abs(rnorm(240)))/24)) data$sunlight[data$sunlight<0] <- 0  library(ggplot2) ggplot(data,aes(x=hour,y=10+24*day+hour-1))+   geom_tile(aes(color=sunlight),size=2)+   scale_color_gradient(low="black",high="yellow")+   ylim(0,250)+ labs(y="",x="")+   coord_polar(theta="x")+   theme(panel.background=element_rect(fill="black"),panel.grid=element_blank(),         axis.text.y=element_blank(), axis.text.x=element_text(color="white"),         axis.ticks.y=element_blank()) 

Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -