LSSTDESC / LSSTDarkMatter

Project focused on understanding the fundamental nature of dark matter with LSST
MIT License
10 stars 4 forks source link

Dark Matter Graph #9

Open kadrlica opened 6 years ago

kadrlica commented 6 years ago

We would like to prototype out a graphical representation of dark matter probes. After some initial discussion, it seems like this can be divided into a few aspects:

kadrlica commented 6 years ago

@andrew-zentner @bechtol @aimalz may all be interested in this.

kadrlica commented 6 years ago

@yymao was looking at some examples on D3.

johannct commented 6 years ago

I spent 2' on the D3 website and my head is spinning :) Probably a bit early to dive into that, but definitely a rich set of tools!

drphilmarshall commented 6 years ago

Sounds like a useful communication device! Did you talk about also linking the probes to a 4th (or maybe 0th) category, "Fundamental Physics Parameter"? Could be nice to see which probes get at which aspects of the nature of DM (perhaps with the notion of "X mostly measures Y").

kadrlica commented 6 years ago

Thanks for the feedback @drphilmarshall. The "fundamental physics" is absolutely on the docket (and is being discussed on slack). We decide to simplify away from this on the current iteration of the hack, but I expect we will add it back in as a "column 0" in future iterations.

yymao commented 6 years ago

The web app is hosted in this repo: https://github.com/lsstdarkmatter/dark-matter-graph

A preview of the web app is at: https://lsstdarkmatter.github.io/dark-matter-graph/

Comments welcome. @kadrlica @drphilmarshall @aimalz

johannct commented 6 years ago

Kudos! Is the preview automatically updated when the repo is modified? Is it possible to have a how-to in the Readme.md as to how to deploy it, assuming user install of the D3 toolkit?

yymao commented 6 years ago

@johannct For now, it does not automatically updates itself when the spreadsheet is changed.

I added how to view this web app locally in the README: https://github.com/lsstdarkmatter/dark-matter-graph#usage

You don't need to install D3 (as long as you have internet), but you do need to have python available.

johannct commented 6 years ago

thanks @yymao ! So, D3 is needed to construct the data.json file? If yes, then is it possible to provide a developer note about how to build it? The point is that people can now build upon this nice work by adding to it, or trying new column (I find it currently a bit too abstract without some references or attached graphs or paragraph, that could pop up when a path is hovered upon or a rectangle clicked over, as discussed on slack IIRC)

yymao commented 6 years ago

It uses Python to construct data.json from the content in the spreadsheet. And then it uses d3.js to visualize data.json as a web app. The only common ground between these two steps is the format of data.json. The current required format of data.json can be found here. But it'll probably change when we expand the functionality (like having mouseover tooltips). Right now this is just a minimal example.

Currently this preview is hosted on github, which only allows static web app. So it is not easy for people to add new things to the database through the web app. To do that, we'll need a server-side app.

kadrlica commented 6 years ago

This is very cool @yymao! I think that this puts the pressure on us to increase the content of the spreadsheet!

A few minor thoughts about the minimal example (which is already very close to what we had imagined): 1) Is it possible to allow the user to dynamically change the zoom? The entire graphic doesn't fit on my laptop screen. I'm able to change this with Chrome's zoom level, but it might be useful to make this part of the webapp. (Also, I expect that the content will only grow, and there may be some reason someone would want to visualize the whole network at once.) 2) It looks like there is a static font size regardless of the content length. This means that some long entries (i.e., "Weak lensing (position-shear corr.)") over-flow their boxes.

yymao commented 6 years ago

@kadrlica Yes, we need to increase the content and also think about if the underlying data format is suffient.

As for the cosmetic requests, they are all possible. I just didn't spend too much time on the cosmetic details as you can probably tell. Do you mind opening issues at https://github.com/lsstdarkmatter/dark-matter-graph/issues for these feature requests? Thanks!

kadrlica commented 6 years ago

@yymao completely understand on the cosmetics (it already looks really good!). I'll create some issues so we can come back later.