- browse(*, fire=None, version=None, start_date=None, assessment_date=None, publication_date=None, extent=None, extent_type=None, extent_relation='intersects', bbox=None, point=None, geometry=None, geometry_relation='intersects', geometry_layer=None, geometry_driver=None, geometry_encoding=None, max=None, offset=None, json=False, fields=None, new=0, autoraise=True)¶
Opens PWFDF search results in a web browser.
Open Search Results
browse(...) browse(..., *, json=True) browse(..., *, json=True, fields)
By default, opens the search results in the ScienceBase user interface. Set
json=Trueto open an sbJSON API response instead. Usefieldsto indicate the sbJSON fields to include in the response.Fire Event
browse(..., *, fire)
Searches for assessments whose fire matches the given name. Note that the provided fire name must exactly match an assessment’s fire name (case-insensitive). Partial matches are not supported.
Version Number
browse(..., *, version)
Searches for assessments matching the provided version number.
Caution
The
versionmust be a full 2-part version number. Major version numbers are not supported.Date Range
browse(..., *, start_date) browse(..., *, assessment_date) browse(..., *, publication_date)
Searches for assessments matching a given date range. Use
start_dateto filter by the fire start date,assessment_dateto filter by the date the assessment was run, andpublication_dateto filter by the date that the assessment was published to ScienceBase.In general, a date input may be a (1) integer year, (2) datetime.date object, (3) datetime.datetime object, (4) YYYY, YYYY-MM, or YYYY-MM-DD date string, or (5) a tuple of two such inputs. If the input is a year or a month, matches all assessments that fall within that interval. If the input is a 2-tuple, then it is interpreted as a date range and the search matches assessments that fall between the two dates. If the first date is a year or month, then the date range will begin on the first day of that interval. If the last date is a year or month, then the range will end on the final day of that interval.
Extent
browse(..., *, extent) browse(..., *, extent_type) browse(..., *, extent_relation)
Searches for assessments in a spatial area with well-known coordinates, such as a country or state. The
extentmay be the name of a supported extent, or an integer extent ID. Useextent_relationto set the spatial relationship between the extent and the search results. Options are:Relation
Description
intersects(default) Matches assessments that intersect the extent at any point
withinOnly matches assessments that are fully contained within the extent
disjointMatches assessments that do not intersect the extent at any point
Use
extent_typeto specify the type of extent being searched. This option is usually not necessary, but can be useful for guarding against extents with similar names.Geometry
browse(..., *, bbox) browse(..., *, point) browse(..., *, geometry) browse(..., *, geometry_relation)
Searches for assessments in a custom geospatial area. You may use one of the following search types at a time:
Search Type
Description
bboxSearches a custom bounding box. The input may be either (1) a WGS-84 [xmin, ymin, xmax, ymax] coordinate sequence, or (2) a GIS file path. If a file, then the bounding box is calculated from the contained geometries.
pointSearches a custom geospatial point. The input may be either (1) a [lon, lat] sequence, or (2) a GIS file path. If a file, then the point is determined as the center of the bounding box of the contained geometries.
geometrySearches a custom geospatial geometry. The input may be either (1) a WGS-84 GeoJSON-like dict (with
typeandcoordinateskeys), or (2) a GIS file path. In practice, only coarse geometries are supported (fewer than 100 coordinate points).Note
GIS files may use any CRS. Unlike explicit coordinate points, they are not limited to WGS-84.
Use
geometry_relationto set the spatial relationship between the geometry and the search results. Options are:Relation
Description
intersects(default) Matches assessments that intersect the geometry at any point
withinOnly matches assessments that are fully contained within the geometry
disjointMatches assessments that do not intersect the geometry at any point
Geometry File IO
browse(..., *, geometry_layer) browse(..., *, geometry_driver) browse(..., *, geometry_encoding)
Advanced options for reading a geometry from a GIS file. Use
geometry_layerwhen the file has multiple data layers. The layer may either be a layer name, or an integer index. Reads the first layer if not otherwise specified. Usegeometry_driverto specify the file format when the file uses a non-standard extension. Most drivers will automatically detect the file encoding, but you can usegeometry_encodingto explicitly specify the encoding if detection fails.Paging
browse(..., *, max) browse(..., *, offset)
Paging options for the ScienceBase API. Use
maxto set the maximum number of ScienceBase product records that should be retrieved. Defaults to 500 and cannot exceed 1000. Useoffsetto specify the number of ScienceBase products to skip before retrieving search results.Browser Options
browse(..., *, new) browse(..., *, autoraise=False)
Web browser options. The
newinput controls how the page is opened. 0 opens in the current window, 1 opens a new window, and 2 opens a new tab. Setautoraise=Falseto disable raising the opened page when possible.Note
Many web browsers ignore both these options.
- Inputs:
fire (str) – The name of a fire event
version (str) – A version number
start_date (str | int | datetime.date | datetime.datetime | tuple) – A date range in which matching fire events began
assessment_date (str | int | datetime.date | datetime.datetime | tuple) – A date range in which matching assessment were performed
publication_date (str | int | datetime.date | datetime.datetime | tuple) – A date range in which matching assessments were published to ScienceBase
extent (str | int) – An extent name or integer ID
extent_type (str) – The type of extent being searched
extent_relation (str) – The spatial relationship between the extent and the search results
bbox (str | Path | [float, float, float, float]) – A custom bounding box to search. Either a file path, or a WGS-84 [xmin, ymin, xmax, ymax] coordinate sequence
point (str | Path | [float, float]) – A custom geospatial point to search. Either a file path, or a [lon, lat] point.
geometry (str | Path | dict) – A custom geospatial geometry to search. Either a file path or a WGS-84 GeoJSON geometry-like dict
geometry_relation (str) – The spatial relationship between the geometry and the search results
geometry_layer (str | int) – The name or index of a data layer in a geometry file
geometry_driver (str) – The file format driver to use to read a geometry file
geometry_encoding (str) – The file encoding to use to read a geometry file
max (int) – The maximum number of ScienceBase records to retrieve per API query
offset (int) – The number of ScienceBase records to skip before retrieving results
json (bool) – True to open the web page for an sbJSON API response. False (default) to open results in the ScienceBase user interface
fields (list[str]) – A list of sbJSON fields to query
new (0 | 1 | 2) – (0 - default) current window, (1) new window, (2) new tab
autoraise (bool) – True (default) to autoraise the page. False to not autoraise
- Outputs:
bool – True if the page was opened successfully. Otherwise False.