{"id":28534207,"url":"https://github.com/esri/sonar","last_synced_at":"2025-07-07T21:31:12.851Z","repository":{"id":66035536,"uuid":"83259550","full_name":"Esri/sonar","owner":"Esri","description":"Chat bot for asking questions about your community with open data","archived":false,"fork":false,"pushed_at":"2019-06-14T02:55:18.000Z","size":11901,"stargazers_count":48,"open_issues_count":7,"forks_count":8,"subscribers_count":37,"default_branch":"master","last_synced_at":"2025-06-09T17:11:51.622Z","etag":null,"topics":["alexa","arcgishub","aws","bot","facebook","geolocation","gis","government","javascript","location","slack"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Esri.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-02-27T02:25:52.000Z","updated_at":"2025-02-23T12:32:55.000Z","dependencies_parsed_at":"2023-02-22T22:01:40.660Z","dependency_job_id":null,"html_url":"https://github.com/Esri/sonar","commit_stats":{"total_commits":25,"total_committers":2,"mean_commits":12.5,"dds":0.12,"last_synced_commit":"07560b1fd4066d94b0398f745e9d58088721ada2"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Esri/sonar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Esri%2Fsonar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Esri%2Fsonar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Esri%2Fsonar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Esri%2Fsonar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Esri","download_url":"https://codeload.github.com/Esri/sonar/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Esri%2Fsonar/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264149219,"owners_count":23564419,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alexa","arcgishub","aws","bot","facebook","geolocation","gis","government","javascript","location","slack"],"created_at":"2025-06-09T17:10:17.365Z","updated_at":"2025-07-07T21:31:12.840Z","avatar_url":"https://github.com/Esri.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sonar\n\n\u003cimg align=\"right\" src=\"./images/sonar_108.png\" alt=\"sonar logo\"\u003eInformation 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.\n\nSonar bot provides a natural language interface to local government open data and demographic services that helps people ask questions of their community.\n\nThis project is a prototype concept that is still evolving. It currently supports:\n\n- Facebook messenger\n- Slack\n- Alexa Echo Skills\n\n### Demo videos\n\n- [DevSummit 2017 Plenary demo](https://youtu.be/H_cdn2kVB-E?t=4m35s)\n- [Demo Theater including architecture](https://youtu.be/1J5y8sJ9aKI)\n\n## Interface\n\n### Example Commands\n\n- /sonar map of 201 4th St NE, Washington, DC\n- /sonar tell me about trash at 201 4th St NE, Washington, DC\n- @sonar what are the bus stops at stanton park, Washington, DC\n- Speak: safety of 201 4th St NE, Washington, DC\n- Speak: Add note dangerous intersection at 2nd \u0026 constitution, Washington, DC\n- /sonar see notes at 201 4th St NE, Washington, DC\n\n### Slack\n\n- `/sonar map of 708 10th St NE, Washington, DC`\n- `/sonar tell me about trash at 708 10th St NE, Washington, DC`\n\n### Facebook\n\n- [Facebook @sonarhere](http://fb.me/sonarhere)\n- [Messenger @sonarhere](http://m.me/sonarhere)\n\n### Amazon Echo\n\n- Help help {Dataset}\n- Hello Hello Sonar.\n- Hal Open the pod bay doors HAL.\n- Ping ping {Dataset}\n- GetPopulation give me the population of {Location}\n- GetPopulation how many people live nearby {Location}\n- GetPopulation what is the population of {Location}\n- GetPopulation population {Location}\n- GetPopulation people in {Location}\n- GetCrime safety of {Location}\n- GetData what is the {Dataset} of {Location}\n- GetData what is the nearest {Dataset} at {Location}\n- GetData tell me about {Dataset} at {Location}\n- GetData ask about {Dataset} at {Location}\n- GetData when is {Dataset} for {Location}\n- SummarizeData how many {Dataset} at {Location} since {TimePeriod}\n- SummarizeData in past {TimePeriod} how many {Dataset} at {Location}\n- AddNote add note {Note} at {Location}\n- GetMap map of {Location}\n- GetMap see {Dataset} at {Location}\n- ExitApp stop\n\n## Develop\n\nSonar is built with [ClaudiaJS](https://claudiajs.com/) and hosted on Amazon Web Services.\n\nTo start developing, you will need to use an Amazon developer account.\n\n### Quick Start\n\nFirst run trhough the [Installing and Configuring Claudia.js](https://claudiajs.com/tutorials/installing.html) documentation, specifically the parts about installing Claudia globally (`npm install claudia -g`) and [Configuring Access Credentials](https://claudiajs.com/tutorials/installing.html#configuring-access-credentials). Then:\n\n1. Clone this repo\n1. `npm install`\n1. Update your preferred AWS region in `package.json` and `claudia.json`\n1. Create (first time): `npm run create`\n1. Creating will deploy the appropriate API endpoints and lambda functions, but you must also then [configure](https://claudiajs.com/tutorials/hello-world-chatbot.html#connecting-with-facebook-messenger) the platforms you want. For example, \n    1. For Alexa: `claudia update --configure-alexa-skill`\n    1. For Slack: `claudia update --configure-slack-slash-command`\n    1. [etc](https://claudiajs.com/tutorials/hello-world-chatbot.html#connecting-with-facebook-messenger)\n1. Updates: `npm run update` - will re-deploy your code to AWS.\n\n### ArcGIS Token\n\nTo use the geoenrichment services for population, you will need to add an ArcGIS Token to the [Amazon API Gateway Stage Variables](http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-set-stage-variables-aws-console.html)\n\n1. Visit Amazon API Gateway\n1. Within your API, click on \"Stages\"\n1. Click on \"latest\"\n1. Click on tab \"Stage Variables\"\n1. Click on \"Add Stage Variable\"\n1. In Name text input, enter `arcgisToken` and in Value text input enter your token\n1. Click on the gray checkmark to the far right side\n\n\n\n### Update Amazon Lambda functions\n\n`npm run create`\n\n_or_ `claudia create --region us-east-1 --api-module bot`\n\n`npm run update`\n\n_or_ `claudia update`\n\n### Get Logs\n\nRequires [AWS CLI](http://docs.aws.amazon.com/cli/latest/userguide/installing.html).\n\n`npm run logs`\n\n_or_ `aws logs filter-log-events --log-group-name /aws/lambda/claudia-test`\n\n### Licensing\n\nCopyright Esri\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n\u003e http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nA copy of the license is available in the repository's [LICENSE](./LICENSE) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesri%2Fsonar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fesri%2Fsonar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesri%2Fsonar/lists"}