Skip to content

Instantly share code, notes, and snippets.

@andreajparker
Last active May 1, 2024 01:27
Show Gist options
  • Save andreajparker/d8f9b194217046e33accc28f38e467ce to your computer and use it in GitHub Desktop.
Save andreajparker/d8f9b194217046e33accc28f38e467ce to your computer and use it in GitHub Desktop.
2024-04-30 ESSENCE API from CSTE.org for public health surveillance data

Introduction

This is a short tutorial showing you how to make use of the ESSENCE APIs using R. Note that you can learn more about the R package's creators, the Council of State and Territorial Epidemiologists (CTSE), by going to the CTSE website here.

CSTE works to advance public health policy and epidemiologic capacity. We also provide information, education, and developmental support of practicing epidemiologists in a wide range of areas as well as expertise for program and surveillance efforts.

To access the ESSENCE API's documentation you'll need to create a NSSP user profile and log in with that on this page: https://essence.syndromicsurveillance.org/nssp_essence/usersguide/api/documentation.jsp

A note for Pythonistas reading this

Check out `rpy2 tutorial like this one if you'd like to be able to make use of R libraries and call R functions from inside your Python application.

You can also check out reticulate: https://cran.r-project.org/web/packages/reticulate/vignettes/calling_python.html

Installing and using the ESSENCE R package

Since the ESSENCE package is not yet in CRAN we install the ESSENCE package this way in our R terminal:

# install devtools first if you have a fresh R installation
install.packages('devtools')

# install the Rnssp package
devtools::install_github("cdcgov/Rnssp")

If you'd like to review the source code that went into the cdcgov/Rnssp package you can check out the repo here: https://github.com/CDCgov/Rnssp

Additional Reading

These are optional but may be helpful to read through, especially if you're new to epidemiological data, time-series modeling of said data, etc.:

https://cdn.ymaws.com/www.cste.org/resource/resmgr/nssp/intro_tutorial.html

@andreajparker
Copy link
Author

Rnssp training materials from the CDC here:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment