get_meetings: Get set of meetings for a time range based on schedule

View source: R/get_meetings.R

get_meetingsR Documentation

Get set of meetings for a time range based on schedule

Description

The 'meetings' object consist of a schedule of AA meetings and locations in Iowa. This function creates a data frame of all available meetings and locations for a specified time range.

Usage

get_meetings(
  from = now(),
  to = now() + days(1),
  type = c("All", "Alcoholics Anonymous", "Narcotics Anonymous")
)

Arguments

from

earliest date (and time, if specified)

to

latest date

type

type of meeting see 'unique(meetings$type)'

Value

data frame

Examples

library(leaflet)
library(sf)

# AA meetings in Iowa for the next 24h from
lubridate::now()
# color locations by day
pal <- colorFactor(
         palette = RColorBrewer::brewer.pal(n=7, name="Paired"),
         domain = levels(meetings$day)
       )
get_meetings() %>%
  leaflet() %>%
  addTiles() %>%
  addPolygons(data = st_transform(ia_counties, crs='+proj=longlat +datum=WGS84'),
              weight = 1, color="#888888") %>%
  addCircleMarkers(lng = ~longitude, lat = ~latitude,
                   color=~pal(day), label=~meeting,
                   radius = 1, stroke = 0.1) %>%
  addLegend(pal = pal, values = levels(meetings$day))

DSPG-ISU/DSPG documentation built on Feb. 19, 2024, 9:36 p.m.