flowmapblue.R icon indicating copy to clipboard operation
flowmapblue.R copied to clipboard

time and tab support?

Open akimpt opened this issue 4 years ago • 3 comments

Thanks, I am a huge fan of flowmapblue and especially excited by flowmapblue.R since R is my preferred language. In the past, I have been able to include a “time” column and multiple “category” tabs via Googlesheets for the live version of flowmap.blue and so I was hoping I could produce similar results for flowmapblue.R.

While flowmapblue.R seems to identify a “time” column, I am uncertain about the required data type since I have tried both character strings of “YYYY” and “YYYY-MM-DD HH:MM:SS” AND these timestamps converted to numeric since flowmapblue.R seems to be counting from 1970:

image

If this is an intended feature, what is the required data type for time? Also if categories are an intended feature, how can I provide multiple tables as an arguement? Thanks again, Anthony

akimpt avatar Jun 23 '21 06:06 akimpt

I am still uncertain of the required time format however I have found that using lubridate to convert to a timestamp, then converting to absolute time using "as.integer()" and then multiplying by 1000 works (e.g., "mutate(time = lubridate::year(time_year), time = as.integer(time) * 1000)") provides the required time format and so perhaps there is some absolute time format that employs thousandths of a second.

akimpt avatar Jan 10 '22 07:01 akimpt

@akimpt so does this worked for you?

rhs94 avatar May 06 '23 08:05 rhs94

@akimpt advise by @akimpt works for me. If you have date data type, then as.integer(as.POSIXct(your_date_object))*1000 and save it to time column in the dataset

e-kotov avatar Jul 04 '24 15:07 e-kotov

@akimpt @rhs94 in the latest version of the package in the main branch, you can now simply use the Date or POSIXct objects and the package will handle the conversion to integer auto-magically.

e-kotov avatar Aug 30 '24 12:08 e-kotov

Is it possible to have time withoute year/date? so the timeline is only with time hour and minute? Even though my time column is only with hour and minute I got date in the text above time line in the text/interval/title Hope my question make sense!

rhs94 avatar Jan 03 '25 20:01 rhs94

@rhs94 I don't think it is possible. Even if you only have time, you have to come up with a fake date. At least that is what is possible right now with the package as it is.

e-kotov avatar Jan 06 '25 22:01 e-kotov