Description Usage Arguments Value Examples
queryCgls
creates basic tables by conglomerate-date.
1 2 |
database |
Connection to an existing postgresql or sqlite database (as
returned by |
state |
Character vector of Mexican states to include in the searh, defaults to "all". |
organization |
Character vector of organizations to include in the search (CONAFOR, CONANP, FMCN), defaults to "all". |
cgl_id |
Character vector of conglomerate ids to include in the searh, defaults to "all". |
year_visit |
Numeric vector indicating the year(s) to include in the search, defaults to 2014:2016. |
month_visit |
Numeric vector indicating the month(s) to include in the search, defaults to 1:12. |
A data.frame
where each line corresponds to a
conglomerate-date, filtered by state
, organization
,
cgl_id
, year
, and month
, the data.frame
includes conglomerate name, coordinates of the conglomerate center, date of
visit, organization, state, municipality, monitoring type, vegetation, and
perturbated.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # connect to sqlite database (snmb)
database <- dplyr::src_sqlite(system.file("extdata", "snmb.sqlite",
package = "querysnmb"))
cgl_table <- queryCgls(database)
cgl_table <- queryCgls(database, organization = "CONAFOR", year = 2014)
## Not run:
# connect to postgreSQL database (snmb)
PASS_SNMB = Sys.getenv("PASS_SNMB")
database <- dplyr::src_postgres(dbname = "snmb", host = "dbms", user =
"snmb", password = PASS_SNMB)
cgl_table <- queryCgls(database)
cgl_table <- queryCgls(database, organization = "CONAFOR", year = 2014)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.