onezoom / oztree Goto Github PK
View Code? Open in Web Editor NEWOneZoom Tree of Life Explorer
License: Other
OneZoom Tree of Life Explorer
License: Other
in the ReadMe of OZtree, all references should be "https://github.com/jrosindell/OneZoomPublic" in general there might be incorrect references to the old private repos that need to be checked and replaced.
For museum displays that do not have internet connections, we should have a simple config parameter that switches off e.g. the wikipedia popup tab (we could potentially leave the sponsorship tab, which could show simply a url and QR code, but not an "email me" box), and checks that the installation has a local copy of all the thumbnails available.
There are some static html files in static/OZSite/ (iframe_load.html, About_this_tree.html, & Sources.html). I think we can probably delete these.
E.g. if there is no wikipedia page for a species, should we put up a wikipedia tab which simply says "sorry, there is no wikipedia page for this taxon". Or is it better as we have it, where we don't show the tab if we have no data?
This was picked up as an oddity by one user, but others might find it weirder to have a "no information available" page.
not the system keyboard
The museum display needs to feel easy to use for an unexperienced user. One way is by implementing #18, but we also need to take account of:
1.) The current UI relies on mouseover to show what all the small icons do. Mouseover is not useful on a touchscreen (no mouse). All icons should be large and have an obvious function - for example, rather than mouseover hints, we could include as part of them enough text to make the function clear. An example of this is the compass which shows where you are but at the top level of the tree only shows all life and so the point of it is not clear.
2.) It needs to be obvious to the user from the start what the display is showing (tree of life etc etc.) and what they can do with it (search, common ancestor, back to start, etc etc)
We need to add the option of passing some extra parameters through the URL, in particular:
Image source
Tree type
Colour scheme
(possibly - list of popular places)
These also need to be added to the URL recording scheme we have, e.g. at
I don't understand how get_my_location() in controller_loc.js works. It need modifying to give the richness of the current location (even if that location is not named).
Question: why can't we use something like get_largest_visible_node() from record.js to get the current location, then move up the parent chain to the root, rather than the complex recursive call to get_location3() that is currently being used.
title speaks for itself, just recording during testing. I'll go and add some colours to the themes to resolve this. It occurs in AT colour mode so might be related to that.
last 'event' was in April 2017 so this needs updating
because the root is now everything including bacteria
throttle back refresh loop when not rendering new graphics so that CPU use can be reduced
Typing a general search such as "dodo" radically slows down the whole UI on James' touchscreen. We should check indexes are properly set on the DB, but I don't think this is the root of the problems as there are problems even when the server is running on another computer. It may be to do with returning too many results into the search box (possibly linked to #6)
This is because we moved the content to a page in the main website instead of being injected into the tree view
On a mobile screen it's too small and one reason is that on e.g. iPhone the address bar won't go away from the top and can cover the search bar in portrait mode
We need to store the text position optimally once so that it isn't regularly recalculated causing a gittery effect when zooming
Large circular leaves are rendered in fly throughs when the live site somehow knows to precache those parts of the tree and does not render unexpanded parts of the tree as circles
We try to get the licence etc information from data_repo on line 448 of midnode.js
(data_repo.metadata.leaf_meta[code][credit]
), but this is often not filled out yet, because of how collect_nodes_need_image_details()
works (function in api/image_details.js
).
Ideally we either want to get credit information for all images within shown nodes (perhaps a bit intensive), or as we zoom in to a node, and the 4x2 image array appears, we want to add the internal images to collect_nodes_need_image_details()
I think this is possibly a question for @kz12, what do you think, @jrosindell ?
e.g. Aphelidium chlorococcarum at http://127.0.0.1:8000/life.html/@Aphelidium=4938757.
If there is no OTT, the sponsor leaf page should say something sensible, e.g. "Not available".
Thanks to @feiya for spotting this
they zoom to slightly different parts of the root if the root is the target.
At the moment the popular species tab is populated using a onezoom JS-API call named onezoom.utils.process_taxon_list
, passing in a list of OTTs and a callback function - the callback is processed for each OTT in turn, with common name, node id etc returned. This API function (in src/api/process_taxon_list.js
) needs to be adjusted so that images are also returned to the callback function.
Similarly to about.load / about.html, and data_sources.load/data_sources.html, we should create a terms.load file which is loaded into terms.html.
Is it turned off somehow?
For museums etc we need a way to populate the pics dir so that the OneZoom instance is completely stand-alone, and will work without an internet connection (NB: this will still not allow the display of external pages such as wikipedia, though).
We cannot do this over ssh/rsync. Instead, we probably want a python script that looks up the image IDs from the database table and downloads them over http if they are missing from the pics directory (or if their updated time in the eol_updated table is more recent than the created time on an existing picture)
I'd like to revise it really, but it would need to know popularity for interior nodes as well (even if not named) or have a way to calculate that - this might be something we need to shelve
lots of the functions require two taps because the first tap triggers mouse over text to appear only and gives user a short window of time to tap again and perform the action. I think the action should be performed on the first tap
Before marketing the museum display, we need to make sure that it is reasonably "sandboxed", in that there is no way to navigate to a page or popup that has an external link in it. Perhaps this could be done in an automated manner, using some sort of web crawler? This includes some of the internal OneZoom website pages.
At the moment this is done by using a get request with nolinks=1
set which
(a) redefines the A handler in internal web2py pages, where appropriate (e.g. in about.load, sponsor_node_price.load, etc.)
(b) flags the wikipedia-loading code (which gets wikipedia pages using their REST API) to remove tags that link out to external websites, but keeping internal links within a page (see function sanitise_links()
in treeLayout.html: these include BASE, A, and tags with href=xxx, such as AREA - question: are any more needed?)
(c) turns off the ability to right click for context menus, so that we can't e.g. visit the source of an image by right clicking.
(d) Others??? List here.
I'm wondering if something like is more useful (or with a rounded back end like https://www.shutterstock.com/image-vector/vector-current-location-map-marker-arrow-279362993). Alternatives might be a pointer with no circle, a hand, or perhaps a location item in front of a globe.
A google image search for current location icon is possibly useful, and https://www.shutterstock.com/image-vector/compass-icons-on-white-background-vector-145836710 has a few possibilities.
when you get to the end of the scroll up and down it starts to affect the underlying tree page and tries to scroll that. I suspect this is annoying and difficult to fix but should be recorded in any case.
It correctly tries to switch to the alternative urls, but the view for each (e.g. default/linnean.html) does not exist any more. These views need reinstating.
Also, we should possibly create the list dynamically, from a list of views, so this doesn't happen again.
In an attempt to solve the problem of having one species stand in for an entire group (e.g. see https://github.com/jrosindell/OneZoomComplete/issues/62), I've been trying out various "composite" signposts, e.g.
rather than
E.g. life.html/@mantodea=656293?vis=spiral#x3335951899,y2670646326,w9512788.9481
Which makes the canvas look blank, and requires a lot of zooming out. From URLs like this we should probably jump to a zoom level that at least shows something on the screen.
As it is unclear whether bacterial relationships are ever really "tree-like" in the first place (and even if so, the tree will only represent a small fraction of the "core genes" in the genome). Additionally, the rooting of the bacterial tree is very uncertain. So something that marks out the bacterial branch as only partially representing the relationships (e.g. a dotted or faded line) would be good.
Additionally, we might not want the standard view (especially the polytomy view) to look as if it is rooted.
E.g. go to http://127.0.0.1:8000/life.html/@Coccinella_septempunctata=343294?vis=spiral#x1145,y209,w1.3228 and hit the location bar. The "current location" header is misaligned, as are some of the intermediate groups. It works OK in the museum display. This is to do with 24b5293.
For people who want to develop the JS code, we should really not require them to run an entire web2py server. There should be a way to call the JS code from a static web page, and get nearly everything else, API calls, etc, (although perhaps not the completetree etc. files?) from our server. This should mostly be easy, as we can specify which URLs to use for the API etc in the treeLayout page.
In fact, I think the main issue here is internationalisation, because we load up the UI from a served-up web page (viewer_UI.load) which is translated into different languages. However, we could simply ask the downloader to pick a particular language, and save a copy of viewer_UI.load in that language.
The code currently in 2 files in rawJS/OZTree/src
is a duplicate of leaf drawing code in the main OZ codebase, used to draw leaves e.g. on the sponsor page.
We should modify the main codebase so that we can call these functions on an independent canvas using the main codebase, not rely on separate files.
This is needed because if we embed the sponsor_leaf.html code within a popup (rather than using an iframe), then we need access to that js code, as quite rightly we can't run js from an embedded page.
Setting the root size (on which rem is based to e.g. 200% using html {font-size:200%}
causes the UI elements to disappear on the touchscreen (and probably on all displays). I suspect this is something to do with overflow: hidden
on the body
element (see #9)
When a modal popup is opened, the control button bar on the bottom left disappears. I don't mind this behaviour, but I'm worried that I don't understand why it happens, although I suspect it is something to do with overflow: hidden
being set on the body
element in the css file.
Behaviour observed in Oxford botanic gardens on the touchscreen: often many non-hit search results are returned. I suspect this might be because of firing off the search too easily, so that if you type "collared", a search is requested for 'col' before the rest of the word is typed. Perhaps the search delay in the UI is too long, or is being ignored by the touchscreen.
E.g. it might be possible to create our own wikipedia frames, which encapsulate the wikipedia page but also turn off pinch-to-zoom. That way we don't need to inject e.g. the wikipedia css into the main OneZoom page, which has always struck me as a bit hairy. URLs could be of the form www.onezoom.org/iframe/wiki.html?Qid=xxx&lang=xxx (DONE)
We could possibly do the same for EoL / IUCN / etc pages (perhaps not for the museum display, but simply displaying the page with links and a BASE tag set), which will get around https://github.com/jrosindell/OneZoomComplete/issues/381. (This is also a potential solution to #21 and also to the issue of moving from the sponsor_node page to the sponsor_leaf page)
We should have the ability to add (to the default OZ tree) a set of nodes which lead to e.g. 1/2 the money going to another organization whose goals align with ours. For instance, half the sponsorship money on any of the 8 slow lorises could go to http://www.nocturama.org/en/welcome-little-fireface-project/ , or as Jonathan suggested, we could have a 1 week "special offer" where any sponsored bird gives 50% to the RSPB.
We could also run a competition, open to e.g. conservation charities, for access to this scheme.
This should actually be quite easy. Yan thinks we should save all this info in the partners table, which would require a few more fields, in particular, a list of OTT ids for which this partnership is valid (could also be a node OTT, in which case we look up the descendant leaves in ordered_nodes). There would also need to be a field which flagged up if this was like LinnSoc (only on a single tree, with different URL), or like slow lorises (valid only on the default OZ tree).
E.g. http://127.0.0.1:8000/life.html/@Eukaryota=304358?vis=spiral&pop=on_54358#x380,y-86,w3.1245 (can scroll down on the dialog)
A few issues with this...
1.) space is left on the right for a scroll bar even when one is not needed
2.) when fully zoomed out no data is shown (probably instead it should show just the root still) or some message saying when you've zoomed in this will show where you are.
3.) when I explore the tree on touch it does not dismiss the location box as it should, in fact it dismisses only on mouse up (not even on mouse down).
James has observed this behaviour before. In the viewer on the touch screen, clicking on a modal popup (wiki tabs, image details from copyright symbol, 'about', etc) opens the modal popup, which is then immediately closed again!
@jrosindell can you check if this occurs with the example demo pages at https://getuikit.com/docs/modal
E.g. if in the museum display we inject a wikipedia page with footnotes (look e.g. at the node for "animals"), then when we click on a footnote, instead of being taken down the page, the modal shuts
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.