Questions tagged [gaps-in-data]

refers to gaps (zero, undefined or nonexistent elements) in data structures and sequences.

75 questions
36
votes
9 answers

hibernate oracle sequence produces large gap

I am using hibernate 3 , oracle 10g. I have a table: subject. The definition is here CREATE TABLE SUBJECT ( SUBJECT_ID NUMBER (10), FNAME VARCHAR2(30) not null, LNAME VARCHAR2(30) not null, EMAILADR VARCHAR2 (40), …
sse
  • 1,151
  • 2
  • 14
  • 26
6
votes
4 answers

Fill the table with data for missing date (postgresql, redshift)

I'm trying to fill daily data for missing dates and can not find an answer, please help. My daily_table example: url | timestamp_gmt | visitors | hits | other.. -------------------+---------------+----------+-------+------- …
5
votes
3 answers

How to replace a specific sequence of numbers (per row) with another sequence in a big data frame in R?

I have a data.frame with absence/presence data (0/1) for a group of animals, with columns as years and rows as individuals. My data: df <- data.frame(Year1 = c('1','0','0','0','0','0'), Year2 = c('1','1','1','0','0','0'), …
5
votes
1 answer

Fill datetimeindex gap by NaN

I have two dataframes which are datetimeindexed. One is missing a few of these datetimes (df1) while the other is complete (has regular timestamps without any gaps in this series) and is full of NaN's (df2). I'm trying to match the values from df1…
tg359x
  • 53
  • 1
  • 5
5
votes
2 answers

R: How do I change gaps (holidays) in a time series of a daily index of the stock exchange by the previous day's information?

I'm usin R language and working with time series daily stock index from differents countries. In order to make comparisons between of differents indexes,(like correletaion, causality etc..) I need that all the series have the same number of lines,…
4
votes
1 answer

Forming groups of spatio-temporally near trajectories in R or PostgreSQL

I'm doing some trajectory analysis using R and PostgreSQL. In order to form groups of trajectory segments where successive positions are spatio-temporally near, I've created the following table. What I'm still missing is the column group_id, which…
3
votes
5 answers

Checking if booking is possible in SQL (Postgresql)

I have table booking with such looking records: id | from | to ------+---------------------+--------------------- 101 | 2015-09-24 08:00:00 | 2015-09-24 09:30:00 2261 | 2015-09-24 09:00:00 | 2015-09-24 10:00:00 4061 |…
Sławosz
  • 11,187
  • 15
  • 73
  • 106
2
votes
4 answers

yet another date gap-fill SQL puzzle

I'm using Vertica, which precludes me from using CROSS APPLY, unfortunately. And apparently there's no such thing as CTEs in Vertica. Here's what I've got: t: day | id | metric | d_metric -----------+----+--------+---------- 2011-12-01 | 1 |…
kimbo305
  • 662
  • 3
  • 11
2
votes
3 answers

C:Split wav file by silence gap

I have a bunch human reading simple sentence (hello world) as a wav file, How can I break the wav file for 2 wav files each contains word (hello and world) by automatically recognizing the gap between the words? Unfortunately I was unable to find…
JavaSheriff
  • 7,074
  • 20
  • 89
  • 159
2
votes
3 answers

Highlight data gaps on ggplot graph

I have timeseries (datetime, Instance, Value) with some NAs in Values. If Value for all Instance - NA for same datetime, that means gap in data collection. I need to highlight that periods. My example script and…
Maxim
  • 301
  • 1
  • 9
2
votes
3 answers

How to missing numbers by 100s in oracle

I need to find the missing numbers in a table column in oracle, where the missing numbers must be taken by 100s , meaning that if it's found 1 number at least between 2000 and 2099 , all missing numbers between 2000 and 2099 must be returned and so…
user123
  • 387
  • 1
  • 4
  • 13
2
votes
3 answers

Gaps and island fails with 3 columns using SQL Server

I have come across a strange behavior with the gaps and island solution. With 3 columns (3rd column being non integer), the result is random really. Let's suppose we the following query: Declare @Table1 TABLE ( ID varchar(50), yr float, …
Simran
  • 55
  • 6
2
votes
1 answer

How to find out the gaps in python pandas dataframe column (date format)?

I have one pandas Dataframe like below: name,year AAA,2015-11-02 22:00:00 AAA,2015-11-02 23:00:00 AAA,2015-11-03 00:00:00 AAA,2015-11-03 01:00:00 AAA,2015-11-03 02:00:00 AAA,2015-11-03 05:00:00 ZZZ,2015-09-01 00:00:00 ZZZ,2015-11-01…
ketan
  • 2,732
  • 11
  • 34
  • 80
1
vote
1 answer

Need to have non NaN value within same sampling window in a DataFrame

I am trying to write an implementation of the GAPS operator in Kairos in Python. What the GAPS operator does is introduces NaN values where there is no data point based on the sampling frequency. ` This an example in a sample dataset: import pandas…
nkstack
  • 11
  • 2
1
vote
4 answers

How to fill gaps in anomaly detection data using pandas?

Assume I have a pandas DataFrame that only consists of 0 and 1 depending if an anomaly was detected or not: input_data = pd.DataFrame(data={'my_event': [0., 0., 1., 1., 0., 1., 0., 0., 0., 1., 1.]}, …
Axel
  • 1,415
  • 1
  • 16
  • 40
1
2 3 4 5