Package 'pega'

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

Help Index


Inventory structure

Description

Inventory structure

Usage

ef(nfr = "1.A.1.a", fuel, pollutant, returnfdb = FALSE)

Arguments

nfr

nomenclature for reporting, one or many

fuel

String for type of fuel.

pollutant

String for pollutant.

returnfdb

logical return directly db

Value

Return a data.table

Examples

{
  ef()
}

get features

Description

get features.

Usage

esri_to_sf_geom(json_feats, geom_type, crs = 4326)

Arguments

json_feats

Character

geom_type

Character.

crs

CRS.

See Also

layer_info

Examples

## Not run: 
# do not run

## End(Not run)

get features

Description

get features.

Usage

esri_to_sf_point(features)

Arguments

features

Character

See Also

layer_info

Examples

## Not run: 
# do not run

## End(Not run)

get features

Description

get features.

Usage

esri_to_sf_polygon(features)

Arguments

features

Character

See Also

layer_info

Examples

## Not run: 
# do not run

## End(Not run)

get features

Description

get features.

Usage

esri_to_sf_polyline(features)

Arguments

features

Character

See Also

layer_info

Examples

## Not run: 
# do not run

## End(Not run)

get features

Description

get features.

Usage

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 = ""
)

Arguments

url

Character, default .

query_url

Character.

fields

description

where

Character.

token

Character.

See Also

layer_info

Examples

## 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

Description

get features.

Usage

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
)

Arguments

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.

See Also

layer_info

Examples

## Not run: 
# do not run
ids <- get_object_ids()
feat <- get_esri_features_by_ids(ids = ids)

## End(Not run)

get layer info

Description

get layer info.

Usage

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
)

Arguments

url

Character .

query_url

Character.

where

Character.

token

Character.

ssl

Logical, default = FALSE.

full

Logical, default = FALSE.

See Also

layer_info

Examples

## Not run: 
# do not run
a <- get_object_ids()
head(a)
a <- get_object_ids(full = T)
names(a)
a$objectIds

## End(Not run)

start inventory structure

Description

create directories

Usage

inventory(path, nfr = "all", dict, return_dict = TRUE)

Arguments

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

Examples

## Not run: 
# do not run

## End(Not run)

get layer info

Description

get layer info.

Usage

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
)

Arguments

url

Character, default .

token

Character.

ssl

Logical, default = FALSE.

See Also

layer_info

Examples

## Not run: 
# do not run
a <- layer_info()
names(a)
a$geometryType

## End(Not run)