MyNixOS website logo
Description

Retrieve App Data from 'OpenAppBuilder'.

Provides an interface to connect R with the <https://github.com/IDEMSInternational/open-app-builder> 'OpenAppBuilder' platform, enabling users to retrieve and work with user and notification data for analysis and processing. It is designed for developers and analysts to seamlessly integrate data from 'OpenAppBuilder' into R workflows via a 'Postgres' database connection, allowing direct querying and import of app data into R.

openappr

R-CMD-check Codecov testcoverage Lifecycle:stable CRANstatus license

The goal of openappr is to import app data from OpenAppBuilder.

Installation

You can install the development version of openappr from GitHub with:

# install.packages("devtools")
devtools::install_github("IDEMSInternational/openappr")

About openappr

The use of openappr begins by establishing a connection to ‘OpenAppBuilder’. This can be achieved using the get_app_connection() function, which is simply a wrapper to the dbconnect function from the DBI package. By using the get_app_connection() function, the connection is stored in the package environment, ensuring that subsequent calls to retrieve the app data uses this connection.

The primary functionality of openappr revolves around two main types of data retrieval:

  • Notification Data: Users can retrieve notification-related data using the function get_nf_data(). This function is optimised for quick access to notifications generated by the system, structured to provide immediate insights into user engagement and system performance.

  • User Data: The function get_user_data() is designed to access detailed information about users. This is particularly useful for analysis that requires a deep dive into user behaviour and demographics.

Both functions utilise the underlying capabilities of the RPostgres package but are tailored to provide a more user-friendly interface that requires minimal SQL knowledge.

Example

This is a basic example which shows you how can import notification and user data from open-app builder into R:

# Before retrieving data, you must establish a connection to your OpenAppBuilder (PostgreSQL) database using the `set_app_connection()` function:

openappr::set_app_connection(
  dbname = "vmc",
  host = "apps-server.idems.international",
  port = 5432,
  user = "vmc",
  password = "LSQkyYg5KzL747"
)

# Once the connection is established, you can retrieve it at any time using the get_app_connection() function:

con <- get_app_connection()

# For specific user data, use the `get_user_data()` function:

valid_ids <- c("3e68fcda-d4cd-400e-8b12-6ddfabced348", "223925c7-443a-411c-aa2a-a394f991dd52")
data_filtered_notifications <- get_openapp_data(
  name = "app_users",
  filter = TRUE,
  filter_variable = "app_user_id",
  filter_variable_value = valid_ids
)

# Similarly, the `get_nf_data()` function allows you to retrieve and process notification interaction data:

filtered_notification_data <- get_nf_data(
  filter = TRUE,
  filter_variable = "Country",
  filter_variable_value = "USA"
)

Conclusion

The openappr package provides a convenient way to connect to OpenAppBuilder and retrieve data, customise your queries, and filter to suit your data needs.

Metadata

Version

0.2.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows