Create report: holding institution
Please create a report that includes
- holding institution slug
- holding institution authorized name
- holding institution coordinates
- holding institution portals (please list each portal in a separate column)
- holding institution state (field needs to be added--see #490 (closed))
- holding institution county (field needs to be added--see #490 (closed))
I need to ask about portals. We can use repositories to figure out portals. Might be good to meet about this report in general, potentially with Brad/Seamus there as well. Also state/county come back as arrays, eg a holding inst can have multiple associated counties.
Josh suggested using this to make the counties/states display better in the report:
inst.geographic_locations.pluck(:us_county).filter{|x| x.present?}.uniq.join(', ')
Also potentially helpful:
HoldingInstitution.includes(repositories: :portals).each {|inst| puts inst.repositories.map {|repo| repo.portals.map &:code}.flatten.uniq.join(', ')}
(prob change repositories to collections)
Will want to use the same algorithm that is used here: https://dlg.usg.edu/institutions