Tools to interact with Pitt-Google Broker data products and services.
Project description
Query, download, and process the data
Pitt-Google-Tutorial-Code-Samples.ipynb
All data is public and is hosted in the Google Cloud.
It can be accessed using Google's Cloud SDK in many languages, including Python and from the command-line.
In addition, Pitt-Google Broker offers the Python package pgb_utils
which contains wrappers of Cloud SDK methods for some common use cases, and other helper functions.
We view this package as a collection of examples demonstrating the use of the underlying methods.
The Cloud SDK is well developed and documented, and we intend for pgb_utils
to be an entry point to learning the methods.
You are encouraged to view its source code and adapt/extend it for your specific use cases.
Please open an Issue on GitHub or contact troy.raen@pitt.edu if you run into problems.
pgb_utils
pgb_utils
is a collection of wrappers and helper functions to facilitate interaction with data. We view it as a set of examples for using the Cloud SDK to access and process the data. The tutorial will demonstrate its use. The package is essentially a set of:
- Convience wrappers for the Google Cloud Python SDK
- Helper functions for ZTF data decoding and plotting, provided by ZTF (see Filtering_alerts.ipynb)
- Helper functions for running Apache Beam pipelines
You are encouraged to look at and alter the source code to learn how to use the underlying methods yourself.
Install with
pip install pgb-utils
Modules and their functionality include:
-
pgb_utils.beam
- helper functions for running Apache Beam data pipelines
-
pgb_utils.bigquery
- view dataset, table, and schema information
- query: lightcurves
- query: cone search
- cast query results to a
pandas.DataFrame
orjson
formatted string.
-
pgb_utils.figures
- plot lightcurves
- plot cutouts
-
pgb_utils.utils
- general utilities such as data type casting
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pgb_utils-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31a681aad75d307a4fca6985c3728f342381addeceb39fd262ef3f4eb4e83c3e |
|
MD5 | 0d24dbbfd44eef9ce75fe285680cd7a3 |
|
BLAKE2b-256 | 09c972c1bae7aa9b2b9f51dd847364e05efc951a7b3484fcd8cf48550359805f |