File Not present
Deepak3994 opened this issue · 8 comments
Hi,
I have downloaded all the zip files as well as the large csv file "Next_Generation_Simulation__NGSIM__Vehicle_Trajectories_and_Supporting_Data.csv" , but i couldnt find few parameters such as {DatasetID, Lateral maneuver, Longitudinal maneuver}. May i know where i can find those data fields?
As mentioned in the "preprocess_data.m" the below files are not present in the zip files which i have downloaded.
us101_1 = 'raw/us101-0750-0805.txt';
us101_2 = 'raw/us101-0805-0820.txt';
us101_3 = 'raw/us101-0820-0835.txt';
i80_1 = 'raw/i80-1600-1615.txt';
i80_2 = 'raw/i80-1700-1715.txt';
i80_3 = 'raw/i80-1715-1730.txt';
Kindly help.
Hi, the files may have different names. There should be three files in the US 101 dataset and three in the I-80 dataset, unless they changed the data format.
Hi,
If you have the same dataset format which you have used, can you share that to me?
I think the data formats have been changed.
I think you should export the data by yourself. Here you have code to get the three recording sessions for the us-101. Hope it helps...
import pandas as pd
import numpy as np
import os
import matplotlib.pyplot as plt
from datetime import datetime, timedelta
file_ = os.path.join('./data','Next_Generation_Simulation__NGSIM__Vehicle_Trajectories_and_Supporting_Data.csv')
ngisim_data = pd.read_csv(file_)
#%%
us_101 = ngisim_data[ngisim_data['Location'] == 'us-101']
#%%
us_101= us_101.sort_values(['Global_Time'])
#%% Time difference from the beginning of the recordings
time_difs_from_0 = us_101.Global_Time.values - us_101.Global_Time.values[0]
#%%Get recording sessions
masks = np.zeros((len(us_101),3)).astype(np.bool)
LAG = 60*15*1E3 #Each sessions lasts 15 minutes and are consecutive
guard = 60*1E3 #one minute of guard interval
for sess in range(3):
mask_1 = time_difs_from_0 >= sess*LAG + (sess > 0)*guard
mask_2 = time_difs_from_0 < (sess+1)*LAG + guard
masks[:,sess]= mask_1*mask_2
#%%
us_101_sess_1 = us_101[masks[:,0]]
us_101_sess_2 = us_101[masks[:,1]]
us_101_sess_3 = us_101[masks[:,2]]
@Deepak3994 Not changed. As I just tested the latest version of datasets. You just need to change the files' name in preprocess_data.m
Hi,
I have downloaded all the zip files as well as the large csv file "Next_Generation_Simulation__NGSIM__Vehicle_Trajectories_and_Supporting_Data.csv" , but i couldnt find few parameters such as {DatasetID, Lateral maneuver, Longitudinal maneuver}. May i know where i can find those data fields?
As mentioned in the "preprocess_data.m" the below files are not present in the zip files which i have downloaded.
us101_1 = 'raw/us101-0750-0805.txt';
us101_2 = 'raw/us101-0805-0820.txt';
us101_3 = 'raw/us101-0820-0835.txt';
i80_1 = 'raw/i80-1600-1615.txt';
i80_2 = 'raw/i80-1700-1715.txt';
i80_3 = 'raw/i80-1715-1730.txt';Kindly help.
hello ,I did not find the data set of i-80, may I ask whether it is put in the same data set as us-101?
I think you should export the data by yourself. Here you have code to get the three recording sessions for the us-101. Hope it helps...
import pandas as pd import numpy as np import os import matplotlib.pyplot as plt from datetime import datetime, timedelta file_ = os.path.join('./data','Next_Generation_Simulation__NGSIM__Vehicle_Trajectories_and_Supporting_Data.csv') ngisim_data = pd.read_csv(file_) #%% us_101 = ngisim_data[ngisim_data['Location'] == 'us-101'] #%% us_101= us_101.sort_values(['Global_Time']) #%% Time difference from the beginning of the recordings time_difs_from_0 = us_101.Global_Time.values - us_101.Global_Time.values[0] #%%Get recording sessions masks = np.zeros((len(us_101),3)).astype(np.bool) LAG = 60*15*1E3 #Each sessions lasts 15 minutes and are consecutive guard = 60*1E3 #one minute of guard interval for sess in range(3): mask_1 = time_difs_from_0 >= sess*LAG + (sess > 0)*guard mask_2 = time_difs_from_0 < (sess+1)*LAG + guard masks[:,sess]= mask_1*mask_2 #%% us_101_sess_1 = us_101[masks[:,0]] us_101_sess_2 = us_101[masks[:,1]] us_101_sess_3 = us_101[masks[:,2]]
I have used your code, and convert it into txt by us_101_sess_1.to_csv('us_101_sess_1.txt',sep='\t',index=False,header=None)
,
but the txt can't be loaded by matlab
Loading data... Error using load Unknown text on line number 1 of ASCII file raw/1_index_false_header_none.txt "s-101 ".
Could you please show us more about your convert code?
Hello all. I faced the same issue. I am sorry that I am positing this answer so long after it has been opened, but I hope it might be useful for other people who may stumble upon the same.
The links to us-101 files can be found here:
https://drive.google.com/file/d/14dMKew22_5evfOoSGEBYqHP3L92e7nyJ/view
The links to i-80 files can be found here:
https://drive.google.com/file/d/19ovxiJLCnS1ar1dYvUIrfdz_UnGejK-k/view
Note: The files of i-80 in this link are same as the files required by the code. Only the timing conventions of the earlier is as 0400-0415.... and in the latter is 1600-1615 .... (12hr to 24hr naming difference).
If the above links are dead, please let me know, as I have a backup of these files on my hard drive.
Hope this helps.
大家好。我遇到了同样的问题。我很抱歉,在打开这个答案很久之后,我就提出了这个答案,但我希望它可能对其他可能偶然发现同样答案的人有用。
可以在这里找到us-101文件的链接:https://drive.google.com/file/d/14dMKew22_5evfOoSGEBYqHP3L92e7nyJ/view
i-80文件的链接可以在这里找到:https://drive.google.com/file/d/19ovxiJLCnS1ar1dYvUIrfdz_UnGejK-k/view
注意:此链接中的i-80文件与代码所需的文件相同。只有较早的计时约定是0400-0415....在后者是1600-1615....(12小时至24小时命名差异)。
如果上面的链接是死的,请让我知道,因为我的硬盘驱动器上有这些文件的备份。
希望这有帮助。
@NishanthARao Hello, I can't open your link. Can you share your file with me,please?