Skip to main content

We can create plots directly from Google Sheets

Project description

googlesheets_to_scatterplot is a Python module for creating plots directly from spreadsheet.

The project was started in 2020 by Vatan Patel as a pre-process task for Greendeck.

### Function to plot: googlesheets_to_scatterplot.plot(spreadsheet_name, xcol, ycol, sheet_number)

### Dependencies:

  • pandas

  • matplotlib

  • seaborn

  • gspread

  • oauth2client

### Setup:

  • Now you need to set up your sharing options. You will need to generate Signed Credentials, something that sounds more difficult than it is. Navigate to the Google Developers Console and create a new project (or use an existing one).

  • Give your project a suitable name and then click create.

  • Enable Drive API and Sheets API from Google Apps APIs.

  • Now select Credentials on the left menu. Click the little arrow on the Create credentials button and select ‘Help me choose’ and select following options:
    • Which API are you using: Google drive API

    • Where will you be calling the API from: Other non-UI

    • What data will you be accessing: Application data

    • Are you planning to use this API with App Engine or Compute Engine: No, I’m not using them

    • Download the JSON file which contains your client id

    • Move the json into your current directory and rename it creds.json.

    • Finally, open the file and look for client_email. This should be the name of your project at appspot.gserviceaccount.com. Share your Google Sheet with this email address (Top Right > Share > Enter Email).

Now we are good to go. You can now use the module.

### Parameters:

  • spreadsheet_name (str, required): Write the name of the google spreadsheet you want to create plots from. Make sure the name matches exactly.

  • xcol (str, required): The column name of the column you want on the x-axis.

  • ycol (str, required): The column name of the column you want on the y-axis.

  • sheet_number (int, default = 1): This is the sheet number in your spreadsheet on which the table is present).

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

If you're not sure about the file name format, learn more about wheel file names.

googlesheets_to_scatterplot-0.0.7-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file googlesheets_to_scatterplot-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: googlesheets_to_scatterplot-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for googlesheets_to_scatterplot-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 af8fea9f865a7fdb1f1de75b1b85da4cb44c90c2c4aa043b68dec0cfb43ea4e3
MD5 2bc129c09808a745121f9e3a9326e726
BLAKE2b-256 dee4a90a61a60124ebf5d028c6e2d2856ee33f179bbb84016da68fba846eae46

See more details on using hashes here.

Supported by

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