Figlinq is compatible with Plotly's R API, and you can use the plotly package to interact with content on Figlinq. This simple example illustrates how you can use this package to create a simple line chart and save it, together with associated data, to your Figlinq account.
#API key and username
To connect to your Figlinq account, you will need to provide your username and API key. You can find both in your account page. There, you can also create a new API key if needed.
By default, all plots and data grids created with the R API are currently public. Make sure to override this setting by including the config parameter sharing = "private" in the api_create function.
- After running the script, your default browser will open the newly-created plot in view mode.
- If you receive a 404 error after the browser opens, you are likely not logged in. Please make sure that you are logged in to your Figlinq account in your default browser before running the script.
- The newly-created plot and data grid will be available in your home directory - from there, you can move them to other folders, edit, restyle, add to a figure, or share.
- If you run the script multiple times without changing the filename, the plot and grid will be overwritten.
api_create function in the R plotly library is used to create and upload interactive Plotly graphs directly from R. This function facilitates the process of creating and sharing high-quality, interactive visualizations in Figlinq.
plot: A Plotly object (plotly, ggplotly, or subplot object) to be uploaded or updated in Figlinq.
NULL): A character string specifying the filename for the plot. If set to
NULL, a default filename will be generated.
"overwrite"): A character string specifying the file option. Accepted values are:
"overwrite": Overwrites the file with the same filename if it exists.
"append": Appends the new plot to an existing file with the same filename.
"new": Creates a new file with the given filename. If a file with the same name exists, a numeric suffix will be added.
"public"): A character string specifying the sharing setting for the plot. Accepted values are:
"public": The plot is publicly accessible.
"private": The plot is private and can only be accessed by the owner.
"secret": The plot is private and can be accessed by anyone with the URL, but it won't be listed on the owner's profile.
"plot"): A character string specifying the origin of the plot. Accepted values are:
"plot": Indicates that the plot is created using the
"ggplot": Indicates that the plot is created using the