Re: [Ala-portal] Customising facet fields in biocache hubs
Hi Daniel,
I have another question. How can I define which facets are shown on the Hubs to filter occurrence data? The visible filters depends of a configuration file?
This a good question and one that may help many other groups so I'd recommend posting questions like this to the GBIF ALA-portal mailing list (CCed).
The facet fields that are shown in the left column of the search results can be changed via the configuration settings - either Config.groovy or the external properties file (e.g. /data/generic-hub/config/generic-hub-config.properties), depending on which you are using.
The config variables starting with "facets." are responsible for this:
• facets.include - comma separated list of fields to include (usually only those fields not in the default set as specified by ${biocache.baseUrl}/search/facets) • facets.exclude - comma separated list of fields to exclude. i.e. fields in the default set you don't want to appear • facets.hide - comma separated list of field that would be included the facet column but that you want to be hidden (i.e. unticked in the "customise filters" drop down). So these fields will be displayed if the user changes the default display settings and chooses to turn them on.
Note you can also change the default set of facets but this is set in the biocache-service application, also via config vars (I think). You may also want to change the way facets are grouped together (see ${biocache.baseUrl}/search/grouped/facets).
I'll add this info to the Wiki, as well.
Cheers
Nick -- Nick dos Remedios Software Developer Atlas of Living Australiahttp://www.ala.org.au National Facilities & Collections, CSIROhttp://www.csiro.au/Organisation-Structure/National-Facilities.aspx nick.dosremedios@csiro.aumailto:nick.dosremedios@csiro.au
On 8 Aug 2014, at 8:41 am, Daniel Lins <daniel.lins@gmail.commailto:daniel.lins@gmail.com> wrote:
Thanks Nick!!
This was the problem. I changed the javascript file and now is working fine.
I have another question. How can I define which facets are shown on the Hubs to filter occurrence data? The visible filters depends of a configuration file?
Thanks again!!
Cheers,
2014-08-06 23:16 GMT-03:00 <Nick.Dosremedios@csiro.aumailto:Nick.Dosremedios@csiro.au>: Hi Daniel,
Yes, if you think you found a bug then add it as an issue on the Gihub page.
I had a look at the issue and I can see using the "Inspect element" tool in Chrome (or FireBug in FF), that when you click on the polygon is doing an AJAX lookup against the ALA prod biocache:
http://biocache.ala.org.au/ws/occurrence/facets.json?q=*%3A*&wkt=POLYGON...http://biocache.ala.org.au/ws/occurrence/facets.json?q=*:*&wkt=POLYGON((-58.68896484375%20-8.254982704877863,-57.94189453125%20-8.320212289522944,-58.51318359374999%20-8.971897294083,-58.68896484375%20-8.254982704877863))&facets=taxon_name&callback=jQuery18304812444490380585_1407377434339&_=1407377497545
I think this was hard-coded by Adam, so I'll look to fixing it so it uses the config var for the bioacache URL (biocache.baseUrl ).
Cheers
Nick -- Nick dos Remedios Software Developer Atlas of Living Australiahttp://www.ala.org.au/ National Facilities & Collections, CSIROhttp://www.csiro.au/Organisation-Structure/National-Facilities.aspx nick.dosremedios@csiro.aumailto:nick.dosremedios@csiro.au
On 7 Aug 2014, at 12:03 pm, Daniel Lins <daniel.lins@gmail.commailto:daniel.lins@gmail.com> wrote:
Hi Nick, how are you?
I have some questions about where we can log bugs found in ALA software. I can do this on the GitHub website?
The feature that calculates the number of species and occurrences within the drawn polygon has some problems (it shows incorrect values in the balloon). Below I will describe a step-by-step test which shows the problem:
1. All test data are shown on the map (BrazilData1.png). 2. A specific point on the map has 27 occurrences (BrazilData-specificarea.png). 3. When drawing a polygon around this point, the system shown that selected area has 0 species and 0 occurrences (CalcResultWithWrongValues.png). 4. When you click "Show These records only", the system shows the 27 existing records in the selected area (FilteredDataWithCorrectValues.png).
Info 1: Sometimes the system shows 0 records. Most of the time it shows incorrect values. However, when you click "Show These records only", the system displays the correct number of records.
Info 2: Generally the result of calculating the amount of species is also not correct.
You can access this portal on http://143.107.102.247:65002/avh-hub/occurrences/search?taxa=#tab_mapView
Thanks!
Cheers. -- Daniel Lins da Silva (Mobile) 55 11 96144-4050 Research Center on Biodiversity and Computing (Biocomp) University of Sao Paulo, Brazil daniellins@usp.brmailto:daniellins@usp.br daniel.lins@gmail.commailto:daniel.lins@gmail.com
<FilteredDataWithCorrectValues.png><CalcResultWithWrongValues.png><BrazilData-specificarea.png><BrazilData1.png>
-- Daniel Lins da Silva (Mobile) 55 11 96144-4050 Research Center on Biodiversity and Computing (Biocomp) University of Sao Paulo, Brazil daniellins@usp.brmailto:daniellins@usp.br daniel.lins@gmail.commailto:daniel.lins@gmail.com
participants (1)
-
Nick.Dosremedios@csiro.au