Tableau package for R - python

I have spent a lot of time searching for an answer to this, but have not found anything yet.
Are there any Tableau packages for R? I would like to be able to create Tableau charts (or a tde file) as an output from my R script. It seems like you can run some basic R scripts from within Tableau, but that will not work for my case.
This is one of the few links I have found relevant to what I am looking for:
R-bloggers link
Would it matter if I were trying to go from Python -> Tableau?

While there are options for creating TDEs (as you've already found) and for working administration of Tableau Server, at the moment there are no open interfaces for creating Tableau workbooks from outside of Tableau proper. This is currently one of my biggest annoyances with the software.
The closest you're going to be able to get is to use the Python Tableau Document API (https://github.com/tableau/document-api-python). While that does not allow creating workbooks from scratch, it does have the most robust document editing capabilities of the various options (https://community.tableau.com/community/developers) available. The README on the Python doc API suggest that document creation may be coming. Sounds like something to watch.

Related

Is there a way to automatically download data from a utility using python?

I'm trying to download files automatically from a utility, like PG&E, so I can view my statements easily since I have a couple of different accounts for one login. Currently, I'm using python to figure it out, but I'm stuck on how to actually write the code to download the files. As of right now, I can only access all of the statement information within Python, but cannot figure out how to download the actual bills itself. Does anyone have additional information or resources that you can share so I can try downloading bills using python?

Automating excel reporting and graphs - Python xlsxWriter/xlswings or Ruby axlsx/win32ole

I want to create a program, which automates excel reporting including various graphs in colours. The program needs to be able to read an excel dataset. Based on this dataset, the program then has to create report pages and graphs and then export to an excel file as well as pdf file.
I have done some research and it seems this is possible using python with pandas - xlsxWriter or xlswings as well as Ruby gems - axlsx or win32ole.
Which is the user-friendlier and easy to learn alternative? What are the advantages and disadvantages? Are there other options I should consider (I would like to avoid VBA - as this is how the reports are currently produced)?
Any responses and comments are appreciated. Thank you!
If you already have VBA that works for your project, then translating it to Ruby + WIN32OLE is probably your quickest path to working code. Anything you can do in VBA is doable in Ruby (if you find something you can't do, post here to ask for help).
I prefer working with Excel via OLE since I know the file produced by Excel will work anywhere I open it. I haven't used axlsx but I'm sure it's a fine project; I just wouldn't trust that it would produce working Excel files every time.

How do I export a notebook from RCloud (into Text/Word etc)

Does anyone know how to export RCloud notebooks (not RStudio) to a common format? I’m using it for a project to try to predict if a car will statistically be a good purchase or a lemon, and I’m learning - so I’m trying a lot of new/different code and packages to make graphs, regression charts etc.
I’m new to RCloud so I want to save this notebook as a reference document/cheat sheet on my laptop so I can ‘reuse’ the common R commands I used (e.g. how to use "lapply" command to change vectors to numeric like “mycarsub[, 1:6] <- lapply(mycarsub[, 1:6], as.numeric”, "na.omit", etc. I just want a reference to use for other projects or notebooks in Rcloud, RStudio etc.
So I’m wondering if anyone knows how to export it in Text format that is searchable or easily read with common apps (outside of RCloud, or RStudio)? Like export to Word/Libreoffice, HTML etc?
I tried “Share” at the top but think it only exports R file types, I’m probably doing it wrong. Or if you have another way to accomplish what i'm trying to do. I cut and pasted but doesn't work all the time (user error?). I searched Stack Overflow but only got RStudio or R developer code exporting via API's etc. Hope this is enough info, first post.
RCloud was created for making it easier to share code and for others to learn from existing code so it includes the ability to search code using Lucene search syntax. Rather that creating another document to keep track of, I would suggest opening multiple RCloud tabs - use one to search, cut and paste from and the other to code in; you can create multiple tabs by copying and pasting any notebook URL into a new tab.
If you prefer to have a separate document, you can export the RCloud notebooks as an R Source file or a Rmarkdown file using the Advanced menu located in the navigation bar at the far right.

migrating data from tomcat .dbx files

I want to migrate data from an old Tomcat/Jetty website to a new one which runs on Python & Django. Ideally I would like to populate the new website by directly reading the data from the old database and storing them in the new one.
Problem is that the database I was given comes in the form of a bunch of WEB-INF/data/*.dbx and I didn't find any way to read them. So, I have a few questions.
Which format do the WEB-INF/data/*.dbx use?
Is there a python module for directly reading from the WEB-INF/data/*.dbx files?
Is there some external tool for dumpint the WEB-INF/data/*.dbx to an ascii format that will be parsable by python?
If someone has attempted a similar data migration, how does it compare against scraping the data from the old website? (assuming that all important data can be scraped)
Thanks!
The ".dbx" suffix has been used by various softwares over the years so it could be almost anything. The only way to know what you really have here is to browse the source code of the legacy java app (or the relevant doc or ask the author etc).
wrt/ scraping, it's probably going to be a lot of a pain for not much results, depending on the app.

Convert CVS/SVN to a Programming Snippets Site

I use cvs to maintain all my python snippets, notes, c, c++ code. As the hosting provider provides a public web- server also, I was thinking that I should convert the cvs automatically to a programming snippets website.
cvsweb is not what I mean.
doxygen is for a complete project and to browse the self-referencing codes online.I think doxygen is more like web based ctags.
I tried with rest2web, it is requires that I write /restweb headers and files to be .txt files and it will interfere with the programming language syntax.
An approach I have thought is:
1) run source-hightlight and create .html pages for all the scripts.
2) now write a script to index those script .htmls and create webpage.
3) Create the website of those pages.
before proceeding, I thought I shall discuss here, if the members have any suggestion.
What do do, when you want to maintain your snippets and notes in cvs and also auto generate it into a good website. I like rest2web for converting notes to html.
Run Trac on the server linked to the (svn) repository. The Trac wiki can conveniently refer to files and changesets. You get TODO tickets, too.
enscript or pygmentize (part of pygments) can be used to convert code to HTML. You can use a custom header or footer to link to the actual code for download.
I finally settled for rest2web. I had to do the following.
Use a separate python script to recursively copy the files in the CVS to a separate directory.
Added extra files index.txt and template.txt to all the directories which I wanted to be in the webpage.
The best thing about rest2web is that it supports python scripting within the template.txt, so I just ran a loop of the contents and indexed them in the page.
There is still lot more to go to automate the entire process. For eg. Inline viewing of programs and colorization, which I think can be done with some more trials.
I have the completed website here, It is called uthcode.

Categories