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
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.
- From 2023: https://rebeccabarter.com/blog/2023-09-11-from_r_to_python
- From 2022: https://willfondrie.com/2022/01/how-to-use-r-packages-in-python/
- From 2022: https://rviews.rstudio.com/2022/05/25/calling-r-from-python-with-rpy2/
You can also check out reticulate
: https://cran.r-project.org/web/packages/reticulate/vignettes/calling_python.html
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
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
Rnssp
training materials from the CDC here: