cr.cube-3.0.9
3.0.9
3.0.8
3.0.7
3.0.6
3.0.5
3.0.4
3.0.30
3.0.3
3.0.29
3.0.28
3.0.27
3.0.26
3.0.25
3.0.24
3.0.23
3.0.22
3.0.21
3.0.20
3.0.2
3.0.19
3.0.18
3.0.17
3.0.16
3.0.15
3.0.14
3.0.13
3.0.12
3.0.11
3.0.10
3.0.1
3.0.0
2.3.9
2.3.8
2.3.7
2.3.6
2.3.5
2.3.4
2.3.3
2.3.2
2.3.1
2.3.0
2.2.3
2.2.2
2.2.1
2.2.0
2.1.9
2.1.8
2.1.7
2.1.6
2.1.5
2.1.4
2.1.34
2.1.33
2.1.32
2.1.31
2.1.30
2.1.3
2.1.29
2.1.28
2.1.27
2.1.26
2.1.25
2.1.24
2.1.23
2.1.22
2.1.21
2.1.20
2.1.2
2.1.19
2.1.18
2.1.17
2.1.16
2.1.15
2.1.14
2.1.13
2.1.12
2.1.11
2.1.10
2.1.1
2.1.0
2.0.3
2.0.2
2.0.1
2.0.0
1.9.9
1.9.8
1.9.7
1.9.6
1.9.5
1.9.4
1.9.3
1.9.2
1.9.19
1.9.18
1.9.17
1.9.16
1.9.15
1.9.14
1.9.13
1.9.12
1.9.11
1.9.10
1.9.1
1.9.0
1.8.6
1.8.5
1.8.4
1.8.3
1.8.2
1.8.1
1.8.0
1.7.3
1.7.2
1.7.0
1.6.8
1.6.7
1.6.6
1.6.5
1.6.3
1.6.11
1.6.10
1.6.1
1.6.0
1.5.6
1.5.3
1.5.2
1.5.1
1.5.0
1.4.5
1.4.4
1.4.3
1.4.2
1.4.1
1.4
1.3
1.2
1.12.9
1.12.8
1.12.7
1.12.6
1.12.5
1.12.4b0
1.12.4
1.12.3
1.12.2
1.12.1a0
1.12.11rc0
1.12.11b0
1.12.11
1.12.10
1.12.1
1.12.0a0
1.11.9
1.11.8
1.11.7
1.11.6
1.11.5
1.11.4
1.11.37
1.11.36
1.11.35
1.11.34
1.11.33
1.11.32
1.11.31
1.11.30
1.11.3
1.11.29
1.11.28
1.11.27
1.11.26
1.11.25
1.11.24
1.11.23
1.11.22
1.11.21
1.11.20
1.11.2
1.11.19
1.11.18
1.11.17
1.11.16
1.11.15
1.11.14
1.11.13
1.11.12
1.11.11
1.11.10
1.11.1
1.11.0
1.10.6
1.10.5
1.10.4
1.10.3
1.10.2
1.10.1
1.10.0
1.0
3.0.9
3.0.8
3.0.7
3.0.6
3.0.5
3.0.4
3.0.30
3.0.3
3.0.29
3.0.28
3.0.27
3.0.26
3.0.25
3.0.24
3.0.23
3.0.22
3.0.21
3.0.20
3.0.2
3.0.19
3.0.18
3.0.17
3.0.16
3.0.15
3.0.14
3.0.13
3.0.12
3.0.11
3.0.10
3.0.1
3.0.0
2.3.9
2.3.8
2.3.7
2.3.6
2.3.5
2.3.4
2.3.3
2.3.2
2.3.1
2.3.0
2.2.3
2.2.2
2.2.1
2.2.0
2.1.9
2.1.8
2.1.7
2.1.6
2.1.5
2.1.4
2.1.34
2.1.33
2.1.32
2.1.31
2.1.30
2.1.3
2.1.29
2.1.28
2.1.27
2.1.26
2.1.25
2.1.24
2.1.23
2.1.22
2.1.21
2.1.20
2.1.2
2.1.19
2.1.18
2.1.17
2.1.16
2.1.15
2.1.14
2.1.13
2.1.12
2.1.11
2.1.10
2.1.1
2.1.0
2.0.3
2.0.2
2.0.1
2.0.0
1.9.9
1.9.8
1.9.7
1.9.6
1.9.5
1.9.4
1.9.3
1.9.2
1.9.19
1.9.18
1.9.17
1.9.16
1.9.15
1.9.14
1.9.13
1.9.12
1.9.11
1.9.10
1.9.1
1.9.0
1.8.6
1.8.5
1.8.4
1.8.3
1.8.2
1.8.1
1.8.0
1.7.3
1.7.2
1.7.0
1.6.8
1.6.7
1.6.6
1.6.11
1.6.10
1.5.3
1.5.2
1.5.1
1.5.0
1.4.5
1.4.4
1.4.3
1.4.2
1.4.1
1.4
1.3
1.2
1.12.9
1.12.8
1.12.7
1.12.6
1.12.5
1.12.4b0
1.12.4
1.12.3
1.12.2
1.12.1a0
1.12.11rc0
1.12.11b0
1.12.11
1.12.10
1.12.1
1.12.0a0
1.11.9
1.11.8
1.11.7
1.11.6
1.11.5
1.11.4
1.11.37
1.11.36
1.11.35
1.11.34
1.11.33
1.11.32
1.11.31
1.11.30
1.11.3
1.11.29
1.11.28
1.11.27
1.11.26
1.11.25
1.11.24
1.11.23
1.11.22
1.11.21
1.11.20
1.11.2
1.11.19
1.11.18
1.11.17
1.11.16
1.11.15
1.11.14
1.11.13
1.11.12
1.11.11
1.11.10
1.11.1
1.11.0
1.10.6
1.10.5
1.10.4
1.10.3
1.10.2
1.10.1
1.10.0
1.1
1.0
0.1
توضیحات
Crunch.io Cube library
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | cr.cube-3.0.9 |
| نام | cr.cube |
| نسخه کتابخانه | 3.0.9 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Crunch.io |
| ایمیل نویسنده | dev@crunch.io |
| آدرس صفحه اصلی | https://github.com/Crunch-io/crunch-cube/ |
| آدرس اینترنتی | https://pypi.org/project/cr.cube/ |
| مجوز | MIT License |
# crunch-cube
Open Source Python implementation of the API for working with CrunchCubes
## Introduction
This package contains the implementation of the CrunchCube API. It is used to
extract useful information from CrunchCube responses (we'll refer to them as
_cubes_ in the subsequent text). _Cubes_ are obtained from the *Crunch.io*
platform, as JSON responses to the specific _queries_ created by the user.
These queries specify which data the user wants to extract from the Crunch.io
system. The most common usage is to obtain the following:
- Cross correlation between different variable
- Margins of the cross tab _cube_
- Proportions of the cross tab _cube_ (e.g. proportions of each single element to the entire sample size)
- Percentages
When the data is obtained from the Crunch.io platform, it needs to be
interpreted to the form that's convenient for a user. The actual shape of the
_cube_ JSON contains many internal details, which are not of essence to the
end-user (but are still necessary for proper _cube_ functionality).
The job of this library is to provide a convenient API that handles those
intricacies, and enables the user to quickly and easily obtain (extract) the
relevant data from the _cube_. Such data is best represented in a table-like
format. For this reason, the most of the API functions return some form of the
`ndarray` type, from the `numpy` package. Each function is explained in greater
detail, uner its own section, under the API subsection of this document.
## Installation
The `cr.cube` package can be installed by using the `pip install`:
pip install cr.cube
### For developers
For development mode, `cr.cube` needs to be installed from the local checkout
of the `crunch-cube` repository. It is strongly advised to use `virtualenv`.
Assuming you've created and activated a virtual environment `venv`, navigate
to the top-level folder of the repo, on the local file system, and run:
pip install -e .
or
python setup.py develop
### Running tests
To setup and run tests, you will need to install `cr.cube` as well as testing
dependencies. To do this, from the root directory, simply run:
pip install -e .[testing]
And then tests can be run using `py.test` in the root directory:
pytest
## Usage
After the `cr.cube` package has been successfully installed, the usage is as
simple as:
>>> from cr.cube.cube import Cube
>>> ### Obtain the crunch cube JSON payload using app.crunch.io, pycrunch, rcrunch or scrunch
>>> ### And store it in the 'cube_JSON_response' variable
>>> cube = Cube(cube_JSON_response)
>>> print(cube)
Cube(name='MyCube', dimension_types='CAT x CAT')
>>> cube.counts
np.array([[1169, 547],
[1473, 1261]])
## API
### `as_array`
Tabular, or matrix, representation of the _cube_. The detailed description can
be found
[here](http://crunch-cube.readthedocs.io/en/latest/cr.cube.html#cr-cube-crunch-cube-module).
### `margin`
Calculates margins of the _cube_. The detailed description can be found
[here](http://crunch-cube.readthedocs.io/en/latest/cr.cube.html#cr-cube-crunch-cube-module).
### `proportions`
Calculates proportions of single variable elements to the whole sample size.
The detailed description can be found
[here](http://crunch-cube.readthedocs.io/en/latest/cr.cube.html#cr-cube-crunch-cube-module).
### `percentages`
Calculates percentages of single variable elements to the whole sample size.
The detailed description can be found
[here](http://crunch-cube.readthedocs.io/en/latest/cr.cube.html#cr-cube-crunch-cube-module).
---
[](https://travis-ci.org/Crunch-io/crunch-cube)
[](https://codecov.io/gh/Crunch-io/crunch-cube)
[](http://crunch-cube.readthedocs.io/en/latest/?badge=latest)
[](https://www.codefactor.io/repository/github/crunch-io/crunch-cube)
---
## Changes
### 3.0.30
- Date format representation
- Fix payload order for insertions in weird order
### 3.0.29
- Bug fix for H&S overlaps for MR
### 3.0.28
- Bug fix hidden subvars in MR with insertions
### 3.0.27
- Implement overlaps for CAT H&S
### 3.0.26
- Fix bug when dimension's format is set to null in JSON
### 3.0.25
- Support date formatting on datetime dimension labels
### 3.0.24
- Drop support for diff subtotals in population measure
- Enable Cat insertions across Multiple Response
### 3.0.23
- Fix payload order using bogus ids
### 3.0.22
- Expose `columns_dimension_description` for _Slice
### 3.0.21
- Shim datetimes so that element transforms and sorting can refer to items in
both old format (position) and new format (label).
- Change how warnings are suppressed so that they are suppressed even when
multithreading.
### 3.0.20
- Shim subvariable "zz9" ids that are `fixed` in a sort-by-value transform
### 3.0.19
- Add `subtotals_with_payload_order` property in dimension
### 3.0.18
- Fix for transforms on scorecard dimensions
- Add `repr` to various sequence classes
### 3.0.17
- Fix valid count summary range
### 3.0.16
- Fix pairwise indices for overlaps, when hiding or reordering columns
For a complete list of changes see [history](https://github.com/Crunch-io/crunch-cube/blob/master/HISTORY.md).
نیازمندی
| مقدار | نام |
|---|---|
| - | scipy |
| - | tabulate |
| - | pytest |
| - | pytest-cov |
| - | mock |
| - | coverage |
نحوه نصب
نصب پکیج whl cr.cube-3.0.9:
pip install cr.cube-3.0.9.whl
نصب پکیج tar.gz cr.cube-3.0.9:
pip install cr.cube-3.0.9.tar.gz