Publicos.pt is an open source Django website and API to query and analyse data of the portuguese state. Thanks for checking it out.
This website aims to:
and consists in 4 components:
We focus on three aspects of the portuguese state:
We use Django ORM for the API and database and d3.js for visualisations of statistical quantities of the database. The official website is written in English and translated to portuguese (via i18n), also hosted here.
The code is licenced under BSD.
The API and the crawler are documented.
The installation depend on what you want to do:
1- Install Django, psycopg2 and django-treebeard:
pip install -r api_requirements.txt
2- Download the source
git clone [email protected]:jorgecarleitao/public-contracts.git
3- Enter in the project's directory:
cd public-contracts
4- Run the example:
python -m contracts.tools.example
you should see two numbers. You now have full access to the database.
1- Install the requirements:
pip install -r website_requirements.txt
2- Start the server:
python manage.py runserver
3- Enter in the url 127.0.0.1:8000
.
You should see the website as it is in http://publicos.pt.
Some plots will not be displayed right away because they take some time to be
computed, but 127.0.0.1:8000/contratos
should show the latest contracts.
To be able to use crawlers, you need to install two extra dependencies: requests and pt-law-downloader:
pip install -r production_requirements.txt
If something went wrong, please report an issue so we can help you and improve these instructions.