Este README está disponible en Español
This is a fork of Gobierto budgets comparator for Generalitat de Catalunya. Check the live site at: http://pressupostosmunicipals.transparenciacatalunya.cat.
Gobierto budgets comparator is a budgets comparison tool to enable citizens to explore, visualize, compare and contextualize the budgets of multiple municipalities/public bodies at the same time (such as those of a given Province, Autonomous Region or Country). We use data from the Consorci d'Administració Oberta de Catalunya (AOC) (view budgeting data and execution data) and from the INE.
Gobierto is being built in the open by Populate, a product design studio around civic engagement based in Madrid, Spain. We provide commercial services around data journalism, news products, open data... and Gobierto, of course ;)
- #todo Why we build Gobierto and our design philosophy
More info:
- Main site (spanish): gobierto.es
- Blog (spanish): gobierto.es/blog
File an issue.
The application is written in the Ruby programming language and uses the Ruby on Rails framework. In the database layer uses Postgres. Also, it uses an external Elastic Search to store and process all the budgets and third-party data.
- Git
- Ruby 2.7.4
- Rubygems
- PostgreSQL
- Elastic Search
- Pow or another subdomains tool
Once you have PostgreSQL running and have cloned the repository, do the following:
$ cd gobierto
$ cp config/database.yml.example config/database.yml
$ cp config/secrets.yml.example config/secrets.yml
$ bundle install
$ rake db:setup
See how
Once it is running, make sure you enter the correct URL for your Elastic Search instance in config/secrets.yml
under the elastic_url
key
If you want to import some basic data to get started, do the following:
- Clone this repo and follow the instructions in order to have all of the Spanish Budgetary data available to load.
- Run
bin/rake gobierto_budgets:setup:sample_site
This will load data for Madrid, Barcelona and Bilbao and setup a site for Madrigal de la Vera.
Alternatively, learn how to load the data for all or some municipalities in Spain.
When working locally, the application server should be queried through the top-level domain .gobierto.dev
. To configure this host in your computer, the simplest way is through POW POW. To install:
curl get.pow.cx | sh
Then, configure the host like this:
cd ~/.pow
ln -s DIRECTORY/gobierto gobierto
Then just browse to http://presupuestos.gobierto.dev/ and the app should load.
Run:
bin/rake gobierto_budgets:setup:create_site['<Place ID>','<URL OF INSTITUTION>']
Where <Place ID>
is the ID of the municipality you wish to setup the site for and the optional <URL OF INSTITUTION>
is the URL for other municipality's website, if any.
ToDo: Document the format of budget data needed to import it.
Yes! See contributing
- Gems: See Gemfile for complete reference
- Other (CSS, JS): #ToDo (browse source meanwhile ;)
Code published under AFFERO GPL v3 (see LICENSE-AGPLv3.txt)