MyNixOS website logo
Description

Comprehensive Interface to the Survey Solutions 'GraphQL' API.

Provides a complete suite of tools for interacting with the Survey Solutions 'GraphQL' API <https://demo.mysurvey.solutions/graphql/>. This package encompasses all currently available queries and mutations, including the latest features for map uploads. It is built on the modern 'httr2' package, offering a streamlined and efficient interface without relying on external 'GraphQL' client packages. In addition to core API functionalities, the package includes a range of helper functions designed to facilitate the use of available query filters.

susographql: A Comprehensive R Interface to the Survey Solutions GraphQL API

Lifecycle:stable R-CMD-check R-CMD-check

The susographql R package offers a comprehensive interface to the World Bank’s Survey Solutions Computer Assisted Survey System (CASS) via its GraphQL API. This package supports all current queries and mutations, seamlessly integrating the latest advancements like map uploads. It harnesses the power of the modern httr2 package, ensuring a streamlined and efficient user experience without the need for external GraphQL client packages.

Beyond basic API interactions, susographql brings an assortment of helper functions. These are thoughtfully designed to simplify the use of query filters, elevating the user experience and broadening your data manipulation and retrieval capabilities. Dive into the details of the available Survey Solutions GraphQL queries and mutations in the comprehensive API documentation.

While susographql is crafted as a “bare-bone” API client, delivering data largely in its original server format, it offers users unmatched flexibility in designing their own, more complex processes fully customized to their needs. This approach also means minimal data manipulation in the background, catering to users who prefer a hands-on approach to data handling. For those who seek a more deterministic experience with built-in data transformations and ready-to-use data structures including support for integration in an R Shiny application, we recommend our SurveySolutionsAPI (httr version) or the newer SurveySolutionsAPIv2 (httr2 version), which cover both, the Survey Solutions REST API and the GraphQL API handled in this package[^1].

Installation

You can either install the stable version from CRAN:


install.packages("susographql")

Or install the development version with:


devtools::install_github("michael-cw/susographql")

Using the API client

  1. Set up your own personal Survey Solutions Server or request a free Personal Demo Server (PDS) (for testing only!!).
  2. Set up your API user and credentials.
  3. Use the credentials to connect to the server.

Contrary to its bigger sisters, the SurveySolutionsAPI (httr version) and the SurveySolutionsAPIv2 (httr2 version) this package does not come with a lot of helpers for credential handling and setting, nevertheless a light-weight credentials check is included:

library(susographql)

suso_gql_pwcheck(
  endpoint = "https://demo.mysurvey.solutions/graphql",
  user = "someuser",
  password = "andhispassword",
  workspace = "primary"
)

Which returns either 200 if the credentials are correct and 400 otherwise. Also note, that the endpoint requires the full path including the graphql part at the end.

Feature requests and bug reports

You can either use the standard GitHub approach by filing a bug report/feature request here or you use the Survey Solutions user forum.

Please continue to check for updates, as we are constantly working to improve the package as well as integrating any new GraphQL queries or mutations as soon as they are available in Survey Solutions.

[^1] The SurveySolutionsAPIv2 (httr2 version) package uses several of the functions from the susographql package.

Metadata

Version

0.1.6

License

Unknown

Platforms (77)

    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-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • 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