A collection of generic classes and function which can be used by other CBS Python scripts.
This module contains the following categories
- misc - a set of miscellaneous classes and functions
- readers - tools to read standard data file:
- SbiInfo: Reader of the SBI classification file. Can be used to classify list of sbi codes
- StatLineTable: Reader of the open data StatLine tables. Turned into a pandas data frame
- plotting - Some cbs color definitions
- web_scraping - Web scraping utilities and classes
- string_measures - Some string utilities
- Intranet documentation: docs
- Internet documentation: readthedocs
In order to run the standard unit test do
python setup.py test
Installation of the CBS package can be done under linux using pip as
directory X:(X is the network drive installation folder)
In the conda command terminal, go to the location where you have downloaded the repository and run
pip install -e cbs_utils --prefix=X:
In case you want to install the package in your user environment do
pip install -e cbs_utils --user
Installation of the CBS package can be done under windows in the the directory X:(X is the network drive installation folder) as
In the conda command terminal, go to the location where you have downloaded the repository and run
cd cbs_utils
python setup.py sdist
In case you want to install the package in your user environment do
pip install cbs_utils --no-index --find-links dist/cbs_utils_versionnumber.tgz --prefix=X:
For upgrading the package the upgrade option -U needs to be supplied
pip install cbs_utils-0.4.9.py3-none-any.whl --prefix=X:-U
To install the documentation first create a directory X:/docs/cbs_utils and then go into the cbs_utils directory and run
python setup.py docs --build-dir X:/docs/cbs_utils
At least the following packages are required for this module to run
- numpy
- pathlib
- yamlloader
- pandas
- pint
- statsmodels
Some example recipes to use the package can be found here
- Web Scraping With cbs_utils:
- :download:`../examples/web_scraping_examples.html` (static html)
- :download:`../examples/web_scraping_examples.ipynb` (jupyter notebook)
- OpenData Reading en Plotting:
- :download:`../examples/statline_plot.html` (static html)
- :download:`../examples/statline_plot.ipynb` (jupyter notebook)
In case you want to contribute to this package or just have a look at the total pacakge you can do the following
Open the git terminal and go to your working directory
Clone the repository from the github:
git clone http://github/git/Python_repositories/cbs_utils.git
Go the newly created cbs_utils directory or open it in PyCharm as a new project
Create a new branch for your own developments:
git checkout -b dev_my_name
Start doing your work and when done do:
git add . git commit -m 'my developments'
Push your work to the development repository as your personal branch:
git push -u origin dev_my_name
Notify the owner of this package
This project has been set up using PyScaffold 3.0.3. For details and usage information on PyScaffold see http://pyscaffold.org/.