Skip to main content

Clubear

Clubear is a Python-based (Python 3) open-source package for interactive massive data analysis. The key feature of clubear is that it enables users to conduct convenient and interactive statistical analysis of massive data with only a traditional single-computer system. Thus, clubear provides a cost-effective solution when mining large-scale datasets. In addition, the clubear package integrates many commonly used statistical and graphical tools, which are useful for most commonly encountered data analysis tasks.

Every component (class) within clubear have a 'demo()' function. Demo is used to demonstrate typical examples about this class. Users can use 'demo()' to quickly get instructions. For example, if we have an object 'sf':

sf=cb.shuffle('airline.csv')

we can get the instructions related to it by:

sf.demon()

Then, a typical case will be printed for reference.

How to use clubear

1. Install the package

pip install clubear

2. Import the package

We recommend to use clubear with Jupyter Notebook. This will lead to the best user experience.

import clubear as cb

3. (Optional) Shuffle a dataset

For example, shuffle a CSV file 'airline.csv'. The resulting file is 'airline.csv.shuffle'.

sf=cb.shuffle('airline.csv')
sf.dc()

4. Use 'pump' to process data

Build a bridge between the dataset and the memory (of a computer) using a 'pump'. Clubear supports various types of data sources to initialize the pump:

(1). CSV file

mypathfile='airline.csv.shuffle'
pm=cb.pump(type=1, pathfile=mypathfile)

(2). CSV file with a codebook (a dictionary contains specifications for variables)

mycodebook = {
'qlist': ['ActualElapsedTime', 'ArrDelay', 'ArrTime', 'CRSArrTime', 'CRSDepTime', 'CRSElapsedTime',
    'Cancelled', 'DayOfWeek', 'DayofMonth', 'DepDelay', 'DepTime', 'Distance', 'Diverted',
    'FlightNum', 'Month', 'Year', '_INTERCEPT_'], # specify quantitative variables
'drop': ['TailNum', 'Origin', 'Dest'], # specify variables that can be removed
'scale_level': {'UniqueCarrier': ['EV', 'OO', '9E']} # for any qualitative variable, users can further specify the scale levels
}
mypathfile='2008.csv.shuffle'
pm=cb.pump(type=2, pathfile=mypathfile, codebook=mycodebook)

(3). SQL databases

mysql_info = {
'host':'localhost', # SQL Server host
'user':'root', # SQL Server username
'passwd':'root', # SQL Server password
'port':3306, # SQL Server port
'db':'test_db', # name of database 
'tablename':'flight_2008' # name of table 
}
pm=cb.pump(type=3, sql_info=mysql_info)

Then, based on the pump, one can quickly access a part of the dataset as:

pm.subsize=10000
pm.go()

Or view the most frequently used descriptive statistics as:

ck=cb.check(pm).stats()

5. Find quantitative variables

Extract variables whose 'mp' values are less than 5%:

ck[ck.mp<5].index

Pass this list to 'pm' by the 'qlist' parameter:

pm.qlist=[...]

6. Discover levels for qualitative variables

Detect all levels by the 'table' function as:

tb=cb.check(pm).table(niter=100)

Detect all levels for a specified variable, e.g., 'AirTime':

tb=cb.check(pm).table('AirTime',tv=True)

7. Make statistical graphics

Clubear provides a number of graphical tools. For example, boxplot:

tk = cb.tank(pm)
pt=cb.plot(tk).box(x="Year",y="ArrDelay")

Histogram:

pt=cb.plot(tk).hist('Distance')

Barplot:

pt=cb.plot(tk).mu('ArrDelay','CRSDepTime')

Release files for clubear 0.0.37

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for clubear 0.0.37
File Size Uploaded
clubear-0.0.37.tar.gz 25.6 kB Details

Release files / clubear-0.0.37.tar.gz

Download URL clubear-0.0.37.tar.gz
Size 25.6 kB
Tags Source
SHA-256 checksum
How to use checksums
f6473d14c8e3aad3fa6ddca3110953330c63e5badc6dd247f618bf2bd6bb8a7b
BLAKE2b-256 checksum
How to use checksums
8b58cd70ce885d0d9fc10f7bccc1f0b7d2ac5139cb0de024c9f5b701b2c262fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.0.0.post20200309 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

Release history Release notifications | RSS feed

This release

0.0.37 This release

1 release file

0.0.36

1 release file

0.0.35

1 release file

0.0.34

1 release file

0.0.33

1 release file

0.0.31

1 release file

0.0.30

1 release file

0.0.29

1 release file

0.0.28

1 release file

0.0.27

1 release file

0.0.26

1 release file

0.0.25

1 release file

0.0.24

1 release file

0.0.23

1 release file

0.0.22

1 release file

0.0.21

1 release file

0.0.20

1 release file

0.0.19

1 release file

0.0.18

1 release file

0.0.17

1 release file

0.0.16

1 release file

0.0.15

1 release file

0.0.14

1 release file

0.0.13

1 release file

0.0.12

1 release file

0.0.11

1 release file

0.0.10

1 release file

0.0.9

1 release file

0.0.8

1 release file

0.0.7

1 release file

0.0.6

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page