GithubHelp home page GithubHelp logo

isabella232 / sonar-2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from esri/sonar

0.0 0.0 0.0 11.72 MB

Chat bot for asking questions about your community with open data

License: Apache License 2.0

JavaScript 100.00%

sonar-2's Introduction

Sonar

sonar logoInformation should be easily accessible and ubiquitous. Often data requires complex user experiences through limited devices. Instead, what if data can be conversational through commonly used communications tools like Facebook Messenger and Amazon Alexa voice recognition.

Sonar bot provides a natural language interface to local government open data and demographic services that helps people ask questions of their community.

This project is a prototype concept that is still evolving. It currently supports:

  • Facebook messenger
  • Slack
  • Alexa Echo Skills

Demo videos

Interface

Example Commands

  • /sonar map of 201 4th St NE, Washington, DC
  • /sonar tell me about trash at 201 4th St NE, Washington, DC
  • @sonar what are the bus stops at stanton park, Washington, DC
  • Speak: safety of 201 4th St NE, Washington, DC
  • Speak: Add note dangerous intersection at 2nd & constitution, Washington, DC
  • /sonar see notes at 201 4th St NE, Washington, DC

Slack

  • /sonar map of 708 10th St NE, Washington, DC
  • /sonar tell me about trash at 708 10th St NE, Washington, DC

Facebook

Amazon Echo

  • Help help {Dataset}
  • Hello Hello Sonar.
  • Hal Open the pod bay doors HAL.
  • Ping ping {Dataset}
  • GetPopulation give me the population of {Location}
  • GetPopulation how many people live nearby {Location}
  • GetPopulation what is the population of {Location}
  • GetPopulation population {Location}
  • GetPopulation people in {Location}
  • GetCrime safety of {Location}
  • GetData what is the {Dataset} of {Location}
  • GetData what is the nearest {Dataset} at {Location}
  • GetData tell me about {Dataset} at {Location}
  • GetData ask about {Dataset} at {Location}
  • GetData when is {Dataset} for {Location}
  • SummarizeData how many {Dataset} at {Location} since {TimePeriod}
  • SummarizeData in past {TimePeriod} how many {Dataset} at {Location}
  • AddNote add note {Note} at {Location}
  • GetMap map of {Location}
  • GetMap see {Dataset} at {Location}
  • ExitApp stop

Develop

Sonar is built with ClaudiaJS and hosted on Amazon Web Services.

To start developing, you will need to use an Amazon developer account.

Quick Start

First run trhough the Installing and Configuring Claudia.js documentation, specifically the parts about installing Claudia globally (npm install claudia -g) and Configuring Access Credentials. Then:

  1. Clone this repo
  2. npm install
  3. Update your preferred AWS region in package.json and claudia.json
  4. Create (first time): npm run create
  5. Creating will deploy the appropriate API endpoints and lambda functions, but you must also then configure the platforms you want. For example,
    1. For Alexa: claudia update --configure-alexa-skill
    2. For Slack: claudia update --configure-slack-slash-command
    3. etc
  6. Updates: npm run update - will re-deploy your code to AWS.

ArcGIS Token

To use the geoenrichment services for population, you will need to add an ArcGIS Token to the Amazon API Gateway Stage Variables

  1. Visit Amazon API Gateway
  2. Within your API, click on "Stages"
  3. Click on "latest"
  4. Click on tab "Stage Variables"
  5. Click on "Add Stage Variable"
  6. In Name text input, enter arcgisToken and in Value text input enter your token
  7. Click on the gray checkmark to the far right side

Update Amazon Lambda functions

npm run create

or claudia create --region us-east-1 --api-module bot

npm run update

or claudia update

Get Logs

Requires AWS CLI.

npm run logs

or aws logs filter-log-events --log-group-name /aws/lambda/claudia-test

Licensing

Copyright Esri

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

A copy of the license is available in the repository's LICENSE file.

sonar-2's People

Contributors

ajturner avatar gavinr 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.