🍻 Open Brewery DB Dataset
This is the open-source dataset for the Open Brewery DB API which is served by a REST API built with Ruby on Rails
🎯 Purpose
Provide an approval-based pipeline to update the dataset and API.
🗄 Data Formats
API
Access the dataset programmatically via the Open Brewery DB API. Use the following tools to get started without any code:
databar.ai
If you don't know how to use APIs, you can use Brewery DB without code through the databar.ai platform.
Postman
A shared Postman collection containing all the API requests to fetch breweries information from the open-source dataset.
🚀 Getting Started
git clone git@github.com:openbrewerydb/openbrewerydb.git
cd openbrewerydb && npm install
🤝 Contributing
For information on contributing to this project, please see the contributing guide and our code of conduct.
- Fork the repository
- Add or update breweries in the CSV (Excel, Google Sheets)
- Submit a Pull Request
Tips
First and foremost, don't worry about messing up! 🙂 Thank you so much for contributing! 🙌
- CSVs are organized by
data/[country]/[state_province]
- Required fields/columns:
name
,brewery_type
,city
,state_province
,postal_code
, andcountry
- When adding a brewery, do not include an
id
. This will be created after review. - Please either add to
breweries.csv
(preferred if adding breweries for a new country) or the individual state/province CSV file. Adding to both at the same time may introduce duplicates/errors.
⚙️ Scripts
These are the npm scripts used to maintain this dataset.
npm run csv:combine
- Combine CSVs from country/state-region folders intobreweries.csv
npm run csv:split
- Splitbreweries.csv
into country/state-region/city CSVsnpm run contributors:add
- Add contributor (interactive CLI)npm run contributors:check
- Check if there are any missing contributorsnpm run contributors:generate
- Generate contributors intoREADME.md
npm run generate:ids
- Generate unique OBDB IDs based on the brewery name and city and overwritebreweries.csv
npm run generate:json
- Generate JSON frombreweries.csv
output tobreweries.json
npm run generate:sql
- Generate PostgreSQL SQL frombreweries.csv
output tobreweries.sql
npm run validate
- Validate CSVs based on JSON Schemanpm run workflow:maintain
- Combine, generate, split (used when updating individual CSVs)
👾 Community
📫 Feedback
Any feedback, please email me.
Cheers! 🍻
Contributors ✨
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!