Giter Club home page Giter Club logo

survey-app's Introduction

Survey App

Here is the live version on my Survey-App

Features

The app is based on a corona virus survey questions that I have found online. It is connected to the google sheets API and let's the user input desired answer, which updates the google sheet provided Here.

Purpose and Functionality

The survey application provides functionality to perform and maintain survey data. In the background the application is using a spread sheet in Google Sheets to read and update the survey data. When the user launches the application, they are presented with the following options:

Screen shot of the app

Option 1 - Complete survey – when this option is selected it gives the opportunity to complete a survey. The user needs to answer one question at the time. In the background there is validation in place based on the data type of the question. There are few data types used in the application:

  • Text – this is a free text used for questions like Name
  • Number – numeric value is expected for questions like Age
  • F/M and Y/N data type – this gives the option to the user to enter one of displayed values.

In all scenarios users are not allowed to move to the next question unless they enter an answer with the valid data type. Once they’ve reached the end of the survey, their answers are written to the spreadsheet.

Option 2 - View all survey result – when this option is selected users are presented with an extract with the data from the entire spreadsheet. The second row is not included as it contains the data types. The data is presented in a table view which makes it easier for the customer to read the data.

Option 3 - View survey result per gender – this selection gives an option to the user to select which gender he would like to see the data for.

Screen shot of the app

When the users select the gender the are presented with a list of data for the specific gender. Again, the data is presented in a table view to make it more user friendly.

Option 4 - View survey results per age group – When this option is selected the user is presented with a sub menu to select which age group, they would like to see the data for.

Screen shot of the app

Once the age group is selected then the customer is presented with the data for the specific age group in a nice table view. They also have an option to move back to the main menu.

Development

For development of this app, I used code institutes mock terminal. The reason for this is simplicity: the user won't therefore have to download any files, but can instead use the python program directly though the browser.

The main thing to do was to figure out the way of getting the sheets from google. This was done installing and importing the gspread module.

Creating the Heroku app

When I created the app, I needed to add two buildpacks from the Settings tab. The ordering is as follows:

  1. heroku/python
  2. heroku/nodejs

I then created a Config Var called PORT. Set this to 8000

I have also created another Config Var called CREDS and paste the JSON into the value field.

Last step taken was to connect my GitHub repository and deploy as normal.

Technologies Used

  • Github - storing code for the project after being pushed.
  • Gitpod - development enviroment for the project.
  • PEP8 - Python code passes through a linter with no significant issues.
  • Google sheets
  • Heroku app

Testing

  • The PEP8 Validator is used to validate the code of my project to ensure there were no syntax errors (PASSED).
  • Giving invalid inputs (strings when numbers are expected, same input twice).
  • Tested in the code institute Heroku Terminal and my local terminal.

The project was manually tested. There weren't any issues apart from one in Option 2 . If more than 5/6 users save survey results, the lay out of the program changes and becomes unstructured and difficult to read the results. As I am not very advanced in Python and the due date of my submission is near I have decided to fix this bug in the future.

Deployment

This project was deployed using code institute's mock Terminal for Heroku.

Deployment Steps:

  • Fork or clone this repository.
  • Create new Heroku app.
  • Set a built back to Python and nodeJs (in this exact order).
  • Link the Heroku app to the repository.
  • Finally click on Deploy.

survey-app's People

Contributors

kristina30 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.