> For the complete documentation index, see [llms.txt](https://mchi.gitbook.io/pophr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mchi.gitbook.io/pophr/r-api/quick-start.md).

# Quick Start

An R Project that serves as an API for R developers with authentication to query data from the PopHR Server

### PopHR API for R

R Interface to communicate with a PopHR server. It can be used to query both its data and knowledge. We built this interface for users to use PopHR's data in new and innovative ways.

* Perform advanced analysis&#x20;
* Visualize its data in innovative ways&#x20;
* Connect its data with other available sources&#x20;
* and many more

### Getting Started

Access your favorite PopHR instance; [click here](https://pophr.mchi.mcgill.ca/registration/index.html?token=eyJhY2Nlc3NUb2tlbiI6InlhMjkuR21oeUI3MmcxTEF5WG9WemlUVVZDWTJ5RUEwY29jWXhkNXFnX1A3SVRfa2c1eGZzakZmSVJHVXE4QWZSWGxNV1lVM0FpMk1MNVFqb1doT2FpYzZLN3dETkQ1T25WUDdyQjFVUWFVSkJvc1hudzlUNjVudFBSMzEyZ1ZuR1JuLXRyMDB0bEdnTkhEYmI0USIsInVzZXJJZCI6IjEwNTIyNzM0MzIzNzU4NzIxNDQwMCIsInByb3ZpZGVyIjoiR29vZ2xlIiwiaXNWYWxpZCI6dHJ1ZX0=) for the public version of Quebec data or [click here](https://pophr-ca.mchi.mcgill.ca) for Canada version. Once you have a registered account (only need for accessing Quebec data), download and look at the `vignettes/exploration.Rmd` file in this repository. Using the RStudio IDE will make this much easier.

From there, feel free to look at the package's documentation.

### Step by Step Instruction to Use PopHR API

1. In [pophr-r-api page](http://git.mchi.mcgill.ca/PHIRE/pophr-r-api.git), under `"Project"` tab, click the download icon to download the repository&#x20;
2. Unzip the downloaded file, shorten the folder name if necessary&#x20;
3. Double click on the `"pophrpkg.Rproj"` file to open the pophr project using RStudio&#x20;
4. In the panel of `"Environment, History..."`, click on the tab `"Build"`,&#x20;
5. Click on `"Install and Restart"` and waite until the process is done&#x20;
6. Open the `vignettes/exploration.Rmd` file in this repository to explore the functions and datasets in this package

### Collaboration

This library does not at the moment accept merge requests, but suggestions or collaborations are welcome. Please communicate with us using the email address in the PopHR web application.

### Authors

**Ben Willetts** - Dev Team

**Maxime Lavigne** - Dev Team

**Mengru Yuan** - Scientific Team

### License

The copyright to this library belongs to McGill university and the MCHI research group. Users are free to use or modify this code in non-commercial ways. Use this code at your own risk. This statement will be refined later.
