In addition to the datasets stored on Zenodo, the SAFE Project website provides an API to search dataset metadata in more depth. The search functions access this API and return safe_record_set objects identifying datasets that match a particular query.

search_dates(dates, match_type = "intersect", most_recent = FALSE, ids = NULL)

search_fields(
  field_text = NULL,
  field_type = NULL,
  ids = NULL,
  most_recent = FALSE
)

search_authors(author, ids = NULL, most_recent = FALSE)

search_taxa(
  taxon_name = NULL,
  taxon_rank = NULL,
  gbif_id = NULL,
  ids = NULL,
  most_recent = FALSE
)

search_text(text, ids = NULL, most_recent = FALSE)

search_spatial(
  wkt = NULL,
  location = NULL,
  distance = NULL,
  ids = NULL,
  most_recent = FALSE
)

Arguments

dates

A vector of length 1 or 2, containing either ISO format date character strings ("yyyy-mm-dd") or POSIXt dates.

match_type

A character string (see Details).

most_recent

Logical indicating whether to restrict the API to returning only the most recent versions of the datasets found. By default all versions of matching dataset concepts are returned.

ids

A set of SAFE dataset record IDs to restrict a search. This will typically be a safe_record_set object returned by another search but can also be a vector of record ids in any of the formats accepted by validate_record_ids.

field_text

Text to search for within the data worksheet field name and description.

field_type

A data worksheet field type (see Links).

author

A character string used to search for datasets by author full (or partial) names.

taxon_name

The scientific name of a taxon to search for.

taxon_rank

A taxonomic rank to search for.

gbif_id

A GBIF taxonomic ID number.

text

Character string to look for within a SAFE dataset, worksheet, title, field description, and dataset keywords.

wkt

A well-known text geometry string, assumed to use latitude and longitude in WGS84 (EPSG:4326).

location

The name of a location in the SAFE gazetteer.

distance

A buffer distance for spatial searches, giving the distance in metres within which to match either location or wkt searches.

Value

An object of class safe_record_set of datasets that match the query.

Details

The API provides endpoints to search datasets by date extents, data worksheet fields, authors, taxa, free text and by spatial query. All of the functions accept the argument most_recent, which restricts the returned datasets to the most recent versions of each matching dataset concept. The functions can also be passed an existing safe_record_set object to search within the results of a previous search.

The match_type parameter specifies how to match date ranges and must be one of "intersect" (default), "contain", or "within". The "contain" option returns datasets that span a date range, "within" returns datasets that fall within the given range and "intersect" selects datasets that overlap any part of the date range. Note that match_type is ignored when only a single date is provided.

Functions

  • search_dates: Search datasets by date extent

  • search_fields: Search data worksheet field metadata.

  • search_authors: Search by dataset author

  • search_taxa: Search by taxon name, rank or GBIF ID.

  • search_text: Search dataset, worksheet and field titles and descriptions

  • search_spatial: Search by spatial sampling area/named location.

Spatial searches

For spatial searches, users can select a location name from a SAFE data gazetteer (see e.g. https://www.safeproject.net/info/gazetteer or load_gazetteer) or provide a WKT geometry. The sampling locations provided in each SAFE dataset are tested to see if they intersect the search geometry.

A buffer distance can aso be provided to extend the search around the query geometry. Note that although WKT geometries should be provided using WGS84 lat/long coordinates, since this is typical field GPS data, distances must be provided as metres and all proximity calculations take place in the UTM50N projected coordinate system.

The search_spatial function will not retrieve datasets that have not provided sampling locations or use newly defined locations that are missing coordinate information.

Examples

   # \donttest{
   search_dates("2014-06-12")
#> Search returned 70 records
#> Set includes 50 concept ids and 70 record ids: 
#>  - 49 open and most recent (*)
#>  - 18 open and outdated (o)
#>  - 3 under embargo or restricted (x)
#> 
#>    concept  record available
#> 1   629855 3490675         *
#> 2   629942 3492153         *
#> 3   630004 3490488         *
#> 4   630015 3492009         *
#> 5   630063 3697796         *
#> 6   630119 3492148         *
#> 7   630123 3491956         *
#> 8   630132 3490613         *
#> 9  ------- 3490564         o
#> 10  630161 3492064         *
#> 11  630228 3697804         *
#> 12  630241 3492126         *
#> 13  630259 3490687         *
#> 14  654585 3698297         *
#> 15 1198465 1237733         *
#> 16 ------- 1198466         o
#> 17 1198468 1237731         *
#> 18 ------- 1198469         o
#> 19 1198692 2599732         *
#> 20 ------- 1198693         o
#> 21 1198696 1198846         *
#> 22 ------- 1198697         o
#> 23 1198840 1237719         *
#> 24 ------- 1198841         o
#> 25 1216002 1304118         *
#> 26 ------- 1237657         o
#> 27 ------- 1216003         o
#> 28 1303011 1303012         *
#> 29 1303013 1303014         *
#> 30 1327556 1327557         *
#> 31 1344568 1344569         *
#> 32 1400563 1400564         *
#> 33 1441584 1441585         *
#> 34 1478523 3955050         *
#> 35 ------- 1478524         o
#> 36 1478525 4072959         *
#> 37 ------- 3982665         o
#> 38 ------- 1478526         o
#> 39 1995247 1995439         *
#> 40 ------- 1995248         o
#> 41 3247601 3247602         *
#> 42 3247630 3247631         *
#> 43 3247638 3247639         *
#> 44 3266770 4542881         *
#> 45 ------- 3266771         o
#> 46 3266826 3266827         *
#> 47 3342494 3342495         *
#> 48 3354067 3354068         *
#> 49 3366103 3366104         *
#> 50 3402745 3402746         *
#> 51 3402747 3402748         *
#> 52 3402751 5513918         *
#> 53 ------- 3402752         o
#> 54 3476357 3476390         *
#> 55 ------- 3476358         o
#> 56 3485120 3906082         *
#> 57 ------- 3833856         o
#> 58 ------- 3485121         o
#> 59 3780390 3780391         *
#> 60 3888374 3888375         *
#> 61 3901504 3971012         *
#> 62 ------- 3901505         o
#> 63 3908248 3908249         *
#> 64 3948442 3948443         *
#> 65 4572774 4572775         *
#> 66 5710508 6368114         x
#> 67 ------- 5820902         x
#> 68 ------- 5710509         x
#> 69 6477750 6477751         *
#> 70 6477763 6477764         *
   search_dates(as.POSIXct(c("2014-06-12", "2015-06-11")))
#> Search returned 99 records
#> Set includes 75 concept ids and 99 record ids: 
#>  - 74 open and most recent (*)
#>  - 22 open and outdated (o)
#>  - 3 under embargo or restricted (x)
#> 
#>    concept  record available
#> 1   629855 3490675         *
#> 2   629942 3492153         *
#> 3   630004 3490488         *
#> 4   630015 3492009         *
#> 5   630063 3697796         *
#> 6   630119 3492148         *
#> 7   630123 3491956         *
#> 8   630132 3490613         *
#> 9  ------- 3490564         o
#> 10  630161 3492064         *
#> 11  630228 3697804         *
#> 12  630241 3492126         *
#> 13  630259 3490687         *
#> 14  654585 3698297         *
#> 15 1198465 1237733         *
#> 16 ------- 1198466         o
#> 17 1198468 1237731         *
#> 18 ------- 1198469         o
#> 19 1198471 1237732         *
#> 20 ------- 1198472         o
#> 21 1198692 2599732         *
#> 22 ------- 1198693         o
#> 23 1198696 1198846         *
#> 24 ------- 1198697         o
#> 25 1198840 1237719         *
#> 26 ------- 1198841         o
#> 27 1216002 1304118         *
#> 28 ------- 1237657         o
#> 29 ------- 1216003         o
#> 30 1303011 1303012         *
#> 31 1303013 1303014         *
#> 32 1303019 1303020         *
#> 33 1327556 1327557         *
#> 34 1344568 1344569         *
#> 35 1400563 1400564         *
#> 36 1441584 1441585         *
#> 37 1478523 3955050         *
#> 38 ------- 1478524         o
#> 39 1478525 4072959         *
#> 40 ------- 3982665         o
#> 41 ------- 1478526         o
#> 42 1487594 1487595         *
#> 43 1995247 1995439         *
#> 44 ------- 1995248         o
#> 45 2020339 2020340         *
#> 46 2536268 3476542         *
#> 47 ------- 2536269         o
#> 48 3081058 3247699         *
#> 49 ------- 3081059         o
#> 50 3247464 3247465         *
#> 51 3247493 3247494         *
#> 52 3247601 3247602         *
#> 53 3247630 3247631         *
#> 54 3247638 3247639         *
#> 55 3251899 3258117         *
#> 56 ------- 3251900         o
#> 57 3265703 3265704         *
#> 58 3265745 3265746         *
#> 59 3265747 3265748         *
#> 60 3266770 4542881         *
#> 61 ------- 3266771         o
#> 62 3266826 3266827         *
#> 63 3342494 3342495         *
#> 64 3354067 3354068         *
#> 65 3366103 3366104         *
#> 66 3402745 3402746         *
#> 67 3402747 3402748         *
#> 68 3402751 5513918         *
#> 69 ------- 3402752         o
#> 70 3476357 3476390         *
#> 71 ------- 3476358         o
#> 72 3485120 3906082         *
#> 73 ------- 3833856         o
#> 74 ------- 3485121         o
#> 75 3698114 3698115         *
#> 76 3780390 3780391         *
#> 77 3888374 3888375         *
#> 78 3901504 3971012         *
#> 79 ------- 3901505         o
#> 80 3906117 3906118         *
#> 81 3908127 3908128         *
#> 82 3908248 3908249         *
#> 83 3929631 3929632         *
#> 84 3948442 3948443         *
#> 85 3973690 3973691         *
#> 86 3974970 3974971         *
#> 87 4010756 4010757         *
#> 88 4020696 4020697         *
#> 89 4139684 4139685         *
#> 90 4247168 4247169         *
#> 91 4275385 4275386         *
#> 92 4572774 4572775         *
#> 93 5113428 5113429         *
#> 94 5710508 6368114         x
#> 95 ------- 5820902         x
#> 96 ------- 5710509         x
#> 97 6477718 6477719         *
#> 98 6477750 6477751         *
#> 99 6477763 6477764         *
   search_dates(c("2014-06-12", "2015-06-11"), match_type = "contain")
#> Search returned 8 records
#> Set includes 7 concept ids and 8 record ids: 
#>  - 7 open and most recent (*)
#>  - 1 open and outdated (o)
#>  - 0 under embargo or restricted (x)
#> 
#>   concept  record available
#> 1 2020339 2020340         *
#> 2 3081058 3247699         *
#> 3 ------- 3081059         o
#> 4 3247493 3247494         *
#> 5 3265703 3265704         *
#> 6 4020696 4020697         *
#> 7 4139684 4139685         *
#> 8 4247168 4247169         *
   search_fields(field_text = "temperature")
#> Search returned 25 records
#> Set includes 20 concept ids and 25 record ids: 
#>  - 20 open and most recent (*)
#>  - 5 open and outdated (o)
#>  - 0 under embargo or restricted (x)
#> 
#>    concept  record available
#> 1  1478525 4072959         *
#> 2  ------- 3982665         o
#> 3  3247484 3876227         *
#> 4  ------- 3247485         o
#> 5  3247591 3247592         *
#> 6  3251886 3258079         *
#> 7  3251899 3258117         *
#> 8  ------- 3251900         o
#> 9  3266770 4542881         *
#> 10 ------- 3266771         o
#> 11 3266821 3266822         *
#> 12 3475407 3475408         *
#> 13 3479170 3479171         *
#> 14 3698114 3698115         *
#> 15 3888374 3888375         *
#> 16 3908146 3929764         *
#> 17 ------- 3908147         o
#> 18 3926373 3926374         *
#> 19 3948442 3948443         *
#> 20 3952831 3952832         *
#> 21 3994259 3994260         *
#> 22 4000206 4000207         *
#> 23 4095373 4095374         *
#> 24 5519571 5519572         *
#> 25 5562259 5562260         *
   search_fields(field_type = "numeric")
#> Search returned 103 records
#> Set includes 84 concept ids and 103 record ids: 
#>  - 82 open and most recent (*)
#>  - 17 open and outdated (o)
#>  - 4 under embargo or restricted (x)
#> 
#>     concept  record available
#> 1    629855 3490675         *
#> 2    629942 3492153         *
#> 3    630015 3492009         *
#> 4    630119 3492148         *
#> 5    630132 3490613         *
#> 6    630161 3492064         *
#> 7    630241 3492126         *
#> 8   1198564 3857210         *
#> 9   1478523 3955050         *
#> 10  1478525 4072959         *
#> 11  ------- 3982665         o
#> 12  2536268 3476542         *
#> 13  2537072 3901735         *
#> 14  3081058 3247699         *
#> 15  3237506 5109892         *
#> 16  ------- 3237507         o
#> 17  3247464 3247465         *
#> 18  3247484 3876227         *
#> 19  ------- 3247485         o
#> 20  3247491 3247492         *
#> 21  3247493 3247494         *
#> 22  3247591 3247592         *
#> 23  3247601 3247602         *
#> 24  3247630 3247631         *
#> 25  3247638 3247639         *
#> 26  3251886 3258079         *
#> 27  ------- 3251887         o
#> 28  3251899 3258117         *
#> 29  ------- 3251900         o
#> 30  3251901 3897394         *
#> 31  ------- 3614876         o
#> 32  ------- 3258082         o
#> 33  ------- 3251902         o
#> 34  3265703 3265704         *
#> 35  3265711 3997172         *
#> 36  ------- 3742834         o
#> 37  ------- 3265712         o
#> 38  3265721 3265722         *
#> 39  3265745 3265746         *
#> 40  3265747 3265748         *
#> 41  3266770 4542881         *
#> 42  ------- 3266771         o
#> 43  3266821 3266822         *
#> 44  3342494 3342495         *
#> 45  3354067 3354068         *
#> 46  3366103 3366104         *
#> 47  3402745 3402746         *
#> 48  3475405 3475406         *
#> 49  3475407 3475408         *
#> 50  3476357 3476390         *
#> 51  ------- 3476358         o
#> 52  3479170 3479171         *
#> 53  3485085 3485086         *
#> 54  3485120 3906082         *
#> 55  ------- 3833856         o
#> 56  ------- 3485121         o
#> 57  3698114 3698115         *
#> 58  3780390 3780391         *
#> 59  3888374 3888375         *
#> 60  3897376 3897377         *
#> 61  3901504 3971012         *
#> 62  ------- 3901505         o
#> 63  3906117 3906118         *
#> 64  3908117 3908118         *
#> 65  3908127 3908128         *
#> 66  3908146 3929764         *
#> 67  ------- 3908147         o
#> 68  3908248 3908249         *
#> 69  3926373 3926374         *
#> 70  3929631 3929632         *
#> 71  3948442 3948443         *
#> 72  3952831 3952832         *
#> 73  3966236 3966277         *
#> 74  ------- 3966237         o
#> 75  3973550 3973551         *
#> 76  3973690 3973691         *
#> 77  3974970 3974971         *
#> 78  3975972 3975973         *
#> 79  3976020 3976021         *
#> 80  3979295 3979296         *
#> 81  3981221 3981222         *
#> 82  3994259 3994260         *
#> 83  4000206 4000207         *
#> 84  4010756 4010757         *
#> 85  4020696 4020697         *
#> 86  4095373 4095374         *
#> 87  4297672 4297673         x
#> 88  4572774 4572775         *
#> 89  4630979 4630980         *
#> 90  4899607 4899608         *
#> 91  4899609 4899610         *
#> 92  5113428 5113429         *
#> 93  5113430 5113431         *
#> 94  5153192 5153193         *
#> 95  5159913 5159914         *
#> 96  5519571 5519572         *
#> 97  5562259 5562260         *
#> 98  5710508 6368114         x
#> 99  ------- 5820902         x
#> 100 ------- 5710509         x
#> 101 5729341 5729342         *
#> 102 6477761 6477762         *
#> 103 6477763 6477764         *
   search_fields(field_text = "temperature", field_type = "numeric")
#> Search returned 24 records
#> Set includes 19 concept ids and 24 record ids: 
#>  - 19 open and most recent (*)
#>  - 5 open and outdated (o)
#>  - 0 under embargo or restricted (x)
#> 
#>    concept  record available
#> 1  1478525 4072959         *
#> 2  ------- 3982665         o
#> 3  3247484 3876227         *
#> 4  ------- 3247485         o
#> 5  3247591 3247592         *
#> 6  3251886 3258079         *
#> 7  3251899 3258117         *
#> 8  ------- 3251900         o
#> 9  3266770 4542881         *
#> 10 ------- 3266771         o
#> 11 3266821 3266822         *
#> 12 3475407 3475408         *
#> 13 3479170 3479171         *
#> 14 3698114 3698115         *
#> 15 3888374 3888375         *
#> 16 3908146 3929764         *
#> 17 ------- 3908147         o
#> 18 3926373 3926374         *
#> 19 3952831 3952832         *
#> 20 3994259 3994260         *
#> 21 4000206 4000207         *
#> 22 4095373 4095374         *
#> 23 5519571 5519572         *
#> 24 5562259 5562260         *
   search_authors("Ewers")
#> Search returned 93 records
#> Set includes 73 concept ids and 93 record ids: 
#>  - 71 open and most recent (*)
#>  - 20 open and outdated (o)
#>  - 2 under embargo or restricted (x)
#> 
#>    concept  record available
#> 1   629855 3490675         *
#> 2   629942 3492153         *
#> 3   654585 3698297         *
#> 4  1198301 1198302         *
#> 5  1198460 1237736         *
#> 6  1198465 1237733         *
#> 7  1198468 1237731         *
#> 8  1198471 1237732         *
#> 9  1198476 1198477         *
#> 10 1198522 1237724         *
#> 11 1198560 1237722         *
#> 12 1198568 1304117         *
#> 13 ------- 1237721         o
#> 14 1198576 1237737         *
#> 15 ------- 1198577         o
#> 16 1198578 1237738         *
#> 17 ------- 1198579         o
#> 18 1198580 1237726         *
#> 19 1198582 1237725         *
#> 20 1198584 1198585         *
#> 21 1198586 1198587         *
#> 22 1198596 1237739         *
#> 23 1198692 2599732         *
#> 24 ------- 1198693         o
#> 25 1198694 1198695         *
#> 26 1198696 1198846         *
#> 27 ------- 1198697         o
#> 28 1198838 1198839         *
#> 29 1198840 1237719         *
#> 30 1198842 1237720         *
#> 31 1216002 1304118         *
#> 32 ------- 1237657         o
#> 33 ------- 1216003         o
#> 34 1216039 2537074         *
#> 35 ------- 1400565         o
#> 36 ------- 1216040         o
#> 37 1216043 1216044         *
#> 38 1219160 1219161         *
#> 39 1220269 1220270         *
#> 40 1228187 1228188         *
#> 41 1228189 1228190         *
#> 42 1237729 1237730         x
#> 43 1303011 1303012         *
#> 44 1303013 1303014         *
#> 45 1303017 1303018         *
#> 46 1303019 1303020         *
#> 47 1323503 1323504         *
#> 48 1344568 1344569         *
#> 49 1400563 1400564         *
#> 50 1441584 1441585         *
#> 51 1478523 3955050         *
#> 52 1478525 4072959         *
#> 53 ------- 3982665         o
#> 54 2537072 3901735         *
#> 55 ------- 2537073         o
#> 56 3081058 3247699         *
#> 57 ------- 3081059         o
#> 58 3237506 5109892         *
#> 59 ------- 3237507         o
#> 60 3247484 3876227         *
#> 61 ------- 3247485         o
#> 62 3265711 3997172         *
#> 63 ------- 3742834         o
#> 64 ------- 3265712         o
#> 65 3265721 3265722         *
#> 66 3266770 4542881         *
#> 67 ------- 3266771         o
#> 68 3354067 3354068         *
#> 69 3476357 3476390         *
#> 70 ------- 3476358         o
#> 71 3479170 3479171         *
#> 72 3888374 3888375         *
#> 73 3908117 3908118         *
#> 74 3908146 3929764         *
#> 75 ------- 3908147         o
#> 76 3966236 3966277         *
#> 77 ------- 3966237         o
#> 78 3973550 3973551         *
#> 79 3973690 3973691         *
#> 80 3974970 3974971         *
#> 81 3975972 3975973         *
#> 82 3981221 3981222         *
#> 83 3994259 3994260         *
#> 84 4297672 4297673         x
#> 85 4572774 4572775         *
#> 86 4630979 4630980         *
#> 87 4899607 4899608         *
#> 88 4899609 4899610         *
#> 89 5153192 5153193         *
#> 90 5159913 5159914         *
#> 91 5729341 5729342         *
#> 92 6477750 6477751         *
#> 93 6477761 6477762         *
   search_taxa(taxon_name = "Formicidae")
#> Search returned 17 records
#> Set includes 16 concept ids and 17 record ids: 
#>  - 14 open and most recent (*)
#>  - 1 open and outdated (o)
#>  - 2 under embargo or restricted (x)
#> 
#>    concept  record available
#> 1  1198301 1198302         *
#> 2  1198471 1237732         *
#> 3  1198838 1198839         *
#> 4  1237729 1237730         x
#> 5  1400561 1400562         *
#> 6  1995247 1995439         *
#> 7  2537072 3901735         *
#> 8  3247484 3876227         *
#> 9  ------- 3247485         o
#> 10 3265745 3265746         *
#> 11 3354067 3354068         *
#> 12 3975972 3975973         *
#> 13 3979295 3979296         *
#> 14 4297672 4297673         x
#> 15 4630979 4630980         *
#> 16 5113428 5113429         *
#> 17 5562259 5562260         *
   search_taxa(gbif_id = 4342)
#> Search returned 17 records
#> Set includes 16 concept ids and 17 record ids: 
#>  - 14 open and most recent (*)
#>  - 1 open and outdated (o)
#>  - 2 under embargo or restricted (x)
#> 
#>    concept  record available
#> 1  1198301 1198302         *
#> 2  1198471 1237732         *
#> 3  1198838 1198839         *
#> 4  1237729 1237730         x
#> 5  1400561 1400562         *
#> 6  1995247 1995439         *
#> 7  2537072 3901735         *
#> 8  3247484 3876227         *
#> 9  ------- 3247485         o
#> 10 3265745 3265746         *
#> 11 3354067 3354068         *
#> 12 3975972 3975973         *
#> 13 3979295 3979296         *
#> 14 4297672 4297673         x
#> 15 4630979 4630980         *
#> 16 5113428 5113429         *
#> 17 5562259 5562260         *
   search_taxa(taxon_rank = "family")
#> Search returned 104 records
#> Set includes 90 concept ids and 104 record ids: 
#>  - 87 open and most recent (*)
#>  - 12 open and outdated (o)
#>  - 5 under embargo or restricted (x)
#> 
#>     concept  record available
#> 1   1198301 1198302         *
#> 2   1198460 1237736         *
#> 3   1198465 1237733         *
#> 4   1198468 1237731         *
#> 5   1198471 1237732         *
#> 6   1198474 1198475         *
#> 7   1198476 1198477         *
#> 8   1198522 1237724         *
#> 9   1198560 1237722         *
#> 10  1198568 1304117         *
#> 11  1198596 1237739         *
#> 12  1198692 2599732         *
#> 13  1198694 1198695         *
#> 14  1198696 1198846         *
#> 15  1198832 1198833         *
#> 16  1198838 1198839         *
#> 17  1198840 1237719         *
#> 18  1198842 1237720         *
#> 19  1216039 2537074         *
#> 20  1219160 1219161         *
#> 21  1237729 1237730         x
#> 22  1303009 1303010         *
#> 23  1303019 1303020         *
#> 24  1323503 1323504         *
#> 25  1327556 1327557         *
#> 26  1400561 1400562         *
#> 27  1400563 1400564         *
#> 28  1478523 3955050         *
#> 29  ------- 1478524         o
#> 30  1478525 4072959         *
#> 31  ------- 3982665         o
#> 32  ------- 1478526         o
#> 33  1487594 1487595         *
#> 34  1995247 1995439         *
#> 35  2020339 2020340         *
#> 36  2024580 2536270         *
#> 37  2536268 3476542         *
#> 38  ------- 2536269         o
#> 39  2537072 3901735         *
#> 40  2579791 2579792         *
#> 41  3237506 5109892         *
#> 42  ------- 3237507         o
#> 43  3247464 3247465         *
#> 44  3247484 3876227         *
#> 45  ------- 3247485         o
#> 46  3247491 3247492         *
#> 47  3247493 3247494         *
#> 48  3247630 3247631         *
#> 49  3265703 3265704         *
#> 50  3265711 3997172         *
#> 51  ------- 3742834         o
#> 52  ------- 3265712         o
#> 53  3265745 3265746         *
#> 54  3342494 3342495         *
#> 55  3354067 3354068         *
#> 56  3366103 3366104         *
#> 57  3402747 3402748         *
#> 58  3402751 5513918         *
#> 59  ------- 3402752         o
#> 60  3475405 3475406         *
#> 61  3475407 3475408         *
#> 62  3485085 3485086         *
#> 63  3780390 3780391         *
#> 64  3832075 3832076         *
#> 65  3897376 3897377         *
#> 66  3901504 3971012         *
#> 67  ------- 3901505         o
#> 68  3906117 3906118         *
#> 69  3906440 3906441         *
#> 70  3908127 3908128         *
#> 71  3908146 3929764         *
#> 72  ------- 3908147         o
#> 73  3908248 3908249         *
#> 74  3926373 3926374         *
#> 75  3948442 3948443         *
#> 76  3952831 3952832         *
#> 77  3966236 3966277         *
#> 78  ------- 3966237         o
#> 79  3973550 3973551         *
#> 80  3973690 3973691         *
#> 81  3974970 3974971         *
#> 82  3975204 3975205         *
#> 83  3975972 3975973         *
#> 84  3976020 3976021         *
#> 85  3979295 3979296         *
#> 86  3981221 3981222         *
#> 87  3994259 3994260         *
#> 88  4010756 4010757         *
#> 89  4095373 4095374         *
#> 90  4139684 4139685         *
#> 91  4247168 4247169         *
#> 92  4275385 4275386         *
#> 93  4297672 4297673         x
#> 94  4630979 4630980         *
#> 95  5113428 5113429         *
#> 96  5519571 5519572         *
#> 97  5562259 5562260         *
#> 98  5710508 6368114         x
#> 99  ------- 5820902         x
#> 100 ------- 5710509         x
#> 101 5729341 5729342         *
#> 102 6477718 6477719         *
#> 103 6477761 6477762         *
#> 104 6477763 6477764         *
   search_text("forest")
#> Search returned 87 records
#> Set includes 70 concept ids and 87 record ids: 
#>  - 68 open and most recent (*)
#>  - 15 open and outdated (o)
#>  - 4 under embargo or restricted (x)
#> 
#>    concept  record available
#> 1   629942 3492153         *
#> 2   630132 3490613         *
#> 3   630161 3492064         *
#> 4  1478523 3955050         *
#> 5  1478525 4072959         *
#> 6  ------- 3982665         o
#> 7  2536268 3476542         *
#> 8  2537072 3901735         *
#> 9  3081058 3247699         *
#> 10 3237506 5109892         *
#> 11 ------- 3237507         o
#> 12 3247464 3247465         *
#> 13 3247484 3876227         *
#> 14 ------- 3247485         o
#> 15 3247591 3247592         *
#> 16 3247601 3247602         *
#> 17 3247630 3247631         *
#> 18 3247638 3247639         *
#> 19 3251886 3258079         *
#> 20 ------- 3251887         o
#> 21 3251899 3258117         *
#> 22 ------- 3251900         o
#> 23 3265703 3265704         *
#> 24 3265711 3997172         *
#> 25 ------- 3742834         o
#> 26 ------- 3265712         o
#> 27 3265745 3265746         *
#> 28 3265747 3265748         *
#> 29 3266770 4542881         *
#> 30 ------- 3266771         o
#> 31 3266821 3266822         *
#> 32 3266826 3266827         *
#> 33 3366103 3366104         *
#> 34 3402747 3402748         *
#> 35 3402751 5513918         *
#> 36 ------- 3402752         o
#> 37 3475405 3475406         *
#> 38 3475407 3475408         *
#> 39 3476357 3476390         *
#> 40 ------- 3476358         o
#> 41 3485085 3485086         *
#> 42 3485120 3906082         *
#> 43 ------- 3833856         o
#> 44 ------- 3485121         o
#> 45 3698114 3698115         *
#> 46 3780390 3780391         *
#> 47 3897376 3897377         *
#> 48 3901504 3971012         *
#> 49 ------- 3901505         o
#> 50 3908117 3908118         *
#> 51 3908127 3908128         *
#> 52 3908146 3929764         *
#> 53 ------- 3908147         o
#> 54 3926373 3926374         *
#> 55 3929631 3929632         *
#> 56 3948442 3948443         *
#> 57 3952831 3952832         *
#> 58 3966236 3966277         *
#> 59 ------- 3966237         o
#> 60 3973690 3973691         *
#> 61 3974970 3974971         *
#> 62 3975204 3975205         *
#> 63 3976020 3976021         *
#> 64 3979295 3979296         *
#> 65 3981221 3981222         *
#> 66 3994259 3994260         *
#> 67 4000206 4000207         *
#> 68 4010756 4010757         *
#> 69 4020696 4020697         *
#> 70 4095373 4095374         *
#> 71 4139684 4139685         *
#> 72 4247168 4247169         *
#> 73 4275385 4275386         *
#> 74 4297672 4297673         x
#> 75 4572774 4572775         *
#> 76 4630979 4630980         *
#> 77 4899607 4899608         *
#> 78 4899609 4899610         *
#> 79 5113428 5113429         *
#> 80 5113430 5113431         *
#> 81 5159913 5159914         *
#> 82 5519571 5519572         *
#> 83 5710508 6368114         x
#> 84 ------- 5820902         x
#> 85 ------- 5710509         x
#> 86 5729341 5729342         *
#> 87 6477763 6477764         *
   search_text("ant")
#> Search returned 77 records
#> Set includes 67 concept ids and 77 record ids: 
#>  - 64 open and most recent (*)
#>  - 9 open and outdated (o)
#>  - 4 under embargo or restricted (x)
#> 
#>    concept  record available
#> 1   630119 3492148         *
#> 2   630161 3492064         *
#> 3  1478523 3955050         *
#> 4  1478525 4072959         *
#> 5  ------- 3982665         o
#> 6  2536268 3476542         *
#> 7  2537072 3901735         *
#> 8  3081058 3247699         *
#> 9  3247464 3247465         *
#> 10 3247484 3876227         *
#> 11 ------- 3247485         o
#> 12 3247491 3247492         *
#> 13 3247493 3247494         *
#> 14 3247601 3247602         *
#> 15 3247630 3247631         *
#> 16 3247638 3247639         *
#> 17 3265703 3265704         *
#> 18 3265711 3997172         *
#> 19 ------- 3742834         o
#> 20 ------- 3265712         o
#> 21 3265745 3265746         *
#> 22 3265747 3265748         *
#> 23 3266770 4542881         *
#> 24 ------- 3266771         o
#> 25 3266821 3266822         *
#> 26 3266826 3266827         *
#> 27 3354067 3354068         *
#> 28 3402745 3402746         *
#> 29 3402751 3402752         o
#> 30 3475405 3475406         *
#> 31 3475407 3475408         *
#> 32 3485085 3485086         *
#> 33 3780390 3780391         *
#> 34 3832075 3832076         *
#> 35 3888374 3888375         *
#> 36 3897376 3897377         *
#> 37 3901504 3971012         *
#> 38 ------- 3901505         o
#> 39 3906117 3906118         *
#> 40 3906440 3906441         *
#> 41 3908117 3908118         *
#> 42 3908127 3908128         *
#> 43 3908146 3929764         *
#> 44 ------- 3908147         o
#> 45 3926373 3926374         *
#> 46 3929631 3929632         *
#> 47 3948442 3948443         *
#> 48 3952831 3952832         *
#> 49 3966236 3966277         *
#> 50 ------- 3966237         o
#> 51 3973550 3973551         *
#> 52 3975204 3975205         *
#> 53 3975972 3975973         *
#> 54 3976020 3976021         *
#> 55 3979295 3979296         *
#> 56 3981221 3981222         *
#> 57 3994259 3994260         *
#> 58 4000206 4000207         *
#> 59 4020696 4020697         *
#> 60 4095373 4095374         *
#> 61 4139684 4139685         *
#> 62 4297672 4297673         x
#> 63 4630979 4630980         *
#> 64 4899607 4899608         *
#> 65 4899609 4899610         *
#> 66 5113428 5113429         *
#> 67 5113430 5113431         *
#> 68 5153192 5153193         *
#> 69 5159913 5159914         *
#> 70 5519571 5519572         *
#> 71 5562259 5562260         *
#> 72 5710508 6368114         x
#> 73 ------- 5820902         x
#> 74 ------- 5710509         x
#> 75 5729341 5729342         *
#> 76 6477761 6477762         *
#> 77 6477763 6477764         *
   search_spatial(wkt = "Point(116.5 4.75)")
#> Search returned 0 records
#> Set includes 0 concept ids and 0 record ids: 
#>  - 0 open and most recent (*)
#>  - 0 open and outdated (o)
#>  - 0 under embargo or restricted (x)
#> 
#> [1] concept   record    available
#> <0 rows> (or 0-length row.names)
   search_spatial(wkt = "Point(116.5 4.75)", distance = 100000)
#> Search returned 76 records
#> Set includes 60 concept ids and 76 record ids: 
#>  - 57 open and most recent (*)
#>  - 14 open and outdated (o)
#>  - 5 under embargo or restricted (x)
#> 
#>    concept  record available
#> 1   630015 3492009         *
#> 2   630132 3490613         *
#> 3  ------- 3490564         o
#> 4  1198460 1237736         *
#> 5  ------- 1198461         o
#> 6  1198476 1198477         *
#> 7  1198564 3857210         *
#> 8  ------- 1198565         o
#> 9  1198576 1237737         *
#> 10 ------- 1198577         o
#> 11 1198578 1237738         *
#> 12 ------- 1198579         o
#> 13 1198580 1237726         *
#> 14 ------- 1198581         o
#> 15 1198582 1237725         *
#> 16 ------- 1198583         o
#> 17 1198584 1198585         *
#> 18 1198586 1198587         *
#> 19 1198692 2599732         *
#> 20 ------- 1198693         o
#> 21 1198696 1198846         *
#> 22 ------- 1198697         o
#> 23 1198832 1198833         *
#> 24 1198838 1198839         *
#> 25 1216043 1216044         *
#> 26 1220269 1220270         *
#> 27 1228187 1228188         *
#> 28 1228189 1228190         *
#> 29 1237729 1237730         x
#> 30 1303017 1303018         *
#> 31 1303019 1303020         *
#> 32 1323503 1323504         *
#> 33 1344568 1344569         *
#> 34 1400563 1400564         *
#> 35 1441584 1441585         *
#> 36 1478523 3955050         *
#> 37 ------- 1478524         o
#> 38 2537072 3901735         *
#> 39 ------- 2537073         o
#> 40 3247484 3876227         *
#> 41 ------- 3247485         o
#> 42 3247491 3247492         *
#> 43 3247493 3247494         *
#> 44 3247591 3247592         *
#> 45 3247601 3247602         *
#> 46 3247630 3247631         *
#> 47 3247638 3247639         *
#> 48 3265721 3265722         *
#> 49 3265745 3265746         *
#> 50 3265747 3265748         *
#> 51 3266770 4542881         *
#> 52 ------- 3266771         o
#> 53 3342494 3342495         *
#> 54 3354067 3354068         *
#> 55 3402747 3402748         *
#> 56 3402751 5513918         *
#> 57 ------- 3402752         o
#> 58 3780390 3780391         *
#> 59 3906440 3906441         *
#> 60 3908117 3908118         *
#> 61 3908127 3908128         *
#> 62 3952831 3952832         *
#> 63 3973690 3973691         *
#> 64 3975204 3975205         *
#> 65 4139684 4139685         *
#> 66 4247168 4247169         *
#> 67 4275385 4275386         *
#> 68 4297672 4297673         x
#> 69 4572774 4572775         *
#> 70 4899607 4899608         *
#> 71 4899609 4899610         *
#> 72 5710508 6368114         x
#> 73 ------- 5820902         x
#> 74 ------- 5710509         x
#> 75 5729341 5729342         *
#> 76 6477718 6477719         *
   search_spatial(wkt = "Polygon((110 0, 110 10,120 10,120 0,110 0))")
#> Search returned 135 records
#> Set includes 102 concept ids and 135 record ids: 
#>  - 99 open and most recent (*)
#>  - 31 open and outdated (o)
#>  - 5 under embargo or restricted (x)
#> 
#>     concept  record available
#> 1    629855 3490675         *
#> 2    630015 3492009         *
#> 3    630132 3490613         *
#> 4   ------- 3490564         o
#> 5   1198460 1237736         *
#> 6   ------- 1198461         o
#> 7   1198465 1237733         *
#> 8   ------- 1198466         o
#> 9   1198468 1237731         *
#> 10  ------- 1198469         o
#> 11  1198471 1237732         *
#> 12  ------- 1198472         o
#> 13  1198474 1198475         *
#> 14  1198476 1198477         *
#> 15  1198556 1198557         *
#> 16  1198560 1237722         *
#> 17  ------- 1198561         o
#> 18  1198564 3857210         *
#> 19  ------- 1198565         o
#> 20  1198576 1237737         *
#> 21  ------- 1198577         o
#> 22  1198578 1237738         *
#> 23  ------- 1198579         o
#> 24  1198580 1237726         *
#> 25  ------- 1198581         o
#> 26  1198582 1237725         *
#> 27  ------- 1198583         o
#> 28  1198584 1198585         *
#> 29  1198586 1198587         *
#> 30  1198596 1237739         *
#> 31  ------- 1198597         o
#> 32  1198692 2599732         *
#> 33  ------- 1198693         o
#> 34  1198696 1198846         *
#> 35  ------- 1198697         o
#> 36  1198832 1198833         *
#> 37  1198838 1198839         *
#> 38  1198842 1237720         *
#> 39  ------- 1198843         o
#> 40  1216043 1216044         *
#> 41  1219160 1219161         *
#> 42  1220269 1220270         *
#> 43  1228187 1228188         *
#> 44  1228189 1228190         *
#> 45  1237729 1237730         x
#> 46  1303009 1303010         *
#> 47  1303017 1303018         *
#> 48  1303019 1303020         *
#> 49  1323503 1323504         *
#> 50  1327556 1327557         *
#> 51  1344568 1344569         *
#> 52  1400563 1400564         *
#> 53  1441584 1441585         *
#> 54  1478523 3955050         *
#> 55  ------- 1478524         o
#> 56  1478525 4072959         *
#> 57  ------- 3982665         o
#> 58  ------- 1478526         o
#> 59  1995247 1995439         *
#> 60  ------- 1995248         o
#> 61  2024580 2536270         *
#> 62  ------- 2024581         o
#> 63  2536268 3476542         *
#> 64  ------- 2536269         o
#> 65  2537072 3901735         *
#> 66  ------- 2537073         o
#> 67  3081058 3247699         *
#> 68  ------- 3081059         o
#> 69  3237506 5109892         *
#> 70  ------- 3237507         o
#> 71  3247484 3876227         *
#> 72  ------- 3247485         o
#> 73  3247491 3247492         *
#> 74  3247493 3247494         *
#> 75  3247591 3247592         *
#> 76  3247601 3247602         *
#> 77  3247630 3247631         *
#> 78  3247638 3247639         *
#> 79  3265721 3265722         *
#> 80  3265745 3265746         *
#> 81  3265747 3265748         *
#> 82  3266770 4542881         *
#> 83  ------- 3266771         o
#> 84  3342494 3342495         *
#> 85  3354067 3354068         *
#> 86  3402747 3402748         *
#> 87  3402751 5513918         *
#> 88  ------- 3402752         o
#> 89  3475407 3475408         *
#> 90  3476357 3476390         *
#> 91  ------- 3476358         o
#> 92  3479170 3479171         *
#> 93  3485085 3485086         *
#> 94  3780390 3780391         *
#> 95  3832075 3832076         *
#> 96  3897376 3897377         *
#> 97  3901504 3971012         *
#> 98  ------- 3901505         o
#> 99  3906117 3906118         *
#> 100 3906440 3906441         *
#> 101 3908117 3908118         *
#> 102 3908127 3908128         *
#> 103 3908146 3929764         *
#> 104 ------- 3908147         o
#> 105 3926373 3926374         *
#> 106 3929631 3929632         *
#> 107 3948442 3948443         *
#> 108 3952831 3952832         *
#> 109 3966236 3966277         *
#> 110 ------- 3966237         o
#> 111 3973550 3973551         *
#> 112 3973690 3973691         *
#> 113 3974970 3974971         *
#> 114 3975204 3975205         *
#> 115 3975972 3975973         *
#> 116 3976020 3976021         *
#> 117 3981221 3981222         *
#> 118 3994259 3994260         *
#> 119 4095373 4095374         *
#> 120 4139684 4139685         *
#> 121 4247168 4247169         *
#> 122 4275385 4275386         *
#> 123 4297672 4297673         x
#> 124 4572774 4572775         *
#> 125 4630979 4630980         *
#> 126 4899607 4899608         *
#> 127 4899609 4899610         *
#> 128 5113428 5113429         *
#> 129 5519571 5519572         *
#> 130 5710508 6368114         x
#> 131 ------- 5820902         x
#> 132 ------- 5710509         x
#> 133 5729341 5729342         *
#> 134 6477718 6477719         *
#> 135 6477763 6477764         *
   search_spatial(location = "A_1")
#> Search returned 9 records
#> Set includes 7 concept ids and 9 record ids: 
#>  - 7 open and most recent (*)
#>  - 2 open and outdated (o)
#>  - 0 under embargo or restricted (x)
#> 
#>   concept  record available
#> 1 1198460 1237736         *
#> 2 ------- 1198461         o
#> 3 1198476 1198477         *
#> 4 1228187 1228188         *
#> 5 1323503 1323504         *
#> 6 1344568 1344569         *
#> 7 3354067 3354068         *
#> 8 3966236 3966277         *
#> 9 ------- 3966237         o
   search_spatial(location = "A_1", distance = 2500)
#> Search returned 60 records
#> Set includes 45 concept ids and 60 record ids: 
#>  - 43 open and most recent (*)
#>  - 13 open and outdated (o)
#>  - 4 under embargo or restricted (x)
#> 
#>    concept  record available
#> 1   629855 3490675         *
#> 2  1198460 1237736         *
#> 3  ------- 1198461         o
#> 4  1198468 1237731         *
#> 5  ------- 1198469         o
#> 6  1198476 1198477         *
#> 7  1198576 1237737         *
#> 8  ------- 1198577         o
#> 9  1198578 1237738         *
#> 10 ------- 1198579         o
#> 11 1198584 1198585         *
#> 12 1198586 1198587         *
#> 13 1228187 1228188         *
#> 14 1228189 1228190         *
#> 15 1237729 1237730         x
#> 16 1303009 1303010         *
#> 17 1303017 1303018         *
#> 18 1323503 1323504         *
#> 19 1344568 1344569         *
#> 20 1400563 1400564         *
#> 21 1441584 1441585         *
#> 22 1478525 4072959         *
#> 23 ------- 3982665         o
#> 24 ------- 1478526         o
#> 25 1995247 1995439         *
#> 26 ------- 1995248         o
#> 27 2024580 2536270         *
#> 28 ------- 2024581         o
#> 29 2536268 3476542         *
#> 30 ------- 2536269         o
#> 31 3247484 3876227         *
#> 32 ------- 3247485         o
#> 33 3247491 3247492         *
#> 34 3247493 3247494         *
#> 35 3265721 3265722         *
#> 36 3354067 3354068         *
#> 37 3476357 3476390         *
#> 38 ------- 3476358         o
#> 39 3485085 3485086         *
#> 40 3832075 3832076         *
#> 41 3897376 3897377         *
#> 42 3901504 3971012         *
#> 43 ------- 3901505         o
#> 44 3906117 3906118         *
#> 45 3908127 3908128         *
#> 46 3926373 3926374         *
#> 47 3966236 3966277         *
#> 48 ------- 3966237         o
#> 49 3973550 3973551         *
#> 50 3974970 3974971         *
#> 51 3975204 3975205         *
#> 52 3976020 3976021         *
#> 53 4139684 4139685         *
#> 54 4247168 4247169         *
#> 55 5710508 6368114         x
#> 56 ------- 5820902         x
#> 57 ------- 5710509         x
#> 58 5729341 5729342         *
#> 59 6477718 6477719         *
#> 60 6477763 6477764         *

   # combining searches using logical operators
   fish <- search_taxa('Actinopterygii')
#> Search returned 10 records
   odonates <- search_taxa("Odonata")
#> Search returned 8 records
   ewers <- search_authors("Ewers")
#> Search returned 93 records
   aquatic <- fish | odonates
   aquatic_ewers <- aquatic & ewers
   all_in_one <- (fish | odonates) & ewers
   # }