DigitalCommons / open-data-and-maps

Deprecated: Implementation of Linked Open Data by the Solidarity Economy Association
6 stars 1 forks source link

Include initiatives' secondary activities in the map #150

Closed joebillings closed 4 years ago

joebillings commented 5 years ago

The Map App already knows about the secondary activities, we just need to alphabetise the structure that stores them before they are displayed in the directory.

It was suggested that we also have an indication of initiatives' activities in the initiative popup. Since we're using colours, this could be a row of coloured circles that each have a tooltip to display the activity when hovered over.

joebillings commented 4 years ago

Update: We removed Secondary Activities and Organisational Structure from the map shortly before releasing Solidarity Oxford.

The reason for this was twofold - sorting the data was taking too long and we were getting the data in a suboptimal way.

When sse_initiative.js processes the data it expects each datapoint to contain represent a unique initiative. Including organisational structure and secondary activities in the query will generate multiple datapoints for some initiatives because the respective fields can contain multiple values.

Instead of adding UID checking to see which initiative we were dealing with, we waited until the initiative had been generated and used a new query for it to find the organisational structure and secondary activities. This was at best resource intensive and slow and at worst generated browser errors due to the number of requests made.

I propose that we adapt the existing query to include the organisational struct and secondary activities and check the UID of each datapoint before processing to see if the values need adding to an existing initiative or not.

This should be possible by checking against the object initiativesByUid.

sunnydean commented 4 years ago

What are Secondary Activities? Is this just another organisational structure value? @ColmMassey

ColmMassey commented 4 years ago

If you look in the data for an Oxford initiative you will often see multiple activities for the initiative's economic sector,

and a single

We seem to no longer use the term sector in the app, and use Activities only.

sunnydean commented 4 years ago

We should be actually querying them in the same SPARQL query, rather than working around and processing the data in the JS scripts.

But this will definitely require us to update Virtuoso (https://stackoverflow.com/questions/42010103/group-concat-in-sparql#comment71199775_42010103)

sunnydean commented 4 years ago

BTW should secondary activities be indexed in the Directory? (i.e. should get initiatives with education listed as a secondary activity when you click on Education in the directory?)

sunnydean commented 4 years ago

@ColmMassey added the current hack here : https://dev.oxford.solidarityeconomy.coop/ We should update virtuoso though, it will allow us to query data in a bit more versatile way

We are essentially now processing the data in the js rather than the sparql processor

ColmMassey commented 4 years ago

BTW should secondary activities be indexed in the Directory? (i.e. should get initiatives with education listed as a secondary activity when you click on Education in the directory?)

I think, no. Let's review when we get to look at https://github.com/SolidarityEconomyAssociation/sea-map/issues/53

ColmMassey commented 4 years ago

We should update virtuoso though, it will allow us to query data in a bit more versatile way We are essentially now processing the data in the js rather than the sparql processor

Created this Issue for later. https://github.com/SolidarityEconomyAssociation/sea-map/issues/62

ColmMassey commented 4 years ago

Can you remove the applied bold treatment from the Secondary Activities?

sunnydean commented 4 years ago

We need to update all the queries before we can fully close the issue, currently it works for oxford and newbridge. Could you put in a new ticket to update mini-websites with latest sea map and reference this ticket? (or am I free to do that myself?) THX @ColmMassey

ColmMassey commented 4 years ago

Could you put in a new ticket to update mini-websites with latest sea map and reference this ticket? (or am I free to do that myself?) THX

Go for it.