Driver code to run the big steps of pre-processing the data.
First, all the script parameters are loaded by reading the
config_fileand this config is unpacked. All the csv files within a specified directory are found and returned as
csv_files, along with each file’s year, month, and zone in
Then, these csv files are read and organized into a large set of trajectories ordered by id (mmsi). Finally, these trajectories are discretized before being written into an output csv containing only rows of id-state-action-state transitions.
Another yaml file is written to
meta_fileto specify the final grid parameters, output directories, and the year, month, and zone of all the files read in.