# Imageless Glare DGP data mount on HBJSON file while exporting to VTKJS

**URL:** <https://discourse.pollination.solutions/t/imageless-glare-dgp-data-mount-on-hbjson-file-while-exporting-to-vtkjs/1856>\
**Category:** Scripting\
**Tags:** question\
**Created:** [August 1, 2022, 5:17pm UTC](https://discourse.pollination.solutions/t/imageless-glare-dgp-data-mount-on-hbjson-file-while-exporting-to-vtkjs/1856 "2022-08-01T17:17:31Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![anujm1ttal](https://discourse.pollination.solutions/user_avatar/discourse.pollination.solutions/anujm1ttal/32/6690_2.png) [@anujm1ttal](https://discourse.pollination.solutions/u/anujm1ttal)\
**Post date:** [August 1, 2022, 5:17pm UTC](https://discourse.pollination.solutions/t/imageless-glare-dgp-data-mount-on-hbjson-file-while-exporting-to-vtkjs/1856/1 "2022-08-01T17:17:31Z")

</div>

Hi All,

I have followed the steps [here](https://github.com/ladybug-tools/honeybee-vtk#load-hb-model-and-annual-daylight-results) and mounted the metrics data of the imageless glare analysis to be eventually viewed in Para view/Pollination App.

I am wondering if its possible to also mount the DGP data in the results folder as well and GA data in the metrics folder.

Please guide me to a resource so I can understand it better.

Thanks  
Anuj

---

<div class="post-metadata">

**Author:** ![devang](https://discourse.pollination.solutions/user_avatar/discourse.pollination.solutions/devang/32/9082_2.png) [@devang](https://discourse.pollination.solutions/u/devang)\
**Post date:** [August 1, 2022, 5:29pm UTC](https://discourse.pollination.solutions/t/imageless-glare-dgp-data-mount-on-hbjson-file-while-exporting-to-vtkjs/1856/3 "2022-08-01T17:29:41Z")

</div>

Hi @anujm1ttal,

I see that you’ve deleted the post. Let us know if we can help.

---

<div class="post-metadata">

**Author:** ![mostapha](https://discourse.pollination.solutions/user_avatar/discourse.pollination.solutions/mostapha/32/5761_2.png) [@mostapha](https://discourse.pollination.solutions/u/mostapha)\
**Post date:** [August 1, 2022, 7:39pm UTC](https://discourse.pollination.solutions/t/imageless-glare-dgp-data-mount-on-hbjson-file-while-exporting-to-vtkjs/1856/4 "2022-08-01T19:39:30Z")

</div>

Hi @anujm1ttal, The `-viz` version of the recipe already creates a visualization that includes a VTKJS file. Is this what you are looking for?

 ![image](https://discourse.pollination.cloud/uploads/default/original/2X/f/fc8b59100432f35b239050c9efe0641d017a16e5.png)

[Here is the recipe](https://app.pollination.cloud/ladybug-tools/recipes/imageless-annual-glare/0.0.15-viz).

---

<div class="post-metadata">

**Author:** ![anujm1ttal](https://discourse.pollination.solutions/user_avatar/discourse.pollination.solutions/anujm1ttal/32/6690_2.png) [@anujm1ttal](https://discourse.pollination.solutions/u/anujm1ttal)\
**Post date:** [August 2, 2022, 8:52am UTC](https://discourse.pollination.solutions/t/imageless-glare-dgp-data-mount-on-hbjson-file-while-exporting-to-vtkjs/1856/5 "2022-08-02T08:52:48Z")

</div>

Hi @mostapha @devang .

Thank you for replying so quickly. I have already checked out the -viz version of the recipe.  
The visualization file ( vtkjs ) only has the GA data mounted on it.

I was wondering if it can also get the DGP data mounted so that the same can also be viewed on the App when you select the date and time as an input from the user.

currently I am able to do this in grasshopper by selecting the HOY in HB annual average values component and passing the values of the selected hour to the LB Spatial Map as shown in the image below.

 ![image](https://discourse.pollination.cloud/uploads/default/original/2X/8/84695e74400c29d5a3cc5b8404bf762a53ee89cc.png)

I maybe missing something, but this hourly visualization is really powerful and i want to implement it in the pollination App.

Thanks  
Anuj

---

<div class="post-metadata">

**Author:** ![mostapha](https://discourse.pollination.solutions/user_avatar/discourse.pollination.solutions/mostapha/32/5761_2.png) [@mostapha](https://discourse.pollination.solutions/u/mostapha)\
**Post date:** [August 2, 2022, 1:47pm UTC](https://discourse.pollination.solutions/t/imageless-glare-dgp-data-mount-on-hbjson-file-while-exporting-to-vtkjs/1856/6 "2022-08-02T13:47:14Z")

</div>

Hi @anujm1ttal! Thank you for the clarification. The hourly visualization doesn’t come by default but you should be able to create these visualizations on the fly in the app. Let me discuss this with @devang and get back to you about the best approach. What is your end goal for this visualization? Are you including it in a report? Is it for sharing the results with a customer or internally? Do you need it for a single day at a time?

---

<div class="post-metadata">

**Author:** ![anujm1ttal](https://discourse.pollination.solutions/user_avatar/discourse.pollination.solutions/anujm1ttal/32/6690_2.png) [@anujm1ttal](https://discourse.pollination.solutions/u/anujm1ttal)\
**Post date:** [August 2, 2022, 2:52pm UTC](https://discourse.pollination.solutions/t/imageless-glare-dgp-data-mount-on-hbjson-file-while-exporting-to-vtkjs/1856/7 "2022-08-02T14:52:23Z")

</div>

Hi @mostapha ,

So the goal is to use this app to make it easy for the team to figure out the worst possible scenarios.  
It is for internal use at the moment, just to test.

Either a single day or Hourly would be okay. I am trying to figure out how to mount the hourly data in the App.

---

<div class="post-metadata">

**Author:** ![devang](https://discourse.pollination.solutions/user_avatar/discourse.pollination.solutions/devang/32/9082_2.png) [@devang](https://discourse.pollination.solutions/u/devang)\
**Post date:** [August 21, 2022, 8:00pm UTC](https://discourse.pollination.solutions/t/imageless-glare-dgp-data-mount-on-hbjson-file-while-exporting-to-vtkjs/1856/8 "2022-08-21T20:00:21Z")

</div>

Sorry, @anujm1ttal for the delay in responding to this. I was in the middle of job changes.

So I put together [this](https://github.com/devngc/annual-glare/blob/setup-repo/app.py) script for you. The script will show you how to use pollination apps to do what you have done in Grasshopper.

---

<div class="post-metadata">

**Author:** ![anujm1ttal](https://discourse.pollination.solutions/user_avatar/discourse.pollination.solutions/anujm1ttal/32/6690_2.png) [@anujm1ttal](https://discourse.pollination.solutions/u/anujm1ttal)\
**Post date:** [August 23, 2022, 9:59am UTC](https://discourse.pollination.solutions/t/imageless-glare-dgp-data-mount-on-hbjson-file-while-exporting-to-vtkjs/1856/9 "2022-08-23T09:59:17Z")

</div>

Thanks @devang  
Big thanks for the script. I went much deeper into the honeybee\_vtk library than ever before to understand the code.  
This works perfectly to what I was looking for and I have been playing with the code a bit.

I have a few questions regarding the folder structure.  
I am adding the `results_folder_path` and `target_folder_path` as an input to the app.

> results\_folder\_path = st.text\_input( label = ‘Enter the results folder path’, value = ’ ’ )  
> target\_folder\_path = st.text\_input( label = ‘Enter the target folder path’, value = ’ ’ )

When I run the app, I can see that it generates the following in the specified `target_folder_path`

![image](https://discourse.pollination.cloud/uploads/default/original/2X/c/c560d0db589773662ea41a0ec2ff01e0d8558b8f.png)

Although, its not able to read the `grids_info.json` from this path and i get this error

 ![image](https://discourse.pollination.cloud/uploads/default/original/2X/2/26afc4c01944c356b15806331d3ea83821723a88.png)

When I change the `target_folder_path` to Path(‘data’), it works fine.

> target\_folder\_path = Path(‘data’)

and I can see that it generated the same information in the `data` folder.  
I am not sure why it is not reading the grids\_info.json from the specified `target_folder_path`.

Please let me know if you have any suggestions.  
Thanks

---

<div class="post-metadata">

**Author:** ![devang](https://discourse.pollination.solutions/user_avatar/discourse.pollination.solutions/devang/32/9082_2.png) [@devang](https://discourse.pollination.solutions/u/devang)\
**Post date:** [August 26, 2022, 5:21pm UTC](https://discourse.pollination.solutions/t/imageless-glare-dgp-data-mount-on-hbjson-file-while-exporting-to-vtkjs/1856/10 "2022-08-26T17:21:15Z")

</div>

@anujm1ttal,  
you might want to update the write\_config function. You’d see that path to the folder is hard coded as “data”. I believe that’s the likely culprit. This script was hurriedly put together so you should look forward to making such tweaks.

---

<div class="post-metadata">

**Author:** ![anujm1ttal](https://discourse.pollination.solutions/user_avatar/discourse.pollination.solutions/anujm1ttal/32/6690_2.png) [@anujm1ttal](https://discourse.pollination.solutions/u/anujm1ttal)\
**Post date:** [August 30, 2022, 8:35am UTC](https://discourse.pollination.solutions/t/imageless-glare-dgp-data-mount-on-hbjson-file-while-exporting-to-vtkjs/1856/11 "2022-08-30T08:35:26Z")

</div>

@devang thank you.  
It works perfectly.

😃

---

<div class="post-metadata">

**Author:** ![devang](https://discourse.pollination.solutions/user_avatar/discourse.pollination.solutions/devang/32/9082_2.png) [@devang](https://discourse.pollination.solutions/u/devang)\
**Post date:** [August 30, 2022, 7:32pm UTC](https://discourse.pollination.solutions/t/imageless-glare-dgp-data-mount-on-hbjson-file-while-exporting-to-vtkjs/1856/12 "2022-08-30T19:32:06Z")

</div>

Good to know it helped @anujm1ttal. We would appreciate it if you could share on LinkedIn when your app is finished and it is a public app. If it’s not public then perhaps sharing your experience developing the app will also help.
