main¶
-
process_ais_data.main()¶ Driver code to run the big steps of pre-processing the data.
First, all the script parameters are loaded by reading the
.yamlconfig_fileand this config is unpacked. All the csv files within a specified directory are found and returned ascsv_files, along with each file’s year, month, and zone inall_files_meta.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.