[Stable]

filter_alive(data)

Arguments

data

A dataframe with column indicating "health", e.g. wastd_data$animals with column health or odkc_data$mwi with column health_status.

Value

The dataframe with rows matching live outcomes.

See also

Other wastd: add_nest_labels(), disturbance_by_season(), filter_dead(), filter_disturbance(), filter_predation(), ggplot_disturbance_by_season(), ggplot_emergence_success(), ggplot_hatching_success(), ggplot_hatchling_misorientation(), ggplot_nesting_success_per_area_season_species_pct(), ggplot_nesting_success_per_area_season_species(), ggplot_sighting_status_per_area_season_species(), ggplot_total_emergences_per_area_season_species(), ggplot_track_success_by_date(), ggplot_track_successrate_by_date(), hatching_emergence_success_area(), hatching_emergence_success_site(), hatching_emergence_success(), map_dist(), map_fanangles(), map_mwi(), map_nests(), map_tracks(), map_wastd_wamtram_sites(), map_wastd(), nesting_success_per_area_day_species(), nesting_success_per_area_season_species(), nesting_type_by_area_season_age_species(), nesting_type_by_area_season_species(), nesting_type_by_season_age_species(), nesting_type_by_season_calendarday_age_species(), nesting_type_by_season_calendarday_species(), nesting_type_by_season_day_species(), nesting_type_by_season_species(), nesting_type_by_season_week_age_species(), nesting_type_by_season_week_site_species(), nesting_type_by_season_week_species(), nesting_type_by_site_season_age_species(), nesting_type_by_site_season_species(), parse_animal_encounters(), parse_area_sf(), parse_area(), parse_encounterobservations(), parse_surveys(), parse_turtle_nest_encounters(), print.wastd_api_response(), sighting_status_per_area_season_species(), sighting_status_per_site_season_species(), summarise_hatching_and_emergence_success(), summarise_wastd_data_per_day_site(), total_emergences_per_area_season_species(), total_emergences_per_site_season_species(), track_success_by_species(), track_success(), tracks_ts()

Examples

data("wastd_data")
wastd_data$animals %>%
  filter_alive() %>%
  head()
#> # A tibble: 6 × 77
#>       id type  source sourc…¹ encou…² status when  latit…³ longi…⁴ crs   locat…⁵
#>    <int> <chr> <chr>  <chr>   <chr>   <chr>  <chr>   <dbl>   <dbl> <chr> <chr>  
#> 1 417209 Feat… odk    uuid:9… inwater new    2022…   -23.2    114. WGS … 10     
#> 2 410660 Feat… paper  2022-0… tagging curat… 2022…   -21.9    114. WGS … 10     
#> 3 411441 Feat… wamtr… 315700  tagging new    2022…   -25.8    114. WGS … 10     
#> 4 409666 Feat… wamtr… 315697  tagging new    2022…   -21.9    114. WGS … 10     
#> 5 410179 Feat… odk    uuid:a… inwater new    2022…   -21.9    114. WGS … 10     
#> 6 410181 Feat… odk    uuid:c… tagging new    2022…   -21.8    114. WGS … 10     
#> # … with 66 more variables: location_accuracy_m <int>, name <chr>,
#> #   leaflet_title <chr>, observer_pk <chr>, observer_username <chr>,
#> #   observer_name <chr>, reporter_pk <chr>, reporter_username <chr>,
#> #   reporter_name <chr>, comments <chr>, area_pk <int>, area_area_type <chr>,
#> #   area_name <chr>, site_pk <int>, site_area_type <chr>, site_name <chr>,
#> #   survey_id <int>, survey_area_pk <int>, survey_area_area_type <chr>,
#> #   survey_area_name <chr>, survey_site_pk <int>, …

data("odkc_data")
odkc_data$mwi %>%
  sf_as_tbl() %>%
  filter_alive() %>%
  head()
#> # A tibble: 6 × 82
#>   id    meta_…¹ start…² start…³ start…⁴ start…⁵ start_geop…⁶ observation_start…⁷
#>   <chr> <chr>     <dbl>   <dbl>   <dbl>   <dbl> <list>       <dttm>             
#> 1 uuid… uuid:9…    151.   -33.8     0    1.87e5 <named list> 2022-04-07 13:58:13
#> 2 uuid… uuid:a…    114.   -21.9   -16.0  3.22e0 <named list> 2022-01-29 07:33:18
#> 3 uuid… uuid:c…    114.   -21.8   -10.8  3.75e0 <named list> 2022-01-29 06:40:11
#> 4 uuid… uuid:c…     NA     NA      NA   NA      <NULL>       2022-01-28 09:29:54
#> 5 uuid… uuid:9…     NA     NA      NA   NA      <NULL>       2022-01-16 06:12:31
#> 6 uuid… uuid:5…    114.   -21.9   -12.2  3.22e0 <named list> 2022-01-12 08:48:24
#> # … with 74 more variables: device_id <chr>, reporter <chr>,
#> #   incident_reporter_repeat <chr>, incident_observed_at_longitude <dbl>,
#> #   incident_observed_at_latitude <dbl>, incident_observed_at_altitude <dbl>,
#> #   incident_observed_at_accuracy <dbl>, incident_observed_at <list>,
#> #   incident_observed_at_manual_longitude <dbl>,
#> #   incident_observed_at_manual_latitude <dbl>,
#> #   incident_observed_at_manual_altitude <dbl>, …