Giter Site home page Giter Site logo

battmanux / rtableau Goto Github PK

View Code? Open in Web Editor NEW

This project forked from markahayden/rtableau

0.0 0.0 0.0 81 KB

Rcpp bindings for the Tableau SDK

License: GNU General Public License v3.0

R 11.96% M4 1.22% C 21.35% C++ 61.10% Objective-C 4.38%

rtableau's Introduction

rtableau

This package uses Rcpp to connect R to the Tableau SDK.

The Tableau SDK functionalities are implemented in this package as two R functions:

  • write_tde: Take a R data.frame and output it as a Tableau Data Extract (.tde) file
  • write_twbx: Take a R data.frame and update a Tableau Data Workbook (.twbx) file
  • publish_tde: Publish a .tde file to a Tableau Server

Set-up

I am still working on the configure file so you may run into issues during installation. You may need to create your own Makevars if you installed in a different location than I did. Install the Tableau SDK before trying to install this package.
I've only tested this on Mac and Linux, here's where my SDK files are installed.

Linux

Shared object files: /usr/lib64/tableausdk/
Binary executable: /usr/local/bin/tdeserver64 You may need to link ln -s libpcre16.so libpcre16.so.0 in /usr/lib/x86_64-linux-gnu (I have to do it in ubuntu 16.04)

Mac

/Library/Frameworks

Known Issues

  • There are some issues with the 9.3 SDK on Linux when using large datasets, I recommend using the 9.2 version of the SDK which is more stable.
  • The Tableau SDK does not support SSL on Linux for publishing

Data Type Mapping

The main challenge of implementing this is that a R data.frame can have arbitrary data structures and types, while C++ is strongly typed. I try to map types but keep in mind you will run into issues if you try and output anything other than a matrix of scalar values.

R vector type Rcpp vector type Tableau scalar type
character CharacterVector CharString
factor CharacterVector CharString
double NumericVector Double
integer IntegerVector Integer
logical LogicalVector Boolean
Date NumericVector Date
POSIXct NumericVector DateTime
POSIXlt NumericVector DateTime

We convert factors to character in R, as well as POSIXlt to POSIXct.

character and factor levels are converted to UTF-8 with protection for brocken characters

rtableau's People

Contributors

markahayden avatar battmanux avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.