ThreeSixtyGiving / grantnav

This is a web based search tool for data in the 360 giving data format.
http://grantnav.threesixtygiving.org/
Other
9 stars 5 forks source link

How GrantNav generates Funder Name from 360Giving data #409

Closed KDuerden closed 5 years ago

KDuerden commented 6 years ago

Adding this issue about how GrantNav generates the Funder Name view and Filter name by taking the name from a grant record. Following testing it seems to have been established that: The Funder Name view picks the name from a grant record at random. The Filter name picks the name from the first/top grant record in the file.

When a Funder changes its name (but not its Funder Org ID), and has grants data featuring two Funder Org Names, it will not currently be possible to control whether the new or old name appears in the Funder view. It will also potentially change with each load of GrantNav.

stevieflow commented 6 years ago

To add:

This is a condition where the Funding Org: Identifier is the same, but the Funding Org: Name is multiple

@KDuerden the request is to read in each unique Funding Org: Name and create a unique filter and funder page?

(I think you only mean the filter?)

KDuerden commented 6 years ago

No, the request is to have the Funder page name populated in a predictable, rather than a random way. There should only be one filter name. The aim is that when a Funders has an old and a new name, we can provide guidance about how they can ensure the 'correct' name appears in the filter, Funder page, Funder list etc.

stevieflow commented 6 years ago

No, the request is to have the Funder page name populated in a predictable, rather than a random way. There should only be one filter name.

Even when there are two different strings for the name in the data?

The aim is that when a Funders has an old and a new name, we can provide guidance about how they can ensure the 'correct' name appears in the filter, Funder page, Funder list etc.

But , you do want to see both names maintained in GN?

KDuerden commented 6 years ago

The request is for a predictable (not random) process for populating the Funder name, in the places where GrantNav is making a "choice". It is my understanding that a "choice" is made to populate Funder view page, Filter and I'm assuming the name in the Funder list too. In the search view and grant view, I am assuming that the name is taken from the particular grant record - and so which ever name is used for that record should be displayed.

kindly commented 6 years ago

@KDuerden just looked at the code and your assessment current behaviour is basically correct.

The filter The name is taken from the first grant that is loaded into grantnav with that organizations id.

The funder page The name is taken from the first grant returned in that page. (this really should be the same as the filter name above)

Grant pages/search result listings This takes the name from the particular grant record.

We can easily fix the the funder page name to be the same as the filter name.

However, even the filter name is not predictable as it is the funder name of the first grant grantnav sees when loading data, which may not be the one you want.

For recipientOrgs we use the charity list as the primary source of name and only revert to using the first grant when we can not find it in that list.

Grantnav needs to choose "something" for the filter name and there is not always a "right" choice.
The only thing we can do is maintain a list of id-name mapping we want them to be, but I am not sure who would maintain that.

KDuerden commented 6 years ago

Bob tested a few times and found Filter seemed to always use the top record in the loaded file, but I'm not sure if those tests also looked at what happens when there is more than one file. If that behaviour (taking top record Funding Org:Name) is predictable when there is a single file only, then at least that is the guidance that can be passed on to publishers.

The Data Registry includes a name, and this is currently maintained by 360. But it seems preferable to have as much as possible in GrantNav taken from the data itself.

stevieflow commented 6 years ago

@KDuerden so - just to double check - this issue is not about the scenario of a funder with two names and one ID?

KDuerden commented 6 years ago

It has been prompted by that scenario. So it is about one ID, two names.

kindly commented 6 years ago

The Filter will use the top record of the first file it finds with that funder ID.

My question is what is the desired behaviour?

I think the Funder page name should be the same as the Filter. This should be easy to fix.

How about the individual grants, should they be the same as the Filter or should they show whatever that particular grant says?

KDuerden commented 6 years ago

I think individual grants should show the name associated with the grant - otherwise GrantNav is overwriting the data itself. A publisher that wants a new name associated with individual old grants (awarded under an old name) can update their file. I'm not suggesting a modification of the 'summary' functions that GrantNav has to make the data easier to explore - eg filter/Funder pages. There should only be one name appearing in those places when there is one ID.

With a proposed (hopefully easy) fix to the Fund page name, to make it the same as the Filter, we get to a situation where we can explain exactly how the Funder name is populated in each case. A publisher then has some control over how their name appears - eg through changing the name/s in their files, or through the position of their preferred name in their file/s.

kindly commented 6 years ago

A pull request has been made to make the funder name on the funder page the same as the Filter name.

KDuerden commented 6 years ago

Hi there! A 360 data publisher is changing its name early next year, so I wanted to double-check the behaviour for populating the Funder name in GrantNav (funder page & filter name). First grant record in file? Most recent grant record? Thank you!

robredpath commented 5 years ago

@KDuerden sorry for not seeing this earlier!

Both the filter and the funder page get their values from the first record in the first file that GrantNav finds that has that funder ID. Therefore, this is a question of ordering in the data that GrantNav consumes - if a publisher wants to control the name that appears in the filter and on the funder page, they'll need to either update the first file in the registry, or work out a way of putting their newest file first (I don't know how the registry file order is set, but I assume it's in Salesforce somewhere?)

What's the end result that we want to get to here?

KDuerden commented 5 years ago

@robredpath thanks

What's the end result that we want to get to here?

That we can give guidance to a publisher that has two names (old and new) and wants to control which name appears in GrantNav funder page & filter.

I've just checked Salesforce but can't see the logic behind the order I'm seeing on the Registry - doesn't seem to be based on the URI for the data distribution, the title or added date.

KDuerden commented 5 years ago

@robredpath does this now need to be an issue on registry? seems like GN part is resolved.