sekhongurkirat / SpatioTemporal-Influx-Detection-Spa.T.I.D-

1 stars 0 forks source link

Meeting 02.20 #1

Open vr00n opened 3 years ago

vr00n commented 3 years ago
vr00n commented 3 years ago

Hey @sekhongurkirat

So I was able to fine tune my analysis.

1. I created Fixed 1-HOUR TIME resolution Bins "YYYY-MM-DD:HH" Ex: 2020-01-01:13

2. I created SPACE Resolution Bins by controlling LEFT(HEX_ID,n) where n = the resolution. _ n=9 implies higher resolution/smaller hexagons n=7 implies lower resolutions / larger hexagons

Example: for n = 9 ; 892a100d2 for n = 7 ; 892a100 _

3. I created a CALL THRESHOLD because we only care about those instances of SPACE & TIME that cross a certain threshold.

By changing 1,2,3 - I receive an output of specific instances of SPACE & TIME that breached the CALL THRESHOLD These specific instances are the ALARMS.

Therefore the goal of this project is to SCAN the given dataset for different values of SPACE,TIME,CALL-THRESHOLD values

python scan_script.py dataset.csv hex-res=8 time-bin=30 threshold=12 should split the dataset into:


As you can see in the image below, I have set hex resolution at 8, the time resolution = 60 minutes (1 hour bins) and call threshold = 30.

The ALARMS table shows you the list of dates and HEX IDs where the call threshold exceeded 30.

On Jan 1 2020 @ 12 AM 4 ALARMS were generated at HEX IDs 892a100a, 892100c, 892a100d, 892a1008

image

sekhongurkirat commented 3 years ago

Hi @vr00n I have created the function that takes in spatiotemporal dataframe, time bin (in minutes) and threshold of number of incidents in the hex at the same time bin of the day The output is the dataframe which shows the incident date, time bin, hexid and number of incidents reported ews function

sekhongurkirat commented 3 years ago

This is helpful in pointing out the location and time for a given threshold of incidents within a specified time bin In the above function the time bin is 30 minutes and alert is generated for all locations and dates with any incident reported (threshold=0) within that 30 minute time bin

sekhongurkirat commented 3 years ago

I think next course should be to granulate the alerts based on hex id and the time bins specified as same threshold would not be useful for each of the hexid What do you think?

vr00n commented 3 years ago

Absolutely Go for it! Did you see the updates I made to the README? I believe I said the same thing for v0.2.

Before getting there, I would like to clean up all the ipython code into creating a SINGLE executable python script that takes an input file, arguments specifying time-space-threshold conditions , and outputting the alarms.

sekhongurkirat commented 3 years ago

Absolutely Go for it! Did you see the updates I made to the README? I believe I said the same thing for v0.2.

Before getting there, I would like to clean up all the ipython code into creating a SINGLE executable python script that takes an input file, arguments specifying time-space-threshold conditions , and outputting the alarms.

Hi Varun I have uploaded the single script that generates alert. This function takes spatiotemporal dataframe, time bin and spatial resolution as inputs and generates alert for locations where the incident count is greater than 95 percentile of incidents reported in that time bin for that paticular location.

What time works for you in the evening for call? @vr00n

sekhongurkirat commented 3 years ago

I think average is not an accurate metric for threshold. Lets talk about it on the call?