firedpy icon indicating copy to clipboard operation
firedpy copied to clipboard

not important but would be cool: id numbers generated from centroid and start date

Open admahood opened this issue 5 years ago • 3 comments

totally a random thought. what if we had a number for the start date (days since 1970) combined with the lat/long of the centroid as the seed to generate an alphanumeric code for the id number. that way independent iterations of firedpy would come up with the exact same id numbers for the same events.

examplecode from R. library(tidyverse)

days_from_1970 <- Sys.Date() %>% as.numeric my_house <- c(40.019786, -105.266943)

set.seed(sum(days_from_1970, my_house)) stringi::stri_rand_strings(n = 1, length = 10) [1] "KrSDx6y6oU"

set.seed(sum(days_from_1970, my_house)) stringi::stri_rand_strings(n = 1, length = 10) [1] "KrSDx6y6oU"

admahood avatar Sep 18 '20 18:09 admahood

Another thought on this - use lat long for the centroid, that way it's more easily understood

admahood avatar May 21 '21 15:05 admahood

like... id is just N40019786W105266943m6d22y1980

admahood avatar May 21 '21 15:05 admahood

It looks like this one was done? See also: #35

mikoontz avatar Jul 09 '21 18:07 mikoontz