| Title: | Pollutants Emissions and Gaseous of the Atmosphere |
|---|---|
| Description: | Elaboration of fix emissions inventories, consisting in four stages, pre-processing activity data, preparing emissions factors, estimating the emissions and post-processing of emissions in maps and databases. More details in <doi:>. Before using PEGA you need to know the industrial composition of your study area, in other words, the combination of industrial type, size and fuel of the fleet. Then, it is recommended to start with the project to download a template to create a structure of directories and scripts. |
| Authors: | Sergio Ibarra-Espinosa [aut] (ORCID: <https://orcid.org/0000-0002-3162-1905>), Iara Silva [ctb] (ORCID: <https://orcid.org/0000-0003-1306-5906>), Tailine Santos [cre] (ORCID: <https://orcid.org/0000-0001-7723-9050>) |
| Maintainer: | Tailine Santos <[email protected]> |
| License: | GPL |
| Version: | 0.9.8 |
| Built: | 2026-05-14 15:30:36 UTC |
| Source: | https://github.com/atmoschem/pega |
Inventory structure
ef(nfr = "1.A.1.a", fuel, pollutant, returnfdb = FALSE)ef(nfr = "1.A.1.a", fuel, pollutant, returnfdb = FALSE)
nfr |
nomenclature for reporting, one or many |
fuel |
String for type of fuel. |
pollutant |
String for pollutant. |
returnfdb |
logical return directly db |
Return a data.table
{ ef() }{ ef() }
get features.
esri_to_sf_geom(json_feats, geom_type, crs = 4326)esri_to_sf_geom(json_feats, geom_type, crs = 4326)
json_feats |
Character |
geom_type |
Character. |
crs |
CRS. |
## Not run: # do not run ## End(Not run)## Not run: # do not run ## End(Not run)
get features.
esri_to_sf_point(features)esri_to_sf_point(features)
features |
Character |
## Not run: # do not run ## End(Not run)## Not run: # do not run ## End(Not run)
get features.
esri_to_sf_polygon(features)esri_to_sf_polygon(features)
features |
Character |
## Not run: # do not run ## End(Not run)## Not run: # do not run ## End(Not run)
get features.
esri_to_sf_polyline(features)esri_to_sf_polyline(features)
features |
Character |
## Not run: # do not run ## End(Not run)## Not run: # do not run ## End(Not run)
get features.
get_esri_features( url = paste0("http://portal1.snirh.gov.br/ana/", "rest/services/Esta%C3%A7%C3%B5es_da_", "Rede_Hidrometeorol%C3%B3gica_Nacional", "_em_Opera%C3%A7%C3%A3o/MapServer/1"), query_url = paste(url, "query", sep = "/"), fields = c("*"), where = "1=1", token = "" )get_esri_features( url = paste0("http://portal1.snirh.gov.br/ana/", "rest/services/Esta%C3%A7%C3%B5es_da_", "Rede_Hidrometeorol%C3%B3gica_Nacional", "_em_Opera%C3%A7%C3%A3o/MapServer/1"), query_url = paste(url, "query", sep = "/"), fields = c("*"), where = "1=1", token = "" )
url |
Character, default . |
query_url |
Character. |
fields |
description |
where |
Character. |
token |
Character. |
## Not run: # do not run (geom_type <- layer_info()$geometryType) # rede url1 = paste0("http://portal1.snirh.gov.br/ana/", "rest/services/Esta%C3%A7%C3%B5es_da_", "Rede_Hidrometeorol%C3%B3gica_Nacional", "_em_Opera%C3%A7%C3%A3o/MapServer/1") # hidroweb url1 = paste0("http://portal1.snirh.gov.br/ana/", "rest/services/Esta%C3%A7%C3%B5es_da_", "Rede_Hidrometeorol%C3%B3gica_Nacional", "_em_Opera%C3%A7%C3%A3o/MapServer/4") esri_features <- get_esri_features(url2) simple_features <- esri_to_sf_geom(esri_features, geom_type = geom_type) ## End(Not run)## Not run: # do not run (geom_type <- layer_info()$geometryType) # rede url1 = paste0("http://portal1.snirh.gov.br/ana/", "rest/services/Esta%C3%A7%C3%B5es_da_", "Rede_Hidrometeorol%C3%B3gica_Nacional", "_em_Opera%C3%A7%C3%A3o/MapServer/1") # hidroweb url1 = paste0("http://portal1.snirh.gov.br/ana/", "rest/services/Esta%C3%A7%C3%B5es_da_", "Rede_Hidrometeorol%C3%B3gica_Nacional", "_em_Opera%C3%A7%C3%A3o/MapServer/4") esri_features <- get_esri_features(url2) simple_features <- esri_to_sf_geom(esri_features, geom_type = geom_type) ## End(Not run)
get features.
get_esri_features_by_ids( ids, url = paste0("http://portal1.snirh.gov.br/ana/", "rest/services/Esta%C3%A7%C3%B5es_da_", "Rede_Hidrometeorol%C3%B3gica_Nacional", "_em_Opera%C3%A7%C3%A3o/MapServer/1"), query_url = paste(url, "query", sep = "/"), fields = c("*"), token = "", ssl = FALSE, simplifyDataFrame = FALSE, simplifyVector = FALSE, full = FALSE )get_esri_features_by_ids( ids, url = paste0("http://portal1.snirh.gov.br/ana/", "rest/services/Esta%C3%A7%C3%B5es_da_", "Rede_Hidrometeorol%C3%B3gica_Nacional", "_em_Opera%C3%A7%C3%A3o/MapServer/1"), query_url = paste(url, "query", sep = "/"), fields = c("*"), token = "", ssl = FALSE, simplifyDataFrame = FALSE, simplifyVector = FALSE, full = FALSE )
ids |
Integer. |
url |
Character. |
query_url |
Character. |
fields |
Character. |
token |
Character. |
ssl |
Logical, default = FALSE. |
simplifyDataFrame |
Logical, default = FALSE. |
simplifyVector |
Logical, default = FALSE. |
full |
Logical, default = FALSE. |
## Not run: # do not run ids <- get_object_ids() feat <- get_esri_features_by_ids(ids = ids) ## End(Not run)## Not run: # do not run ids <- get_object_ids() feat <- get_esri_features_by_ids(ids = ids) ## End(Not run)
get layer info.
get_object_ids( url = paste0("http://portal1.snirh.gov.br/ana/", "rest/services/Esta%C3%A7%C3%B5es_da_", "Rede_Hidrometeorol%C3%B3gica_Nacional", "_em_Opera%C3%A7%C3%A3o/MapServer/1"), query_url = paste(url, "query", sep = "/"), where = "1=1", token = "", ssl = FALSE, full = FALSE )get_object_ids( url = paste0("http://portal1.snirh.gov.br/ana/", "rest/services/Esta%C3%A7%C3%B5es_da_", "Rede_Hidrometeorol%C3%B3gica_Nacional", "_em_Opera%C3%A7%C3%A3o/MapServer/1"), query_url = paste(url, "query", sep = "/"), where = "1=1", token = "", ssl = FALSE, full = FALSE )
url |
Character . |
query_url |
Character. |
where |
Character. |
token |
Character. |
ssl |
Logical, default = FALSE. |
full |
Logical, default = FALSE. |
## Not run: # do not run a <- get_object_ids() head(a) a <- get_object_ids(full = T) names(a) a$objectIds ## End(Not run)## Not run: # do not run a <- get_object_ids() head(a) a <- get_object_ids(full = T) names(a) a$objectIds ## End(Not run)
create directories
inventory(path, nfr = "all", dict, return_dict = TRUE)inventory(path, nfr = "all", dict, return_dict = TRUE)
path |
Character, default . |
nfr |
String, nomenclature for ereporting, default "all" |
dict |
String with file name to add description notes in a csv. |
return_dict |
Logical, to retunr dictionary as object |
## Not run: # do not run ## End(Not run)## Not run: # do not run ## End(Not run)
get layer info.
layer_info( url = paste0("http://portal1.snirh.gov.br/ana/", "rest/services/Esta%C3%A7%C3%B5es_da_", "Rede_Hidrometeorol%C3%B3gica_Nacional", "_em_Opera%C3%A7%C3%A3o/MapServer/1"), token = "", ssl = FALSE )layer_info( url = paste0("http://portal1.snirh.gov.br/ana/", "rest/services/Esta%C3%A7%C3%B5es_da_", "Rede_Hidrometeorol%C3%B3gica_Nacional", "_em_Opera%C3%A7%C3%A3o/MapServer/1"), token = "", ssl = FALSE )
url |
Character, default . |
token |
Character. |
ssl |
Logical, default = FALSE. |
## Not run: # do not run a <- layer_info() names(a) a$geometryType ## End(Not run)## Not run: # do not run a <- layer_info() names(a) a$geometryType ## End(Not run)