3
$\begingroup$

I have String values stored in a databin. I want users to add values to the databin through webform at datadrop.wolframcloud.com or via the link created by evaluating:

(* 1 *) bin = Databin["GpqwBQQJ"]["WebForm"]

I then want to CloudDeploy a WordCloud that takes the updated values of the databin and displays a WordCloud like this:

(* 2 *) CloudDeploy[WordCloud[Values[Databin["GpqwBQQJ"]]]]

It will only display Strings that were in the Databin at the time I evaluated line 2, and generated a new url. Any subsequent additions to the databin do not result in a new WordCloud when I refresh the page.

I read this post: CloudDeploy a Manipulate... and I tried setting "Evaluate" permissions, but no luck. I have a hunch that this user was on to a similar problem, but the post lacks enough code to help me.

$\endgroup$

1 Answer 1

2
$\begingroup$

I would try something like below:

  • 2nd argument "sameURLtest" of CloudDeploy will deploy to the same URL every time you redeploy, so you do not create a plethora of junk test deployments with different randomly generated URLs.

  • Delayed will force any new reload of URL to rerun the code: access the data bin and regenerate new WordCloud

  • Rasterize converts WordCloud to an image before deployment and allows to control image quality. This helps to display WordCloud better on the web. Check out also ImageResolution option.

I hope this helps, let me know if this works for you.

CloudDeploy[
    Delayed[
        Rasterize[
            WordCloud[Values[Databin["GpqwBQQJ"]]],
        ImageSize->500]
    ],
"sameURLtest",
Permissions->"Public"]

Basically Delayed does the trick. There is a nice related workflow that shows how Delayed works at the very end:

http://reference.wolfram.com/language/workflow/SetUpAWebGallery.html

$\endgroup$
1
  • $\begingroup$ Fantastic! This works beautifully. Thank you =) $\endgroup$
    – Matt Green
    Sep 11, 2019 at 14:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.