How to Use the Python API
While the CLI is the preferred operational path, the Python API supports
programmatic control and direct-data initialization without CSV/YAML files.
Basic Usage
Packaged-install example:
from geolift import GeoLiftAnalyzer
analyzer = GeoLiftAnalyzer(
config_path="/path/to/geolift_analysis_config.yaml",
data_path="/path/to/input.csv",
)
results = analyzer.run_analysis()
print(f"ATT: {results['att']}")
print(f"P-value: {results['p_value']}")
Source-checkout example with the shipped demo configs:
from geolift import GeoLiftAnalyzer
analyzer = GeoLiftAnalyzer(
config_path="data-config/geolift_analysis_config.yaml",
data_path="data-config/synthetic_geolift_multi.csv",
)