grid_emis it is sort of the opposite of emis_grid. It allocates gridded emissions into streets. This function applies emis_dist into each grid cell using lapply. This function is in development and pull request are welcome.

grid_emis(spobj, g, top_down = FALSE, sr, pro, char, verbose = FALSE)



A spatial dataframe of class "sp" or "sf". When class is "sp" it is transformed to "sf".


A grid with class "SpatialPolygonsDataFrame" or "sf". This grid includes the total emissions with the column "emission". If profile is going to be used, the column 'emission' must include the sum of the emissions for each profile. For instance, if profile covers the hourly emissions, the column 'emission' bust be the sum of the hourly emissions.


Logical; requires emissions named `emissions` and allows to apply profile factors. If your data is hourly emissions or a a spatial grid with several emissions at different hours, being each hour a column, it is better to use top_down = FALSE. In this way all the hourly emissions are considered, however, eah hourly emissions has to have the name "V" and the number of the hour like "V1"


Spatial reference e.g: 31983. It is required if spobj and g are not projected. Please, see


Numeric, Matrix or data-frame profiles, for instance, pc_profile.


Character, name of the first letter of hourly emissions. New variables in R start with letter "V", for your hourly emissions might start with letter "h". This option applies when top_down is FALSE. For instance, if your hourly emissions are: "h1", "h2", "h3"... `char`` can be "h"


Logical; to show more info.


Your gridded emissions might have flux units (mass / area / time(implicit)) You must multiply your emissions with the area to return to the original units.