Skip to content

sakethramanujam/cpcbccr-python-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CPCB CCR client

An unofficial python client to obtain data from the CPCB's CCR platform directly into your python environment.

Installation

$ pip install cpcbccr

Usage

  • Importing
>>> import cpcbccr as cpcb
  • Get States
>>> states = cpcb.get_states()
  • Get Cities
>>> cities = cpcb.get_cities(state='Punjab')
  • Get Stations
>>> stations = cpcb.get_stations(city='Amritsar')
  • Get Data
>>> data = cpcb.get_data(from_date='01-01-2020',
                         to_date='02-01-2020',
                         station_id='site_279',
                         criteria='24 Hours')

For more supported criteria check doc-string.

  • Save Data
>>> cpcb.save_data(path='/path/to/file.csv', 
                   from_date='01-01-2020',
                   end_date = '02-01-2020',
                   station_id = 'site_279',
                   criteria = '24 Hours')

Supported Fileformats: csv, xlsx, json

License

MIT License

Contributing

If you find an issue please report/file an issue here or file a pr here

Credits

Made with Python

About

An unofficial python client to obtain cpcb ccr data

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages