<commit_before>Making a CityVoice survey
===========

Making a survey for CityVoice involves three steps:

1. [Writing questions](#writing-questions)
2. [Adding locations](#adding-locations)
3. [Recording audio files](#recording-audio-files)


## Getting started

First you'll want a local copy of the CityVoice files. You can get this by:

- Installing `git` — the Heroku toolbelt is a one-click installer that will do this for you: https://toolbelt.heroku.com/ 
- Opening a command prompt and cloning the CityVoice files:

	`$ git clone <EMAIL>:codeforamerica/cityvoice.git`


## Writing questions

The first step to using CityVoice is deciding what questions you want callers to answer.

There are two types of questions:

- **Agree/disagree questions** — a caller presses 1 or 2 to say whether they agree or disagree with a statement
- **Voice questions** — a caller leaves a voice message that can be listened to by other callers and visitors to the web site

### Configuring questions

You configure your questions by editing the `data/questions.csv` file in your local copy of the CityVoice files. It's easily edited in Excel or a text editor.

Each question requires a bit of information:

1. **Short Name** — This is a shorthand description of the question, will show up on the web page above responses, and also the filename for the mp3 audio file you'll record.
2. **Feedback Type** — This should either be "numerical_response" for an agree/disagree question, or "voice_file" for a voice question.
3. **Question Text** — This is the text of the question. This shows up on the web page and should be similar to the audio text you record for the question.

Questions will be asked in the order that they are in this file. We recommned you put your voice question last.

### Example

Let's walk through an example with questions someone might want to ask about abandoned properties. We'll have two questions:

- One "agree-disagree" question about whether the property should be removed, and
- One voice question for comments about the property

First, we would edit the CSV file to look like this:

![image](screenshots/questions-csv.png)

With our example, the results of this "agree/disagree" question will show up on your CityVoice site like this:

![image](screenshots/question-display.png)

Second, we would record audio files to play to the callers for these two questions, save those files as "short_name.mp3", and put them in the `app/assets/audios/` folder. (Look at the "[Recording audio files](#recording-audio-files)" section below for more info on how to do this.)

![image](screenshots/question-audio-files.png)

Now we're good to go! 



## Adding locations

Next, you want to add locations for your CityVoice survey.

Locations can be either:

- Places you want to ask questions about (for example, an abandoned property)
- Places that you want to segment your feedback by (for example, different neighborhoods)

You can add locations by editing the `data/locations.csv` file. (Similar to the `questions.csv` file, you can edit this in Excel or a text editor.) It looks like this:

![image](screenshots/locations-csv.png)

You will need to provide:

1. **Name** — the name that will show up on the web site
2. **Lat and Long** — the latitude and longitude of the location

There are a number of tools for finding the latitude and longitude of your locations online.

- If you have **a small # of individual locations**, this site is good: http://itouchmap.com/latlong.html
- If you have **a large # of addresses**, you can use site that geocodes addresses, for example [CartoDB](http://www.cartodb.com/) or [BatchGeo](http://batchgeo.com/)


## Recording audio files

The main way people interact with CityVoice is by calling in to a phone number and responding to different voice prompts. So to use CityVoice, you will need to record some audio files for your survey (in an mp3 format).

Here are some easy-to-use programs for recording audio:

- On Mac, Quicktime
- On Windows, Sound Recorder
- On Linux, [Audacity](http://audacity.sourceforge.net/)


### Required — audio files you have to record yourself
<commit_msg>Add link to mp3recorder.com in making a survey documentation<commit_after>Making a CityVoice survey
===========

Making a survey for CityVoice involves three steps:

1. [Writing questions](#writing-questions)
2. [Adding locations](#adding-locations)
3. [Recording audio files](#recording-audio-files)


## Getting started

First you'll want a local copy of the CityVoice files. You can get this by:

- Installing `git` — the Heroku toolbelt is a one-click installer that will do this for you: https://toolbelt.heroku.com/ 
- Opening a command prompt and cloning the CityVoice files:

	`$ git clone <EMAIL>:codeforamerica/cityvoice.git`


## Writing questions

The first step to using CityVoice is deciding what questions you want callers to answer.

There are two types of questions:

- **Agree/disagree questions** — a caller presses 1 or 2 to say whether they agree or disagree with a statement
- **Voice questions** — a caller leaves a voice message that can be listened to by other callers and visitors to the web site

### Configuring questions

You configure your questions by editing the `data/questions.csv` file in your local copy of the CityVoice files. It's easily edited in Excel or a text editor.

Each question requires a bit of information:

1. **Short Name** — This is a shorthand description of the question, will show up on the web page above responses, and also the filename for the mp3 audio file you'll record.
2. **Feedback Type** — This should either be "numerical_response" for an agree/disagree question, or "voice_file" for a voice question.
3. **Question Text** — This is the text of the question. This shows up on the web page and should be similar to the audio text you record for the question.

Questions will be asked in the order that they are in this file. We recommned you put your voice question last.

### Example

Let's walk through an example with questions someone might want to ask about abandoned properties. We'll have two questions:

- One "agree-disagree" question about whether the property should be removed, and
- One voice question for comments about the property

First, we would edit the CSV file to look like this:

![image](screenshots/questions-csv.png)

With our example, the results of this "agree/disagree" question will show up on your CityVoice site like this:

![image](screenshots/question-display.png)

Second, we would record audio files to play to the callers for these two questions, save those files as "short_name.mp3", and put them in the `app/assets/audios/` folder. (Look at the "[Recording audio files](#recording-audio-files)" section below for more info on how to do this.)

![image](screenshots/question-audio-files.png)

Now we're good to go! 



## Adding locations

Next, you want to add locations for your CityVoice survey.

Locations can be either:

- Places you want to ask questions about (for example, an abandoned property)
- Places that you want to segment your feedback by (for example, different neighborhoods)

You can add locations by editing the `data/locations.csv` file. (Similar to the `questions.csv` file, you can edit this in Excel or a text editor.) It looks like this:

![image](screenshots/locations-csv.png)

You will need to provide:

1. **Name** — the name that will show up on the web site
2. **Lat and Long** — the latitude and longitude of the location

There are a number of tools for finding the latitude and longitude of your locations online.

- If you have **a small # of individual locations**, this site is good: http://itouchmap.com/latlong.html
- If you have **a large # of addresses**, you can use site that geocodes addresses, for example [CartoDB](http://www.cartodb.com/) or [BatchGeo](http://batchgeo.com/)


## Recording audio files

The main way people interact with CityVoice is by calling in to a phone number and responding to different voice prompts. So to use CityVoice, you will need to record some audio files for your survey (in an mp3 format).

The absolute easiest way to record audio is to go to:

- http://www.recordmp3.org/

where you can record audio in your browser.

You can alternately use a desktop program for recording audio on the desktop for example: Quicktime (Mac), Sound Recorder (Windows), or Audacity.


### Required — audio files you have to record yourself

{'fraction_non_alphanumeric': 0.07442906164950894, 'fraction_numerical': 0.0033132173707253578, 'mean_word_length': 4.295739348370927, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 3, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '187972', 'n_tokens_mistral': 2341, 'n_tokens_neox': 2193, 'n_words': 1248}