Himachal Pradesh Fiscal Data explorer for Open Budgets India Platform.
git clone https://github.com/CivicDataLab/hp-fiscal-data-explorer.git
pip install pipenv
cd scraper
cp scraper/settings/settings.py scraper/settings/local.py
pipenv install --three --ignore-pipfile
cp scraper/settings/settings.py scraper/settings/local.py
- Edit the
scraper/settings/local.py
with setting values you want to keep likeDOWNLOAD_DELAY
,CONCURRENT_REQUESTS
and custom settings likeDATASETS_PATH
etc. - create a
datasets
directory at the path specified byDATASET_PATH
variable. e.g.hp-fiscal-data-explorer/scraper/datasets
if you didn't update the default value of the variableDATASET_PATH
.
. $(pipenv --venv)/bin/activate
scrapy crawl ddo_collector
For Treasury Expenditure.
scrapy crawl treasury_expenditures -a start=20190501 -a end=20190531
For Treasury Receipts.
scrapy crawl treasury_receipts -a start=20190501 -a end=20190531
For Budget Expenditure.
scrapy crawl budget_expenditures -a date=20190531
NOTES:
- the arguments
start
andend
specifies the date range for datasets. The date format isyyyymmdd
. - the datasets will be
CSV
files with name in the format:treasury_expenditures_<treasury>_<ddo>_<timestamp>.csv
for expenditures.