Skip to main content

Introduction

This package implements log retrieval, metrics generation, and data analysis tools used by the Editor Engagement Experiment (E3) team at the Wikimedia Foundation. The modules herein will be used to perform the ETL and analysis operations necessary to process the experimental data generated from E3 projects.

Installation

wmf_user_metrics is packaged with distutils:

$ sudo pip install wmf_user_metrics

Once installed you will need to modify the configuration files. This can be found in the file settings.py under $site-packages-home$/e3_analysis/config. Within this file configure the connections dictionary to point to a replicated production MySQL instance containing the . The ‘db’ setting should be an instance which ‘user’ has write access to. If you are from outside the Wikimedia Foundation and do not have access to these credentials contact me at rfaulkner@wikimedi.org if you’d like to work with this package.

The template configuration file looks like the following:

# Project settings
# ================
__home__ = '/Users/rfaulkner/'
__project_home__ = ''.join([__home__, 'projects/E3_analysis/'])
__web_home__ = ''.join([__project_home__, 'web_interface/'])
__sql_home__ = ''.join([__project_home__, 'SQL/'])
__server_log_local_home__ = ''.join([__project_home__, 'logs/'])
__data_file_dir__ = ''.join([__project_home__, 'data/'])

__web_app_module__ = 'web_interface'
__system_user__ = 'rfaulk'

# Database connection settings
# ============================

connections = {
    'slave': {
        'user' : 'research',
        'host' : '127.0.0.1',
        'db' : 'staging',
        'passwd' : 'xxxx',
        'port' : 3307},
    'slave-2': {
        'user' : 'rfaulk',
        'host' : '127.0.0.1',
        'db' : 'rfaulk',
        'passwd' : 'xxxx',
        'port' : 3307}
}

Documentation

Once the installation is complete and the configuration has been set the modules can be imported into the Python environment. The available operational modules are the following:

src.etl.data_loader
src.etl.aggregator
src.etl.table_loader
src.etl.log_parser
src.etl.time_series_process_methods
src.etl.wpapi

src.metrics.blocks
src.metrics.bytes_added
src.metrics.live_account.pyc
src.metrics.edit_count
src.metrics.edit_rate
src.metrics.live_account
src.metrics.metrics_manager
src.metrics.namespace_of_edits
src.metrics.query_calls
src.metrics.revert_rate
src.metrics.survival
src.metrics.time_to_threshold
src.metrics.user_metric
src.metrics.users

src.utils.autovivification
src.utils.multiprocessing_wrapper
src.utils.record_type
More complete docs can be found at:

http://stat1.wikimedia.org/rfaulk/pydocs/_build/

Release files for wmf_user_metrics 0.1.1

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

Source distribution (sdist)

Source distribution for wmf_user_metrics 0.1.1
File Size Uploaded
wmf_user_metrics-0.1.1.tar.gz 38.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for wmf_user_metrics 0.1.1
File Interpreter ABI Platform
wmf_user_metrics-0.1.1.macosx-10.7-intel.tar.gz Details

Total release size: 117.0 kB

Release files / wmf_user_metrics-0.1.1.tar.gz

Download URL wmf_user_metrics-0.1.1.tar.gz
Size 38.6 kB
Tags Source
SHA-256 checksum
How to use checksums
caaf69aa2abcd9c299f1d582fc43131a3f36b83d536ab63e162d204174e1a1d4
BLAKE2b-256 checksum
How to use checksums
1d1589fec023b44f2d9da77ed8176749afbc45c2615596ae1f72e1e58871550c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / wmf_user_metrics-0.1.1.macosx-10.7-intel.tar.gz

Download URL wmf_user_metrics-0.1.1.macosx-10.7-intel.tar.gz
Size 78.4 kB
Tags Source
SHA-256 checksum
How to use checksums
72cfa5f011558a4d07ddeac5db7c5f3ba72c49a2b4efb64fdc3965f4721e68a0
BLAKE2b-256 checksum
How to use checksums
1b7ac7a0e86caff3a23152467a7815c1faf295184aeca2d500ef88d4f154975d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
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