Caravel - sweet time based visualisation and dashboard reporting - written in python! Source
Markdown source
1---2title: 'Caravel - sweet time based visualisation and dashboard reporting - written in python!'3date: '2016-04-06'4published_at: '2016-04-06T19:34:00.001+10:00'5tags: ['airbnb', 'databases', 'open source', 'python', 'reporting', 'software']6author: 'Gavin Jackson'7excerpt: 'The fine folks at airbnb recently opensourced an amazing software product called caravel. It is a web-based data visualisation and dashboarding application. It looks amazing and I hope to share some o...'8updated_at: '2016-04-06T19:34:56.122+10:00'9legacy_url: 'http://www.gavinj.net/2016/04/caravel-sweet-time-based-visualisation.html'10---1112[](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHL35EvwSpZRjLl4ZUxnyXBRbbTN0B4cfXxFwY7oHBHiM8ETBVVI5bXXKRn_J3K4641fBff59LsnduvGVKTGS_CAJOWSIRe-he85JAjRU00EFy40YyLBCGrUtPaxuBed5Cq7kCSx9kGuA/s1600/caravel_screenshot_1.png)1314The fine folks at airbnb recently opensourced an amazing software product called caravel. It is a web-based data visualisation and dashboarding application. It looks amazing and I hope to share some of my experiences getting it up and working.1516https://github.com/airbnb/caravel1718Things I love about this tool:19201. It's 100% open source - no "paid" or "locked" features - what you see is what you get.212. It's a big, beautiful python application, I think it is amazing to see a product of such scale that uses libraries that I use on a day to day basis - I'm looking forward to reading the source code of this app!223. Although the documentation is light on (presently), it does work as described - it's not just a marketing gimmick - and they have a very cool looking road map for future improvements (including python 3 support!).234. It fills a niche that other open source reporting tools (such as Jasper and Pentaho) don't do well - time-based tactical views on data.245. The sqlalchemy support means that most databases are supported out of the box.256. The druid integration provides future expansion for large/aggregated datasets (you can see why airbnb would be interested in this).2627Things that could be improved:28291. It does not support table joins out of the box - which means that I'm going to have to set up some views in my database to produce meaningful reports.302. All of the graphs seem to require time based data - not everything i want to report on has a temporal element.313. The spatial support is pretty rudimentary, it's really based on ISO country code - I would imagine that it is beyond the scope of the project to hook in to postgis and supply an openlayers widget (but what a possibility!).3233What an amazing open source tool - bravo to the developers and to airbnb for releasing this for us to use and expand!3435[](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbVMo7lJuyhnuaXiKRev2uNO8A1_B0bKmyh9ONUxfo6S4EhW9-SUBxrs4nTQ3yFDE_67-g2k2UwV6NB4hTtgUfrPd9xNIkmVQgMwdFTzp_LAhHOnV2Rhh9aX8XmYNOjYNd_vwRiwaB2TM/s1600/caravel_screenshot_2.png)3637## Installing caravel on Mac OSX 10.11.4 *El Capitan*3839Below are my OSX installation notes (hopefully some folks out there may find them useful).4041Firstly it is currently python 2.7 only which means you have to re-learn how to use virtualenv. On Linux this is pretty straight forward, on OSX it required a bit of mucking around.4243**Step 1 - Install xcode (via app store)**4445then run xcode-select --install4647**Step 2 - install home-brew**4849Old versions can be problematic (so you can uninstall and reinstall if necessary)5051`ruby -`e "$(curl -fsSL [https://raw.githubusercontent.com/Homebrew/install/master/uninstall](https://raw.githubusercontent.com/Homebrew/install/master/uninstall))"5253`ruby`-e "$(curl -fsSL [https://raw.githubusercontent.com/Homebrew/install/master/install](https://raw.githubusercontent.com/Homebrew/install/master/install))"5455**Step 3 - install python 2.7 (caravel does not support python 3 … yet)**5657I then had to fix the python path (as it kept pointing to /usr/bin)5859brew link —overwrite python6061**Step 4 - install virtualenv**6263pip install virtualenv6465**Step 5 - create virtualenv**6667(note: this is the old python 2.7 way of doing things, python 3 introduced pyvenv)6869virtualenv venv_caravel7071**Step 6 - activate virtualenv**7273../venv_caravel/bin/activate7475**Step 7 - follow the caravel installation instructions**7677** **7879I had to run the following to successfully install the cryptography library:8081env LDFLAGS="-L$(brew --prefix openssl)/lib" CFLAGS="-I$(brew --prefix openssl)/include" pip install cryptography8283# Install caravel84pip install caravel8586# Create an admin user87fabmanager create-admin --app caravel8889# Initialize the database90caravel db upgrade9192# Create default roles and permissions93caravel init9495# Load some data to play with96caravel load_examples9798# Start the development web server99caravel runserver -d100101102