Skip to main content

Python wrapper around TauArgus

Project description

PiArgus

This package provides a python wrapper around τ-ARGUS, a program to protect statistical tables. This package takes care of generating all the required metadata and runs τ-ARGUS in the background to do the heavy work.

For this package to work, it is required to install τ-ARGUS locally first. It's also recommended to read the TauArgus manual to understand how it should be used.

Features

  • Generate output tables from microdata or tabledata. It is recommended to generate from microdata.
  • Metadata can be generated automatically, although using an existing rda-file is also possible.
  • It's possible to create hierarchies, codelists, apriori files, recode files all from code or from existing files.
  • Basic error checking of input is done before input is supplied to argus.

Feel free to contribute for other TauArgus-features. Feedback is welcome too.

Installing

  • Download and install the latest version of τ-ARGUS.
  • Then use pip to install piargus:
$ pip install --upgrade piargus

Example

import pandas as pd
import piargus as pa

tau = pa.TauArgus(r'C:\Users\User\Programs\TauArgus4.2.0b5\TauArgus.exe')
input_df = pd.read_csv('data/microdata.csv')
input_data = pa.MicroData(input_df)
output_table = pa.Table(['sbi', 'regio'], 'income', safety_rule="P(10)")

job = pa.Job(input_data, [output_table], directory='tau')
report = tau.run(job)
table_result = output_table.load_result()

print(report)
print(table_result)

Change C:\Users\User\Programs\TauArgus4.2.0b5\TauArgus.exe to the location where argus is installed. See tutorial for a general introduction. See Examples for more examples.

See also

The following packages in R offer similar functionality:

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

piargus-1.0.1-py3-none-any.whl (54.4 kB view details)

Uploaded Python 3

File details

Details for the file piargus-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: piargus-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 54.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.11.3 pkginfo/1.8.3 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.10.6

File hashes

Hashes for piargus-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3465f8238ebfa727eb339c1d319731a8fe1448b18b276cfd2a4453236ffb98bb
MD5 8172dc3f76798b274ceeb3da7eb18f0e
BLAKE2b-256 c9f0d39fdf92ed316ef03f29109053ae4ba84d4993d0a1647a3a5a21621a5c06

See more details on using hashes here.

Supported by

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