Skip to content

Saraiva-Educacao/survey-monkey-api-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

survey-monkey-api-python

Script to handle data from Survey Monkey (SM) data and save tables an schemas of tables in JSON files in local directory.
For more information about the API endpoints of SM, please refer to documentation.

Development Environment

To create the development environment it's recommended to use conda.

Run the following commands to get the environment ready

conda create -n ENVIRONMENT_NAME python=3.8
conda activate ENVIRONMENT_NAME
pip install -r requirements.txt

You might need environment variable SM_ACCESS_TOKEN to be used in requests to Survey Monkey API.

export SM_ACCESS_TOKEN='YOUR TOKEN'

Running

There is a function that collects data for all surveys in SM account of interest.
The SM account of interest need to be a paid account to access endpoint with details of responses.
The default in api.py is to collect and insert the data in JSON files for each table and for each schema, as following:

Table Surveys

  • 'survey_id': unique ID of the interest survey
  • 'title_survey': title of the interest survey
  • 'nick_survey': tags of interest survey
  • 'link_survey': link of interest survey
  • 'response_count': number of responses survey has received
  • 'date_created' date of creation of survey
  • 'date_modified' last moment which the survey was modified
  • Table questions:

  • 'survey_id': unique ID of the interest survey
  • 'page_id': unique ID of interest page
  • 'question_id': unique ID per question of survey
  • 'question_position': position of question in survey of interest
  • 'question': label of question
  • 'item': items to evaluate in question, like 'Espaço Físico', 'Variedade de itens', etc
  • 'choices': rank/option avaliabe to select, like 1 to 5 or 'insatisfeito' to 'muito satisfeito'
  • Table responses:

  • 'response_id': unique ID per set of answers of survey of one person
  • 'survey_id': unique ID of the interest survey
  • 'page_id': unique ID of interest page
  • 'question_id': unique ID per question of survey
  • 'question_label': label of question
  • 'item_id': unique ID per item to evaluate/rating question of survey
  • 'item_label': label of item to evaluate/rating question
  • 'answer': answer of question of interest
  • 'total_time': total time in seconds which the respondant spent on the survey
  • 'date created': date of creation of set of answers
  • 'date modified': last moment which the set of answers was modified
  • PS:

  • When 'item_id' and 'item_label' = Not apply is because this question doesn't have item to evaluate/rating
  • When 'answer' = Sensitive data is because this answer is the CPF of person respondent
  • Running

    python main.py
    

    Releases

    No releases published

    Packages

     
     
     

    Languages