Skip to main content

Package of various helper functions to support various People Analytics projects

Project description

Python for People Analytics

Installation

Download and install the package on your machine:

cd <<working directory>>
git clone https://github.com/kammetherell/py4pa.git
pip install -e ./py4pa

If you need to bypass SSL verification on your machine (if you are behind a proxy for example), you can use the following install command:

git -c http.sslVerify=false clone https://github.com/kamdickens/py4pa.git
pip install -e ./py4pa --trusted-host pypi.org --trusted-host files.pythonhosted.org

Import the package into your Python script:

import py4pa

Usage

py4pa.ona

  • py4pa.ona.clean_email_data(dir, files='all', include_subject=False, engine='c', encoding='latin', delete_old_file=False)
  • py4pa.ona.generate_node_edge_lists(email_data, demographic_data, demographic_key, output_dir, include_subject=False)
  • py4pa.ona.generate_nx_digraph(node_list, edge_list)
  • py4pa.ona.calc_density(df_nodes, df_edges, target_attribute)
  • py4pa.ona.calc_modularity(df_nodes, df_edges, target_attribute, weighted=False, direction='outbound')

py4pa.arm

  • py4pa.arm.concat_fields(df, fields)

py4pa.visualisation

  • py4pa.visualisation.gen_expn_colors()
  • py4pa.visualisation.gen_gradient_cmap(start, end, steps=50)

py4pa.nlp

py4pa.email_helper

  • py4pa.email_helper.send_plain_text_email(server, sender, recip, subject, body)

py4pa.web_scraping

  • py4pa.web_scraping.get_random_useragent(browser=None):
  • py4pa.web_scraping.get_visier_data_connection(data_connector_id, user, pword, api_key, company,fName=None)

py4pa.misc

  • py4pa.misc.csv_to_utf8(file)
  • py4pa.misc.upgradeAllPackages()
  • py4pa.misc.installPackage(package)
  • py4pa.misc.getDateTimeStamp(time=True)
  • py4pa.misc.continuous_logging(msg)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py4pa-0.0.3.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py4pa-0.0.3-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file py4pa-0.0.3.tar.gz.

File metadata

  • Download URL: py4pa-0.0.3.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for py4pa-0.0.3.tar.gz
Algorithm Hash digest
SHA256 b435a6d95f41db9ff975f20b8386481cfe0978d256f05feede3f628a1884087b
MD5 3cdd6ace36ecde2afb824d4281873807
BLAKE2b-256 801b48ab3cf2a7b91a60a29797fcb0685c83b58e0216151b3ea86fe18e58ca3c

See more details on using hashes here.

File details

Details for the file py4pa-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: py4pa-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for py4pa-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6aaee1d4cadfec226e545f9dd876bba94d27237ba93ff8a5a3ad82de6d06018c
MD5 dc9ff08a2fd15cf37a6e98463e59a5fa
BLAKE2b-256 f4472d4e22d21618769a4b0f4bc162a3b797b10debde49d1b10a6512dd9ce30a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page