This article describes how to import a data set into a new document via Displayr's API.
- A professional Displayr license with purchased View hours.
- A Company secret API code for your Displayr account (contact Displayr Support by emailing firstname.lastname@example.org).
- Python (see How to Get Started with the Displayr API).
- The importdata.zip file containing the Displayr API for importing data files.
- See Displayr API and Technical Reference for further details.
- Click here to download the zip file which includes a python script, a QScript and an SPSS data set called "Phone.sav".
- Double-click the zip file to open it.
- Save its contents somewhere on your computer or network. Keep the files saved in the same folder location.
- Open importdata.py in a good text editor. Use a text editor such as Notepad, Notepad++, TextPad or Sublime. Do not use Word or WordPad. This file tells Displayr to create the document by running the included QScript.
- OPTIONAL: On line 6, update host_name if you are an Enterprise user with a region-specific server location. This can be copied from your Displayr URL.
- On line 33, insert your Company secret where it says insert-company-secret-here-(contact-displayr-support).
- On line 36 replace insert-new-document-name-here with your desired name for the document to be created. If you wish to overwrite an existing document you will need to first delete that document (otherwise, you will see the message Check that the project name is unique).
- Note, when using a different data set name, the file name must be updated on line 45 of importdata.py and line 4 of the qscript.QScript file.
- Save the updated files.
- Run the script, as described in step 3 of How to Get Started with the Displayr API.