Title: | General Purpose Functions for Katilingban |
---|---|
Description: | To support general and non-specific organisational tasks requiring or supported by R, this package provides general purpose functions that facilitate performant and efficient implementation of standardised workflows. This is particularly useful for website update, newsletter generation, reports, notes and other related tasks that are or will be automated or supported within R. |
Authors: | Ernest Guevarra [aut, cre] |
Maintainer: | Ernest Guevarra <[email protected]> |
License: | GPL-3 |
Version: | 0.1.0 |
Built: | 2025-03-11 04:46:10 UTC |
Source: | https://github.com/katilingban/katilingban |
Perform manual authentication with specific Google application using self-generated specified authentication credentials
auth_google(appname, key, secret)
auth_google(appname, key, secret)
appname |
Application name |
key |
Google API key |
secret |
Client secret |
A Google-authenticated session
## Not run: auth_google(appname = "googledrive", key = "ADD/KEY/HERE", secret = "ADD/SECRET/HERE") ## End(Not run)
## Not run: auth_google(appname = "googledrive", key = "ADD/KEY/HERE", secret = "ADD/SECRET/HERE") ## End(Not run)
Given point location data, this function facilitates the creation of corresponding vector of character values to show in the popup for Leaflet markers.
create_popup_content(.data)
create_popup_content(.data)
.data |
A data.frame containing information corresponding to each mapped point location. |
A vector of character values with length equal to the number of mapped point locations
## Not run: df <- read_kb_experience() df <- get_kb_coordinates(.data = df) create_popup_content(.data = df) ## End(Not run)
## Not run: df <- read_kb_experience() df <- get_kb_coordinates(.data = df) create_popup_content(.data = df) ## End(Not run)
Get coordinates of areas that point to areas of experience of Katilingban consultants
get_kb_coordinates(.data)
get_kb_coordinates(.data)
.data |
Object containing information on Katilingban consultants'
experience. This is held in a Google Sheets document and can be retrieved
using |
A tibble containing the same information as the original input data but with longitude and latitude coordinates included.
## Not run: kb <- read_kb_experience() get_kb_coordinates(.data = kb) ## End(Not run)
## Not run: kb <- read_kb_experience() get_kb_coordinates(.data = kb) ## End(Not run)
Katilingban consultants' experience list
kb_experience
kb_experience
A tibble with 141 rows and 12 columns
Variable | Description |
project_name |
Name of project |
type1 |
Project type 1 |
type2 |
Project type 2 |
type3 |
Project type 3 |
year |
Year of project |
country |
Country location of project |
subnational_location |
Subnational location of project |
consultant |
Name of consultant |
location |
Full name of location |
lon |
Longitude coordinate of project location |
lat |
Latitude coordinate of project location |
tooltip |
Tooltip |
kb_experience
kb_experience
Read Katilingban Experience Google Sheets
read_kb_experience( ss = "1l9ov8NEND-gROprl4gR5K2iiTgcQfrGirItz9uExKl0", sheet = 1 )
read_kb_experience( ss = "1l9ov8NEND-gROprl4gR5K2iiTgcQfrGirItz9uExKl0", sheet = 1 )
ss |
Something that identifies a Google Sheet: ID, URL, etc. Set to 1l9ov8NEND-gROprl4gR5K2iiTgcQfrGirItz9uExKl0 for the Katilingban Experience Google Sheets |
sheet |
Worksheet in Google Sheets to read. Can be specified as the name of the worksheet or by position using a number. |
A dribble/tibble of the Katilingban Experience Google Sheets
## Not run: read_kb_experience() ## End(Not run)
## Not run: read_kb_experience() ## End(Not run)
Read a specified Katilingban Google Sheets
read_kb_sheets(ss, sheet = NULL, ...)
read_kb_sheets(ss, sheet = NULL, ...)
ss |
Something that identifies a Google Sheet: ID, URL, etc. |
sheet |
Worksheet in Google Sheets to read. Can be specified as the name of the worksheet or by position using a number. |
... |
Additional parameters passed to googlesheets4::read_sheet |
A dribble/tibble of the specified Google Sheet
## Not run: read_kb_sheets(ss = "1l9ov8NEND-gROprl4gR5K2iiTgcQfrGirItz9uExKl0") ## End(Not run)
## Not run: read_kb_sheets(ss = "1l9ov8NEND-gROprl4gR5K2iiTgcQfrGirItz9uExKl0") ## End(Not run)