Find the tools in action on Heroku as a node.js app!
See the code on GitHub:
After many iterations of ideas regarding deployment for a few research Shiny R apps, I am glad to say the current web-only setup is 100% free and simple to adapt. I thought I’d go through some of the Node.JS bits I have been fussing with.
The Current one:
Heroku has a free tier for node.js apps. See the pricing and limitations here: https://www.heroku.com/pricing as far as I can tell, there is little reason to read too far into a free plan; they don’t have my credit card, and thy seem to convert enough folks to paid customers to be nice enough to offer a free something to everyone.
Shiny apps- https://www.shinyapps.io/– works straight from RStudio. They have a free plan. Similar to Heroku, I can care too much about limitations as it is completely free.
The reasons to use Node.JS (even if it just a jade/html wrapper) are numerous, though may not be completely obvious. If nothing else, Heroku will serve it for free….
Using node is nice because you get all the web-layout-ux-ui stacks of stuff if you need them. Clearly, I have not gone to many lengths to do that, but it is there.
Another big one is using node.js with Electron. https://electronjs.org/ The idea is a desktop app framework serves up your node app to itself, via the chromium. I had a bit of a foray with Electron- the node execa
npm install execa package let me launch a shiny server from electron, wait a moment, then load a node/browser app that acts as a interface to the shiny process. While this mostly worked, it is definitely overkill for my shiny stuff. Good to have as a tool though.
If you happened to be working with…. KML data (or any data with large description strings) and transitioning it into the ESRI Story Map toolset, there is a very good chance you hit the the dBase 254 character length limit with the ESRI Shapefile upload. Shapefiles are always a terrible idea.
the solution: with GDAL or QGIS (alright, even in ArcMap), one can use GeoJSON as an output format AND import into the story map system- with complete long description strings!
Merge vector layers -> save to file -> GeoJSON
arcpy.env.workspace = “/desktop/arcmapstuff”
arcpy.FeaturesToJSON_conversion(os.path.join(“outgdb.gdb”, “myfeatures”), “output.json”)
ogr2ogr -f GeoJSON output.json input.kml
View the tools here: http://kml.jessdev.org
Three of my KML tools are now stable and in Github. These are actually displayed via the static site generator Hugo (read about the Hugo CLI here), which is sitting in the shiny server (port 3838) next to the apps. Messy, but it will do for now.
New Shiny App specific Repo now live…
With KML Search and Convert now fully functional (along with the tiny app “clean”) , live shiny apps of mine now have a repo of their own. Check it out!
Written in R; using GDAL/EXPAT libraries on Ubuntu and hosted with AWS EC2.
New App: KML Search and Convert
Here is an simple (beta) app of mine that converts KML files into Excel-friendly CSV documents. It also has a search function, so you can download a subset of data that contains keywords. 🙂
The files will soon be available in Github.
I’m still working on a progress indicator; it currently lets you download before it is done processing. Know a completely processed file is titled with “kml2csv_<yourfile>.csv”.