gsheetplots_
gheetplot is small wrapper around Google Sheet API ,Pandas and Matplotlib provide access to Google Sheet and help to plot graph with desired axis by user .
To access Google Sheet one need to Turn_on_the_API , download service credinatial JSON file and use read_spreadsheet() to read spreadsheet and underneath it takes the help of gspread ,ServiceAccountCredentials to create connection with Google Sheet API and function convert it into a dataframe which can be used data analysis .
Table of contents
Link
- GitHub : https://github.com/abhii1/Sheetplot
- PyPi :
- Documention : https://github.com/abhii1/Sheetplot
- Download : https://github.com/abhii1/Sheetplot
Installation
This package runs under Python 3.5+ ,use pip to install
pip install gsheetplot
This will install gsheetplot module you need to install gspread
Requirements: Python 2.7+ or Python 3+
pip install gspread
you need install oauth2client to use ServiceAccountCredentials
pip install oauth2client
Quickstart
Log into the Google Developers console with the google account whose spreadsheets you want to access . Create(or select) a project and enable the Drive APP and Sheet API under (Google Apps APIs).
Steps for turn on API
2__ create new project
3__ Click Enable API. Search for and enable the Google Drive API.
4__ Create credentials for a Web Server to access Application Data.
5__ Name the service account and grant it a Project Role of Editor.
6__ Download the JSON file 7__ Copy the JSON file to your code directory and rename it to client_secret.json
this some how its looklike
{
"type": "service_account",
"project_id": "spreadsheet-291117",
"private_key_id":_________________,
"private_key": _______ here will be some key,
"client_email": "________________,
"client_id": __________________________,
[auth_uri]("https://accounts.google.com/o/oauth2/auth"),
[token_uri]("https://oauth2.googleapis.com/token"),
[auth_provider_x509_cert_url]("https://www.googleapis.com/oauth2/v1/certs"),
[client_x509_cert_url](https://www.googleapis.com/robot/v1/metadata/x509/spreadsheet%40spreadsheet-291117.iam.gserviceaccount.com"),
}
8__ if you spread sheet is private then you have give drop client_email of JSON file to share with client file
Create a object to acces member function and convert into dataframe
#import libary
from plotgraph import GET
#url of the spreadsheet
connection_url='https://docs.google.com/spreadsheets/d/1077QfadB_V_Nl8-jomsb62RYyrs0_Is-IGlVRl8QF2I/edit?usp=sharing'
#servicecrendiatl JSON file
driveouth_json='spreadsheetouth.json'
#creating a object to access member function
>>> dataframeObj=GET.read_sheet_to_dataframe(connection_url,driveouth_json)
#converting to dataframe
dataframe=dataframeobj.read_spreadsheet()
Option for user input
#tuple for X axis and y axis
X,Y=dataframe.select_axis()
plot graph with user input
#input from user
>>> X,Y=dataframe.select_axis()
#calling plot function
plot=r.plot_chart(g,X,Y,'line',imagename='test')
you can provide range of data example from (200,500)
plot=r.plot_chart(g,X,Y,'line',range=(200,500),imagename='test')
imagename is name of image that will saved in system you can make empty also
plot=r.plot_chart(g,X,Y,'line')
diffrent kind of plot
#plot kde
plot=r.plot_chart(g,X,Y,'kde')
Languages_and_API
See_also
-
Google Sheets API : Read, write, and format data in Sheets. The latest version of the Sheets API lets developers programmatically
-
Pandas : pandas is a software library written for the Python programming language for data manipulation and analysis
-
gspread : Python wrapper, currently using the XML-based
legacy v3 APIexampleJupyter notebookusing gspread_ to fetch a sheet into a pandas DataFrame -
matplotlib : Matplotlib is a plotting library for the Python programming language and its numerical mathematics extension NumPy
Contact
Created by Abhishek pratap singh
License
This package is distributed under the MIT license_.# gsheetplot
gheetplot is small wrapper around Google Sheet API ,Pandas and Matplotlib provide access to Google Sheet and help to plot graph with desired axis by user .
To access Google Sheet one need to Turn_on_the_API , download service credinatial JSON file and use read_spreadsheet() to read spreadsheet and underneath it takes the help of gspread ,ServiceAccountCredentials to create connection with Google Sheet API and function convert it into a dataframe which can be used data analysis .
Table of contents
Link
- GitHub :
- PyPi:
- Documention:
- Download
Installation
This package runs under Python 3.5+ ,use pip to install
pip install gsheetplot
This will install gsheetplot module you need to install gspread
Requirements: Python 2.7+ or Python 3+
pip install gspread
you need install oauth2client to use ServiceAccountCredentials
pip install oauth2client
Quickstart
Log into the Google Developers console with the google account whose spreadsheets you want to access . Create(or select) a project and enable the Drive APP and Sheet API under (Google Apps APIs).
Steps for turn on API
2__ create new project
3__ Click Enable API. Search for and enable the Google Drive API.
4__ Create credentials for a Web Server to access Application Data.
5__ Name the service account and grant it a Project Role of Editor.
6__ Download the JSON file 7__ Copy the JSON file to your code directory and rename it to client_secret.json
this some how its looklike
{
"type": "service_account",
"project_id": "spreadsheet-291117",
"private_key_id":_________________,
"private_key": _______ here will be some key,
"client_email": "________________,
"client_id": __________________________,
[auth_uri]("https://accounts.google.com/o/oauth2/auth"),
[token_uri]("https://oauth2.googleapis.com/token"),
[auth_provider_x509_cert_url]("https://www.googleapis.com/oauth2/v1/certs"),
[client_x509_cert_url](https://www.googleapis.com/robot/v1/metadata/x509/spreadsheet%40spreadsheet-291117.iam.gserviceaccount.com"),
}
8__ if you spread sheet is private then you have give drop client_email of JSON file to share with client file
Create a object to acces member function and convert into dataframe
#import libary
>>> from gsheetplot import GET
#url of the spreadsheet
connection_url='https://docs.google.com/spreadsheets/d/1077QfadB_V_Nl8-jomsb62RYyrs0_Is-IGlVRl8QF2I/edit?usp=sharing'
#servicecrendiatl JSON file
driveouth_json='spreadsheetouth.json'
#creating a object to access member function
>>> dataframeObj=GET.read_sheet_to_dataframe(connection_url,driveouth_json)
#converting to dataframe
dataframe=dataframeobj.read_spreadsheet()
Option for user input
#tuple for X axis and y axis
X,Y=dataframe.select_axis()
plot graph with user input
#input from user
>>> X,Y=dataframe.select_axis()
#calling plot function
plot=r.plot_chart(g,X,Y,'line',imagename='test')
you can provide range of data example from (200,500)
plot=r.plot_chart(g,X,Y,'line',range=(200,500),imagename='test')
imagename is name of image that will saved in system you can make empty also
plot=r.plot_chart(g,X,Y,'line')
diffrent kind of plot
#plot kde
plot=r.plot_chart(g,X,Y,'kde')
Languages_and_API
See_also
*Google Sheets API help you to under stand how enable API
*Pandas for more information in data manupulations and other feature
*gspreadPython wrapper, currently using the XML-based legacy v3 API example Jupyter notebook using gspread_ to fetch a sheet into a pandas DataFrame
*matplotlib it will provide helpfull feature to change title,label ,color etc of graph
*ServiceAccountCredentials it will help to understand about connection of API in python
Contact
Created by Abhishek pratap singh
License
This package is distributed under the MIT license_.
Metadata
Release files for gsheet-plots 0.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| gsheet_plots-0.0.0.tar.gz | 7.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gsheet_plots-0.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.3 kB
Release files / gsheet_plots-0.0.0.tar.gz
| Download URL | gsheet_plots-0.0.0.tar.gz |
|---|---|
| Size | 7.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
61de34d834ff8dced26005842f30edb83b83e953243a643680f1de0075214a3d
|
|
BLAKE2b-256 checksum How to use checksums |
ccbcb7df104e0e22a82b3ec26816bad31a7733e53fa2880e6dae8a4dbb4d917f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.2
|
Release files / gsheet_plots-0.0.0-py3-none-any.whl
| Download URL | gsheet_plots-0.0.0-py3-none-any.whl |
|---|---|
| Size | 7.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c96ffd45f7a2431a433293ca2de6ca626c9da978876e8c5f8743a246dc6b5728
|
|
BLAKE2b-256 checksum How to use checksums |
c35e2fcad624bdb6848e5b77b77fee4427c4b7d6e792baa7863a7e0e518a4bd9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.2
|
Security for gsheet-plots 0.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.