VtBeerTrail


**What does your Instant Answer do?**

Provides an overview of craft beer brewers in the State of Vermont, target audience being craft beer fans and those researching craft beer tourist destinations.

**What problem does your Instant Answer solve (Why is it better than organic links)?**

Aggregates salient information about all the brewers in the state: site, social media, location, branding & logos, and presents it for an individual brewer.  More information is available if the community feels it's appropriate.

**What is the data source for your Instant Answer? (Provide a link if possible)**

**[The Data](http://vtbeertrail.com/data/vtbrewers.json)**

**Why did you choose this data source?**

I authored both this one true data file as well as the site upon which it depends, **[VT Beer Trail](http://www.vtbeertrail.com)**.

**Are there any other alternative (better) data sources?**

There are certainly deeper beer related resources available, but none that are focused solely on Vermont's craft brewers.

**What are some example queries that trigger this Instant Answer?**

"vermont breweries", "vermont beer", "vermont beer trail", "beer trail in vermont"

**Which communities will this Instant Answer be especially useful for? (gamers, book lovers, etc)**

Craft beer fans, beer tourists.

**Is this Instant Answer connected to a DuckDuckHack [Instant Answer idea](https://duck.co/ideas)?**

Not that I am aware.

**Which existing Instant Answers will this one supersede/overlap with?**

N/A

**Are you having any problems? Do you need our help with anything?**

Yes.

The map image you will see in the detail pane of my proposed IA, I find to be the cheesy side of cheesy, but here's why it exists, currently as a placeholder.

Allow me to go backwards one step first.  If I query [crop bistro and brewery location](https://duckduckgo.com/?q=crop+bistro+and+brewery+location), your Places IA properly kicks in and the presentation is fantastic!  Clearly you guys are bringing in two(2) data sources for that presentation: OpenStreetMap (OSM) and Yelp.

The phrase "two data sources" is where I hit my limits.

Ideally to me this proposed IA would incorporate a "real" map in the detail pane, and that is where I would need help, if this is something that can even be exposed to outside contributors!

Here's another thing though, **[The Data File](http://vtbeertrail.com/data/vtbrewers.json)** already has the lat/lon co-ordinates for each brewer's location one needs to send to OSM, so the interim step of asking MapQuest to geo-code a Place seems redundant.

N.B. I have also presented a question within the CSS code comments.

**What are the terms of use for the API? Will DuckDuckGo need specific authorization (e.g. an API key)? Are there any costs associated with API usage?**

Free to use, my contribution.  If there is a specific open source license DDG prefers to work with, I will incorporate that language, however one does that.

**Where did you hear about DuckDuckHack? (For first time contributors)**

I forget :( .  But when I discovered you were located in Paoli, I was sold.

**What does the Instant Answer look like? (Provide a screenshot for new or updated Instant Answers)**

![image](https://cloud.githubusercontent.com/assets/873785/5136935/7a48b820-70fe-11e4-85c4-0becb3a1d92f.png)

## Checklist
Please place an 'X' where appropriate.

[x] Added metadata and attribution information

[x] Wrote test file and added to t/ directory

[x] Verified that instant answer adheres to design guidelines (https://duck.co/duckduckhack/design_styleguide)

[x] Verified that instant answer adheres to code styleguide (https://duck.co/duckduckhack/code_styleguide)

[] Tested cross-browser compatibility

    Please let us know which browsers/devices you've tested on:
    - Windows 8
        [] Google Chrome
        [] Firefox
        [] Opera
        [] IE 10

    - Windows 7
        [] Google Chrome
        [] Firefox
        [] Opera
        [] IE 8
        [] IE 9
        [] IE 10

    - Windows XP
        [] IE 7
        [] IE 8

    - Mac OSX
        [] Google Chrome
        [] Firefox
        [] Opera
        [] Safari

    - iOS (iPhone)
        [] Safari Mobile
        [] Google Chrome
        [] Opera

    - iOS (iPad)
        [] Safari Mobile
        [] Google Chrome
        [] Opera

    - Android
        [] Firefox
        [] Native Browser
        [] Google Chrome
        [] Opera
```

I don't have a device lab :(, just my Ubuntu 12.04 work station, running Chrome and it's amazing Dev-Tools emulator.

I went with the on-line service DDG recommends, www.codio.com, because I was not comfortable messing with/upgrading the Perl version running locally.

I think you'll want to add in a regex here to make sure that "Vermont" or "vt" is in the query. The `triggers` you defined above don't work together, so any query that has any of your `any` triggers, will fire off your `handle`

e.g "Where to buy beer", or "best beer"

Alternatively, if the example queries you've listed are the only things you want to trigger this, I would suggest you make those into your actual triggers.

```perl

triggers startend => "vt breweries", "vermont beer", "vt beer", "vermont beer map" ... ;

handle remainder => sub {
    # we don't want a remainder so bail if it exists
    return if $_;
    return '';
}
```
}