\donttest{}) skip the multi-year habitat-trend reads or
use a single species, so R CMD check --as-cran, which runs them, stays as
fast as before the trend was introduced.iucn_category_B(), iucn_category_B_range() and iucn_criterion_B() now
raise the EOO to the AOO when it is smaller (IUCN Guidelines sect. 4.10),
so a few clustered points no longer receive a CR B1 flag from a tiny hull.iucn_criterion_B() writes the code in the official notation, repeating the
sub-criteria per axis ("EN B1ab(iii)+2ab(iii)" instead of "EN B1+2ab(iii)").calc_locations(method_protected = "no_more_than_one") counts nested or
overlapping protected areas (e.g. a park inside an APA) once, using the
smallest set of areas that holds every inside occurrence.calc_aoh(), map_aoh() and fragment_habitat() with the default
year = NULL now use the latest year of the product instead of failing
silently to NA when no src is given.calc_aoo() and calc_locations() are reproducible: grid translations follow
a deterministic lattice instead of runif(), so no seed is needed.iucn_category_B() is vectorised (works on whole summary columns).assess_species() measures the natural area of the range at six years over
the last decline_years (new argument, default 10) and infers a decline only
when the linear slope is negative and significant (p < 0.05). Before, any
converted pixel in the range triggered the inference, which made
assume_decline = FALSE ineffective in converted landscapes. The slope and
its p-value are returned as habitat_trend_pct_yr and habitat_trend_p.calc_aoh() reads land cover within max_pixels: large MapBiomas windows are
decimated on read instead of streamed at native resolution, and the majority
(modal) aggregation, which under-counted fragmented habitat, was replaced by
unbiased nearest-neighbour sampling.laea_crs() uses the circular mean
longitude and calc_eoo() builds the hull on the short side of the globe.assess_species(fire = TRUE, initiative = "auto") skips fire per species
outside Brazil instead of querying MapBiomas Fire for them.calc_aoo() and calc_locations() now test 100 grid offsets by default
(cheap with the deterministic lattice, and closer to the true minimum).countries_of_occurrence() derives the countries of occurrence (each
flagged Extant / Possibly Extant) and an approximate biogeographical
realm by intersecting the range with the Natural Earth country base map
(needs the new rnaturalearth suggestion). These are the required /
recommended Red List supporting fields.aoo_bounds() brackets the AOO between a lower bound (the
occurrence-based occupied cells) and an upper bound (the Area of
Habitat — the natural/suitable habitat within the EOO, capped at the EOO),
following Brooks et al. (2019), and returns the resulting B2 category
range so the diagnosis reports the uncertainty explicitly.assess_fragmentation() clusters occurrences into subpopulations by a
user-set isolation distance and quantifies the share of the population
in small subpopulations (a screening proxy after Santini et al. 2019),
to guide severe fragmentation (sub-criterion a). It is never ticked
automatically — the judgement stays with the assessor.iucn_category_B_range() combines the fixed EOO (B1) with the bracketed
AOO (B2) into the plausible range of screening categories under
uncertainty (size only), surfaced on the new Assessment tab.elevatr suggestion (AWS Terrain Tiles, no account) or a
user-supplied DEM:
elevation_preferences() extracts the elevation of each occurrence and
suggests the species' elevation limits (min rounded down, max rounded up
to the nearest 100 m, as sRedList does).calc_aoh() computes the Area of Habitat as the suitable (natural) land
cover within the range, optionally masked to an elevation band, reusing
the package's own land-cover backends and summarise_conversion(). On the
Habitat & AOO tab the elevation-refined AOH replaces the plain
natural-habitat proxy as the habitat-based upper AOO bound, sharpening the
B2 category range. Both degrade gracefully to NA when a DEM or land
cover is unavailable.calc_aoh() now also returns aoo_upper_km2 - the AOH rescaled
to the IUCN reference scale (the 2 x 2 km cells that intersect the suitable
habitat, IUCN 4.10.7 condition iii) - which the Habitat & AOO tab uses as the
AOO upper bound instead of the raw habitat area. It returns two validation
metrics (Lumbierres et al. 2022): model_prevalence (suitable share of the
range) and point_prevalence (occurrences inside the habitat, from a new
points argument). The tab adds a population-size panel (AOH x density,
with a density calculator: density in occupied habitat x % mature x % of
suitable habitat occupied, and low-high ranges) for criteria C/D.calc_aoh() now returns an AOH range (aoh_km2 strict to aoh_max_km2) via a
new marginal_codes argument. A % of habitat occupied input scales the
potential habitat down to occupied habitat for the AOO upper bound (condition
ii), and a note explains conditions i/ii/iii (validation, occupancy, reference
scale) for using habitat maps to inform AOO/EOO.fragment_habitat() implements the IUCN method (Santini et al. 2019, as in
sRedList): it splits the Area of Habitat into patches, groups patches closer
than the isolation/dispersal distance into subpopulations, and sizes each in
mature individuals (habitat area x density, dropping subpopulations below
two individuals). It returns the fragmentation curve and median subpopulation
size, plus the largest subpopulation's size (Criterion C2a(i)) and its
share of the population (C2a(ii)), and flags severe fragmentation when
50% of the population is in small, isolated subpopulations. On the Fragmentation tab, entering a density (mature individuals per km^2; a range like
3-8is accepted) switches from the occurrence-count proxy to this habitat-and-density method, reusing the suitable classes and elevation band from the Habitat & AOO tab.assess_fragmentation()(occurrence proxy) is kept for when no density is available.
map_aoh() draws the Area of
Habitat (the suitable land-cover classes within the EOO, optionally masked to
the elevation band) as a green Leaflet overlay with the EOO hull and the
occurrence points; on the Habitat & AOO tab a class picker lets the assessor
choose which land-cover classes count as habitat (default: every natural
class), and both the AOH area and the map use that selection. The
Fragmentation tab now maps the subpopulation clusters alongside the
fragmentation curve. calc_aoh() gained a suitable_codes argument so the
measured AOH can be restricted to specific classes.population argument to assessment_report(), as a "Population size
(inferred)" section of the html/text/docx report. It is framed as an
inferred, screening-level figure that informs Criteria C and D.% of habitat occupied derived automatically. On the Habitat tab the
occupancy correction (IUCN 4.10.7 condition ii) is now read from the point
prevalence (the share of occurrences falling in the suitable habitat that
calc_aoh() returns) and shown read-only, instead of a manual field, and the
suitable-class picker is collapsed into an accordion. The tab is renamed from
Habitat & AOO to Habitat.zoom that desynchronised
Leaflet's click coordinates was removed; use the browser's own zoom for a
compact view), points can be dragged to reposition them, and dragging no
longer also drops a spurious extra point.iucn_criterion_B() was reworked so the applied category follows the same
selection logic as ConR's cat_criterion_b() (Dauby et al. 2017): the
estimated number of locations caps the category through sub-criterion (a),
so a range whose EOO/AOO size alone would be CR or EN but that is spread over,
say, eight locations is returned as VU (≤ 10 locations), not EN. The category
is the less threatened of the size-implied and location-implied levels.decline = TRUE. Following ConR — and because mappingAS is built
around habitat-conversion data, which is direct evidence of a continuing
decline in the area/quality of habitat (sub-criterion b(iii)) — a continuing
decline is now assumed when it is not documented. A small-range, few-location
taxon is therefore reported at its CR/EN/VU size-and-location level instead of
NT, giving a result that is more consistent with the IUCN thresholds. Set the
new assume_decline = FALSE (in assess_species() or iucn_criterion_B()),
or decline = FALSE, to restore the strict "NT until a decline is documented"
screening. A new decline_assumed column in the summary flags every species
for which (b) was assumed rather than documented, and the report/Shiny app
label the assumption honestly.assess_species() now infers it from the
conversion data instead of merely assuming it: if land cover ran and the
range holds any converted (anthropic) area, sub-criterion b(iii) (continuing
decline in the area/quality of habitat) is taken as met and recorded as
decline_basis = "inferred (habitat loss)". This has explicit IUCN backing —
the Guidelines (v16, §4.6 and the evidence table in §3.1) allow a continuing
decline in habitat to be inferred "from rate of habitat loss" under
B1b/B2b, at any rate (there is no magnitude threshold for continuing
decline under Criterion B; only Criterion C1 has one). The new decline_basis
column distinguishes "documented", "inferred (habitat loss)", "assumed"
(the ConR-style global fallback, used only when no conversion is available)
and "not documented"; the written report cites the inference. Disable with
infer_decline_from_habitat = FALSE.EN B1ab(v)), the Criterion B
code now carries the roman-numeral element of the continuing decline. When (b)
is inferred from habitat loss the code reads e.g. EN B1ab(iii) — b(iii)
being the continuing decline in the area, extent and/or quality of habitat.
iucn_criterion_B() gains a decline_detail argument for this; it defaults
to none, so an unqualified code such as VU B2ab is unchanged.geom_text() + position_stack() could
drop the labels onto the wrong segment on a horizontal bar). The species-name
box on the map is a single inline-block chip that stays on one line and now
sits behind the whole name, and the donut download button reads
"Save donut (PNG)".par() state modified: the time-series PNG download handler saves and
restores it with on.exit(graphics::par(oldpar)), addressing the CRAN review
note about inst/shiny/app.R.run_app() now restores the user's
shiny.maxRequestSize option with on.exit(options(old)) when the app closes;
all remaining non-ASCII characters were removed from the R source (they were in
comments and one roxygen line); and the copyright-holder role (cph) was added
to Authors@R.man/figures/logo1.png (the
README uses featured_Resultado.png) is now excluded from the build via
.Rbuildignore, bringing the package well under the 5 MB CRAN guideline.tempdir()
(export_ranges(), map_static(), assessment_report(), factsheet_html())
now remove it again, so R CMD check leaves no files behind.coord_cartesian() instead of scale limits, which was dropping the
out-of-bounds segment..docx, and the HTML factsheet,
via new applied_category / applied_code arguments to
assessment_report() and factsheet_html().factsheet_html() gains life_form and
substrate arguments (the system argument is removed).ragg / cairo when available), fixing the previously
unformatted figures.\dontrun{}. Executable examples run directly
(offline, using the bundled data with mapbiomas = FALSE); examples that
read data over the network (MapBiomas, WDPA) use \donttest{}; and
interactive-only entry points (run_app(), mas_plotly()) use
if (interactive()){}.export_ranges() now defaults dir = tempdir() (pass an explicit path to
keep the files), and every example that writes a file writes it under
tempdir().inst/extdata/example_occurrences.csv now ships 29
real herbarium/occurrence records of three campo-de-altitude species from the
Serra dos Orgaos / Serra da Mantiqueira region (Prepusa hookeriana,
Prepusa connata, Worsleya procera), replacing the previous synthetic
points, so the examples screen a realistic multi-species dataset.calc_subpop() and calc_locations(), add the remaining
spatial pieces of an IUCN Criterion B screening. calc_subpop() estimates the
number of subpopulations with the circular-buffer method (a circle around each
occurrence, dissolved; disjoint polygons are counted), using a default radius
of one tenth of the maximum distance between occurrences (Rivers et al.
2010). calc_locations() estimates the number of locations as the number of
occupied cells of a 10 km grid, taking the minimum over randomly translated
grids (the most conservative estimate). Both work on the same data-centred
equal-area projection as the EOO/AOO.
calc_locations() also mirrors ConR's protected-area integration: pass
a protected-area layer (e.g. from protected_areas()) and occurrences
inside protected areas are decoupled from those outside, because a single
threat is not assumed to affect both alike. method_protected =
"no_more_than_one" (default) counts each protected area holding
occurrences as one location; "other" grids the inside and outside groups
separately and adds them.loc_km / grid_km, default
10 km) or a species-specific sliding scale (loc_scale / cell_scale),
a fraction of the maximum distance between occurrences (Rivers et al.
2010).assess_species() now reports n_subpop and n_locations in its summary
(and subpop / locations details), controlled by subpop,
subpop_resol_km, loc_km, loc_scale and loc_method. When
protected = TRUE the location count automatically decouples protected
areas. The written report and the factsheet show the two estimates when
available.vouchers_from_occ() (exported)
derives the "Examined vouchers" list from the occurrence table's own columns:
a ready-made voucher column if present, otherwise collector +
collectorNumber (with a herbarium / institutionCode code added in
parentheses). In the app the vouchers box is filled automatically for the
selected species and refreshed when you switch species, without overwriting
text you typed yourself; a Load vouchers from table button reloads on
demand. Column names are matched case-insensitively from common Darwin Core
and herbarium aliases..docx) and the factsheet no longer asserts
generic drivers ("irreversible urban expansion", "azonal habitat"). It now
names the actual pressures found for the species - the dominant anthropic
land-cover classes within the EOO (with their share) and, when the fire
module was run, the burned fraction of the EOO - and the section is omitted
when there is no such evidence to report.map_interactive = TRUE) - the
same self-contained widget the Maps tab downloads via Download map (HTML),
inlined in an iframe - with the static map_static() image as a fallback
(map_interactive = FALSE); toggle the whole map off with map = FALSE. Once
a land-cover / fire time series has been calculated for the species, the
composition-over-time and burned-area-per-year charts are embedded too.map_species() now uses OpenStreetMap for the light
basemap (the CartoDB Positron layer had started requiring an API key) and no
longer clips the species-name label at the edge of the map.factsheet_html()) in the Report tab. Builds a
single, self-contained HTML page - the kind hosted on a supplementary website
map_interactive = TRUE) - the
same self-contained widget the Maps tab downloads via Download map (HTML),
inlined in an iframe so the factsheet stays a single portable file - with the
static map_static() image as a fallback (or via map_interactive = FALSE).
Toggle the whole map off with map = FALSE..html opens
offline and can be published as-is (e.g. on GitHub Pages). The Report tab
gains a form for the fields above, photo upload (with a watermark owner name),
an on-demand preview and a Download factsheet (.html) button.DESCRIPTION ('MapBiomas', 'Esri', 'Impact Observatory',
'Sentinel-2', 'ArcGIS', 'GDAL', 'Google Earth Engine',
'GeoPackage'), as requested in the CRAN pretest review. No user-facing
changes.range
column), the Save image (PNG) export stacks both charts, and both series are
fed into the written report automatically - so the EOO and AOO temporal trends
both appear in the generated .docx/text assessment.plot_class_trendline()). For a chosen
class or conservation group, the Time Series tab now fits and plots a
regression of its percentage of area through time - with the fitted equation,
R² and p-value - for each extent, using the
ggtrendline package when
installed (with a ggplot2 linear-fit fallback otherwise). A model selector
(linear, quadratic, logarithmic, exponential, power) drives the fit..docx) now lists, per extent, the fastest-changing
land-cover classes with the slope (percentage points per year), R² and
p-value of a least-squares fit of class share on year - the textual
counterpart of the Time Series tab's ggtrendline analysis..docx.white-space: nowrap), with the genus/epithet still in italic.download.file()) to a temporary file before being read, instead of
relying on sf::st_read() opening the URL directly. Many GDAL builds
(notably several Windows / older installs) lack the /vsicurl HTTP support
that direct URL reading needs, so protected areas would come back empty on
those machines while working on Linux/CI - this makes the fetch portable
across platforms.st_transform(), fixing the "cannot transform sfc
object with missing crs" failure and its empty-bbox warnings. The same
CRS guard is applied to local pa_src files..zip) used instead of the online WDPA
service - handy when the global service returns nothing or you are offline
(e.g. a local ICMBio Conservation-Units layer for Brazil)..gpkg (single self-contained file),
and export_ranges() returns a single path for that format."all" - the union of the EOO and AOO - in
addition to "eoo" and "aoo".DATUM WGS84); the legend and scale bar are drawn without boxes; and
the species name in the title is set in italic.assess_species()
can now quantify habitat conversion from the Esri / Impact Observatory 10 m
Annual Land Use Land Cover product - the global, Sentinel-2-derived data
behind the ArcGIS Living Atlas Land Cover Explorer
(https://livingatlas.arcgis.com/landcoverexplorer/). Like MapBiomas, it is
streamed as public Cloud-Optimized GeoTIFFs via GDAL /vsicurl/ - no Google
Earth Engine and no account. Two ways to use it:
assess_species(occ, initiative = "auto") tries MapBiomas first and
falls back automatically to Sentinel-2 wherever MapBiomas has no data.
This is also on by default (fallback = "sentinel2") for any MapBiomas
initiative, so an out-of-coverage species no longer returns NA - set
fallback = "none" to restore the old behaviour.assess_species(occ, initiative = "sentinel2") forces the global layer
everywhere (aliases: "esri", "s2", "global", ...).
The 9-class product is mapped to the same conservation groups as MapBiomas
(Trees/Rangeland/Flooded vegetation = natural; Crops/Built area = anthropic;
Water excluded; Bare ground/Snow/Ice excluded as ambiguous; Clouds =
not observed), so conversion percentages, per-class tables, donut charts,
maps and the written report all work unchanged. New helpers: esri_legend(),
s2_source_url(), s2_raster_local() and s2_years() (2017-2023). The
product actually used is recorded per species in the mapbiomas_initiative
column of $summary.assess_species() (and the whole pipeline)
now accepts initiative = "paraguay" (MapBiomas Paraguay, Collection 2,
1985-2023) and initiative = "uruguay" (MapBiomas Uruguay, Collection 1,
1985-2022). Both are streamed as annual Cloud-Optimized GeoTIFFs from the
public MapBiomas bucket via GDAL /vsicurl/ - no Google Earth Engine and no
Google Drive - just like the other initiatives. Paraguay uses the
integration-classification layout
(paraguay/collection_2/mapbiomas_paraguay_collection2_integration_v1-classification_YYYY.tif)
and Uruguay the coverage layout
(uruguay/collection_1/coverage/uruguay_coverage_YYYY.tif). This supersedes
the note in 1.9.0: MapBiomas has since published both products as per-year
GeoTIFFs on the public bucket, so they can now be streamed the same way.
mb_initiatives() now lists eleven products.mb_legend() against the official standardised legend and closed two gaps:
added the generic Non Vegetated Area class (code 22, group "other"),
which some products emit at the parent level, and corrected the colour of
Other Non Forest Formation (code 13) to the standard #d89f5c. A few
class names were also aligned to the standard wording (codes 13, 68, 83).
Conservation groups for the existing classes are unchanged.assess_species() (and the whole pipeline)
now accepts initiative = "argentina", "bolivia", "chile", "ecuador",
"peru" and "venezuela", in addition to "brazil", "amazonia" and
"colombia". All are streamed as annual Cloud-Optimized GeoTIFFs from the
public MapBiomas bucket via GDAL /vsicurl/ - no Google Earth Engine and no
Google Drive. The registry handles each product's file layout
(coverage/<country>_coverage_YYYY.tif, Peru/Venezuela's
..._integration_v1-classification_YYYY.tif, Argentina's hyphenated
collection-2, and Chile's collection-less chile/coverage/ path). Year
spans follow each product: Chile is 2000-2022 and Venezuela (Collection 2) is
1985-2023; the others run 1985-2024. mb_initiatives() lists them all.
Paraguay and Uruguay are intentionally not included: their annual maps are
not published as per-year GeoTIFFs on the public bucket, so they cannot be
streamed the same way (they would require Earth Engine).mb_legend() gains
the country-specific classes from the pan-continental harmonisation table -
primary/secondary/dwarf forest (59, 60, 67), scrubland/open shrublands/steppe/
fog oasis/peatlands (66, 77, 63, 70, 73), other crops (72), Pinus/Eucalyptus/
other forest plantations (79, 80, 83) and salt flat (61) - so a range that
spans several countries is still assessed on one coherent legend. The existing
Brazil/Amazonia/Colombia codes, names, colours and groups are unchanged; a
code absent from a given raster contributes zero area.icmbio_wfs_base() and
protected_layers(), the WFS reader, and the bundled ucs_federais.rds data
are gone. Protected-area overlap (assess_species(protected = TRUE)) now
always uses the global World Database on Protected Areas (WDPA), so it
works the same way everywhere; a local pa_src file still overrides it for
offline use. assess_species() drops the pa_source/pa_typename arguments,
and protected_areas() now reads WDPA (or a local file) instead of the ICMBio
WFS. The Shiny app drops the protected-area source selector and lists all nine
initiatives, and the written report cites WDPA instead of ICMBio/INDE.assess_species() (and
the whole pipeline) gains an initiative argument - "brazil" (default),
"amazonia" (Pan-Amazon / RAISG, Collection 6, 1986-2023) or "colombia"
(Collection 3, 1985-2024). All three products are streamed as annual
Cloud-Optimized GeoTIFFs from the public MapBiomas bucket via GDAL
/vsicurl/ - no Google Earth Engine and no Google Drive download. Colombia
is served per-year on the same public bucket
(initiatives/colombia/collection_3/coverage/), so it reads exactly like
Brazil (windowed, cached) rather than through the multi-band Drive archive. A
new exported mb_initiatives() lists the products, their default collections
and year spans; mb_source_url(), mb_raster_local(), mb_years(),
mb_legend(), summarise_conversion() and cover_timeseries() all take the
initiative argument. year/collection now default to the initiative's
latest year and native collection when left NULL.mb_legend() now returns a single
standardised legend that labels the Brazil, Amazonia and Colombia rasters
consistently (same class names, colours and conservation groups), built from
the cross-product harmonisation table. The Colombia/Amazonia-specific classes
are added - Andinean herbaceous/shrubby formations (81, 82), Glacier (34),
Other natural non-vegetated area (68) and Banana (74) - so a species whose
range spans more than one country is assessed on one coherent legend. Existing
Brazil codes, names, colours and groups are unchanged.wdpa_areas() reads the World
Database on Protected Areas from its public ArcGIS FeatureServer (bounding-box
query, GeoJSON, on-disk cached), standardised to the same
pa_name/pa_category/pa_group columns as the ICMBio layer, with IUCN
categories mapped to strict-protection (Ia-III) vs sustainable-use (IV-VI).
assess_species() gains pa_source ("icmbio" or "wdpa"); it defaults to
ICMBio for Brazil and WDPA for the Amazonia/Colombia initiatives, so
protected-area overlap now works outside Brazil.summary gains a mapbiomas_initiative column and the stored
settings record the initiative and pa_source; the Shiny app adds an
initiative selector (with the Year list auto-updating to the product's
span) and a protected-area source selector, and threads both through the
map overlay, static map, time series and raster export. MapBiomas Fire remains
Brazil-only and is skipped with a warning for the other initiatives.By class) and the conservation-group summary (By group) - in
the official MapBiomas colours. New exported plot_conversion_donut()
function; both the interactive (plotly) view and the Save donut button
export a transparent-background PNG..zip./vsicurl/ configuration (bigger
block cache, HTTP/2 multiplexing, larger chunked range requests, threaded
decompression) to speed up the MapBiomas streaming reads during assessment.
This only affects I/O speed — pixel values and area statistics are unchanged.assessment_report() builds a narrative,
referenced summary of a species' Criterion B screening (range metrics,
provisional category, and — when computed — habitat conversion, fire and
protected-area overlap), with the IUCN/GeoCAT/MapBiomas references. It
returns HTML, plain text, or a Word .docx (via \pkg{officer}). A new
Report tab in the Shiny app (after Fire) previews the text and downloads
the .docx.cover_series/fire_series arguments add a temporal-trend analysis of
conversion and of the fire regime; the app passes these automatically when
the matching Time series / Fire series have been calculated.cover_series/fire_series accept a list of
per-range series (each reported separately, not summed), and the app's Report
tab collects every Time series / Fire series you calculate for the species
(EOO or AOO) — no dedicated button and no extra computation on the Report tab.
With figures = TRUE (used by the app's .docx download), the report also
embeds the support figures (composition, protection, and the
land-cover/fire time series) via \pkg{officer}.-outsize, using the raster overviews) instead
of streaming the full 30 m window, which markedly speeds up the map for
large-range species. It falls back to the previous native read on any error,
and area/conversion statistics are unaffected (they still use the native read).mas_plotly(), which wraps any
mappingAS plot_* ggplot into a \pkg{plotly} widget and preserves the chart
subtitle in the title. plot_conversion() and plot_protection() now return
a ggplot object (with the percentage matrix kept in attr(p, "pct")); a
base-graphics fallback remains when \pkg{ggplot2} is unavailable..mas_theme()) so the static
PNG exports and their interactive versions look consistent.ggplot2 and plotly moved to Imports (previously ggplot2 was a
suggestion); PNG downloads of the conversion/protection charts now use
ggplot2::ggsave().inst/extdata/ucs_federais.rds, full resolution) by default, so overlap works
offline and does not depend on the (intermittent) ICMBio WFS. The WFS remains
available and is used automatically as a fallback when the bundled data is not
installed. Pass pa_src= to use your own UC file. Source: ICMBio/INDE (PDDL).assess_species(protected = TRUE, mapbiomas = TRUE) reports the natural
habitat that is also inside UCs (effectively protected): eoo_nat_uc_pct /
aoo_nat_uc_pct (of the whole range) and eoo_nat_uc_pct_in /
aoo_nat_uc_pct_in (of the UC area). New plot_protection() charts this.plot_protection() failing to render in the Shiny "Conservation Units"
tab on small plot areas ("invalid graphics state"): leaner margins, resilient
margin annotations, and a taller plot panel.R/protected_areas.R integrating Brazilian federal Conservation
Units (Unidades de Conservacao, UCs) from the ICMBio geoservice on the INDE.
Added protected_areas() (reads UCs intersecting an area of interest from the
WFS, with a local-file fallback and on-disk cache), protected_layers()
(lists the WFS typeNames), summarise_protected() (overlap metrics),
pa_table() (per-species UC list) and icmbio_wfs_base().assess_species() gains protected, pa_src and pa_typename. With
protected = TRUE the summary now reports occ_in_uc_pct (share of
occurrences inside UCs), eoo_uc_pct, aoo_uc_pct and n_uc, and each
species' detail stores the full UC overlap and layer.map_species() and map_static() gain protected/pa_src to draw the UC
polygons as a labelled layer.plot_protection(): horizontal stacked bars (EOO and AOO) of the range
inside vs outside UCs, mirroring plot_conversion().protected = TRUE and mapbiomas = TRUE, assess_species() also
reports the natural habitat that is also inside UCs (effectively protected):
eoo_nat_uc_pct/aoo_nat_uc_pct (of the whole range) and
eoo_nat_uc_pct_in/aoo_nat_uc_pct_in (of the UC area). plot_protection()
splits the inside-UC bar into natural vs altered when these are present.export_ranges() writes the UC fields (uc_pct, uc_occ_pct, n_uc) into
the EOO/AOO attribute tables when available.class_en column in mb_legend();
Portuguese remains available via the selector.lang argument to plot_conversion(), plot_timeseries() and
plot_fire_timeseries() (default "en"), mirroring the existing map
functions.read_occurrences() now fails with a clear message when every row is dropped
as having missing or invalid coordinates, instead of surfacing an opaque
downstream error.cover_timeseries()
to English for consistency with the English package interface.map_static() gained a clip argument), fixing the missing AOO layer..year_grid() helper,
removing duplicated year-range logic.map_species()) and
publishable (map_static()) maps.map_species(): new clip argument to view the MapBiomas land-cover and fire
rasters clipped to the AOO as well as the EOO; selectable in the Map tab.st_union planar-assumption warnings when dissolving AOO cells.fire = TRUE argument into the assess_species() function
to calculate the percentage of cumulative burned area within the EOO and AOO.fire_timeseries(), fire_timeseries_for_species(), and
plot_fire_timeseries().map_static() to include the
fire = TRUE argument, enabling the visualization of the fire recurrence
layer.export_ranges() to include the burned area (brnd_pct) and
MapBiomas Fire collection (fire_col) columns in the exported polygons
(Shapefile/GeoPackage).inst/extdata/, not data/). Author and
copyright metadata tidied for consistency.map_static(): new publication-ready static map (MapBiomas raster clipped to
the EOO, EOO outline, AOO cells, points, north arrow, scale bar and legends)
on an equal-area projection; returns a ggplot for ggplot2::ggsave().map_species(): MapBiomas layer on the leaflet map (clipped to the EOO), with
a class legend and a toggle in the layers control.mb_raster_local(): on-disk cache of the windowed crop (reused across the
EOO/AOO/map and re-runs) and restoration of the user's GDAL settings./vsicurl/, no Google Earth Engine account) and rgee (optional).