googlesheets4 | Google Spreadsheets R API ( reboot of the googlesheets | REST library

 by   tidyverse R Version: v1.1.0 License: Non-SPDX

kandi X-RAY | googlesheets4 Summary

kandi X-RAY | googlesheets4 Summary

googlesheets4 is a R library typically used in Web Services, REST applications. googlesheets4 has no bugs, it has no vulnerabilities and it has low support. However googlesheets4 has a Non-SPDX License. You can download it from GitHub.

googlesheets4 provides an R interface to Google Sheets via the Sheets API v4. It is a reboot of an earlier package called googlesheets.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              googlesheets4 has a low active ecosystem.
              It has 329 star(s) with 48 fork(s). There are 23 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 22 open issues and 234 have been closed. On average issues are closed in 119 days. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of googlesheets4 is v1.1.0

            kandi-Quality Quality

              googlesheets4 has no bugs reported.

            kandi-Security Security

              googlesheets4 has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              googlesheets4 has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              googlesheets4 releases are available to install and integrate.
              Installation instructions, examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of googlesheets4
            Get all kandi verified functions for this library.

            googlesheets4 Key Features

            No Key Features are available at this moment for googlesheets4.

            googlesheets4 Examples and Code Snippets

            No Code Snippets are available at this moment for googlesheets4.

            Community Discussions

            QUESTION

            Not able to authorize Google Sheet from Rstudio Server
            Asked 2021-Apr-11 at 18:56

            I am not able to able to authorize Google Sheet using Rstudio Server. I have tried all the possible ways available on google but it didn't work.

            I'm using below code.

            ...

            ANSWER

            Answered 2021-Apr-11 at 16:35

            I suspect that this is because you are loading both googlesheets and googlesheets4 in one session. Please try following steps:

            • Start a new environment on the server
            • Load only googlesheets4 then call gs4_auth() again.

            If the error persist. Please tryto clean up the ~/.cache/gargle folder which store the last authorization process and try again.

            Update

            Please try clear up the cache and follow the step Here is what happen on my server:

            Source https://stackoverflow.com/questions/67041634

            QUESTION

            Save input to .csv on submit - Click submit nothing happens, but not errors either
            Asked 2021-Feb-27 at 19:58

            Have a small dashboard. When the submit button is clicked there is no error, but there's also nothing written to the file.

            The code looks like this:

            ...

            ANSWER

            Answered 2021-Feb-27 at 19:58

            I believe your data frame 'submit' has to be first a reactive value or a placeholder for several values.

            Source https://stackoverflow.com/questions/66402863

            QUESTION

            Googlesheets quota limit issues - possible failure to use API key
            Asked 2021-Feb-26 at 14:39

            We are currently using google sheets for a research project on crowd forecasts for Covid-19 case and death numbers.

            Google Sheets is used for convenience, but we are often running into quota limit issues - even though the number of users we have should be well below what Google allows.

            I attempted to create a somewhat reproducible example by setting up a new google account and creating a sheet from which to read.

            The first thing I tried (without making any changes to the google account) is this:

            ...

            ANSWER

            Answered 2021-Feb-26 at 14:35

            Google says that it is a security measure. Try to share through adding their emails

            Source https://stackoverflow.com/questions/66186332

            QUESTION

            Gargle non-interactive service account token authentication not working
            Asked 2021-Feb-09 at 17:07

            I'm using the googlesheets4 package, which uses gargle for authentication. I have a scheduled script that runs regularly, so I need to set up non-interactive authentication. I tried following all the instructions I've found for setting up a service account token and using that to authenticate, but still can't seem to get it to work.

            I created a service account token and stored it in a JSON file. I then used the following command:

            ...

            ANSWER

            Answered 2021-Feb-09 at 17:07

            This is now resolved, with a response to a copy of this post on the googlesheets4 package's Github page!

            Turns out, gs4_find is actually a wrapper around googledrive::drive_find. So in order to get the service token to work for this function, I'd need to authenticate with googledrive, not googlesheets4. There is even a whole article here about coordinating auth between googlesheets4 and googledrive, if you're using both.

            For my particular use case, I actually ended up just hardcoding the Google Sheet IDs into my script instead of using gs4_find to do a name lookup, thereby avoiding use of googledrive altogether. Decided that's sufficient for my purposes.

            Source https://stackoverflow.com/questions/66109351

            QUESTION

            Struggling to use my own API key with googlesheets4 in shinyapps.io
            Asked 2020-Dec-01 at 13:06

            I've got googlesheets4 working in a shinyapps.io with the following code:

            ...

            ANSWER

            Answered 2020-Dec-01 at 13:06

            OK, pretty sure I've got this working...

            It was the YouTube video here that really helped, and made this more clear.

            All I need is a Service Account, which seems to generate a json file that I can upload with my app.

            i.e. at around 1:03 in the video shows the creation of this service account, then adding that e-mail address (of the Service Account) to the Google Sheet(s) I want to access, this means I can download (using GoogleDrive) and write (using GoogleSheets).

            The crazy part is that all I need to put in my code is the following:

            Source https://stackoverflow.com/questions/65051305

            QUESTION

            R Shiny Dashboard: Upload data from both local file and the online database (such as Google Sheet)
            Asked 2020-Nov-19 at 10:24

            I am a beginner of Shiny dashboard and I have a problem that bothered me a long time.
            My final target is to assign data to a variable called "myData", but I give the users options to upload data either from local file or online file (in my case GoogleSheet).
            Below is a simplified version of my app. To achieve the target, I did:

            1. Under the "data" tab, I create a selection box "input_option", so that the users can choose either uploading local data (="local") or data from a online persistent database (="online);
            2. I use "eventReactive" to source the data conditional on the value of "input_option";
            3. If the user chooses to upload the data from an online database, the data will be displayed in the dashboard body;
            4. If the user chooses to upload data from a local file, in the dashboard body, it will show the "fileInput" box to guide the user choose the local file. Then the data will also be displayed underneath in the dashboard body.

            However, the problems are:

            1. In either way, the data cannot be displayed in the dashboard body. I don't even know if the data has been successfully sourced;
            2. When I choose to upload online data and then close the app, the R console does not pause but keeping running.

            Could any friends or experts help me with the problems? I really really appreciate your help!

            ...

            ANSWER

            Answered 2020-Aug-29 at 23:53

            Two changes in the server will make the local file work, and probably the googledrive one too.

            Source https://stackoverflow.com/questions/63651796

            QUESTION

            Is there a way to make some formatting in Google Sheet within R
            Asked 2020-Nov-19 at 10:21

            I'm currently on a project aiming to generate some formatted report from R to google sheet.

            Now I'm using googlesheets4 package and able to write data into google sheet from R. But is there a way to do some formatting work? like bold, italic, add $ sign or conditional formatting and etc.

            Here is the example spread sheet I made.

            https://docs.google.com/spreadsheets/d/1vp-w5muArvMxHKx4NL-39NMkAHRJCtldXLkUmJqKK2E/edit?usp=sharing

            the output I want is like this(in sheet2), having $ in spend col, keep integer in kpi cols and conditional formatting on upsell cols

            ...

            ANSWER

            Answered 2020-Aug-08 at 00:17

            I ran into the same issue. I don't believe googlesheets4 has this type of functionality (yet at least.)

            The way I (quite inefficiently) worked around this was by creating two sheets, taking advantage of the fact that it is possible to format cells that have native/google sheets functions.

            The first spreadsheet contained the raw data imported from the R script, which could not be formatted. The second sheet was formatted to my liking, then collected the first sheet's data through functions.

            Hope this helps! I would have added this as a comment but I do not yet have the reputation to do so.

            Source https://stackoverflow.com/questions/62415594

            QUESTION

            Download spedific tab of google sheet in R
            Asked 2020-Nov-19 at 10:20

            I'm trying to download a specific tab from a google sheet to R, after trying gsheet package I only get the first tab, no matter how I change the sheetid.

            I also try the library googlesheets4 to identify the sheet id but I got empty result, what did I do wrong? is there other way to complete this simple task? Thanks!

            ...

            ANSWER

            Answered 2020-Aug-07 at 18:29

            Can't you use the function read_sheet() from googlesheets4?

            Source https://stackoverflow.com/questions/63306851

            QUESTION

            Importing date columns as lists from googledoc via googlesheets4 in R
            Asked 2020-Nov-19 at 10:17

            I am trying to read this googledoc via googlesheets4.

            The file contains 3 columns:

            1. id, as character
            2. start_date / end_date: this columns contain both dates (in the format 2020-01-31) and text strings (namely strings being in_stock and in_use)

            I made this googlesheet available to read with anybody with the link.

            I read the dataframes as follows:

            ...

            ANSWER

            Answered 2020-Jun-23 at 15:43

            try to do it this way (dplyr 1.0.0). You have the text in_stock and in_use in the date column. Therefore, an error appears.

            Source https://stackoverflow.com/questions/62537910

            QUESTION

            Authorizing non-interactive use of googlesheets through Shiny app using googlesheets4
            Asked 2020-Nov-19 at 10:17

            I know there are a few other similar questions floating around SO (e.g., here and here), but I thought I'd try again, as the others have not gotten many answers.

            I have a Shiny app that allows its users to provide input through the app, but these users need to skip the authentication step. In the previous version of googlesheets I made the sheet public (to anyone with the link) and avoided some of the authentication process. In updating to googlesheets4 I've run into permissions issues with deploying the updated app to shinyapps.io. Here is the summary of what I've tried, and what results I've gotten. Any pointers would be much appreciated.

            First, based on the recommendations in this gargle article I created a service account, downloaded a JSON service account token (with format "project-name-12345678abc1.json"), and have saved it (for now) in the parent app folder, under the assumption that it needs to be uploaded with the app bundle. Then I enabled the Google Sheets API.

            I've put the following commands in the front of the app, ahead of anything substantial:

            1. gs4_deauth(), since the google sheet is public to anyone with the link and therefore might not require a token.

            2. Following this article, gs4_auth(path = "project-name-12345678abc1.json"). I've also added the scopes argument (as below), and use_oob=TRUE.

            3. credentials_service_account(scopes = "https://www.googleapis.com/auth/spreadsheets", path = "project-name-12345678abc1.json").

            4. credentials_app_default(path = "project-name-12345678abc1.json")

            Results

            Most combinations give me errors saying "Can't get Google credentials" and then advising that I look at the non-interactive article on the gargle site. The one exception is Attempt 3, which provides the following error message instead - strangely promising:

            Warning: Error in : Client error: (403) PERMISSION_DENIED

            • Client does not have sufficient permission. This can happen because the OAuth token does not have the right scopes, the client doesn't have permission, or the API has not been enabled for the client project.

            Any ideas on what I might be missing? The app works fine locally.

            Any help is appreciated. Thanks!

            ...

            ANSWER

            Answered 2020-Sep-07 at 21:29

            This problem has been addressed using the approach identified in this (closed) Github issue.

            The key is to follow these steps exactly:

            1. Call gs4_auth(cache = ".secrets") once, running the app locally in the browser.
            2. Substitute the line above with gs4_auth(cache = ".secrets", email = TRUE, use_oob = TRUE).
            3. Deploy the app to shinyapps.

            I also cleared the previous tokens I had saved, which might have been important, though hard to know.

            As noted in the Github discussion, including use_oob = TRUE is probably not necessary. Additionally, this approach is detailed in the non-interactive auth article on the gargle site.

            Source https://stackoverflow.com/questions/63699558

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install googlesheets4

            You can install the released version of googlesheets4 from CRAN with:.

            Support

            If you’d like to contribute to the development of googlesheets4, please read these guidelines. Please note that the googlesheets4 project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries

            Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular REST Libraries

            public-apis

            by public-apis

            json-server

            by typicode

            iptv

            by iptv-org

            fastapi

            by tiangolo

            beego

            by beego

            Try Top Libraries by tidyverse

            ggplot2

            by tidyverseR

            dplyr

            by tidyverseR

            tidyverse

            by tidyverseR

            rvest

            by tidyverseR

            tidyr

            by tidyverseR