bcgov / BCHeritage

Branch level repository for documentation and product issues.
Apache License 2.0
4 stars 0 forks source link

Public Site CSV output #947

Open emjohnst opened 2 months ago

emjohnst commented 2 months ago

For Testing, we have performed the following to compare the databc view before and after:

call refresh_materialized_views();
create table databc.before_947 as select * from databc.V_HISTORIC_ENVIRO_ONEROW_SITE order by borden_number;

The data export view is called heritage_site.csv_export

The views should be dropped after this issue goes to prod.

Public should have the ability to export reports of search results that include the following information.

Quotations indicate CSV column label

Date should also appear in this order:

jrods commented 1 month ago

@emjohnst have some questions for you:

  1. Based on the work that is used for databc, the database query is filtering Chronology Event kinds to be only Construction, should this still be the case for the CSV export or should all event kinds be included? As I’m familiar with construction and significant options
  2. For the Architect / Builder Name, based on what I see in databc’s query, there are 2 separate but similar columns, Architect / Designer and Builder. What are you looking for here, since I’m not familiar with the data, but when querying those 2 columns, I see a combination of either both, one another, or none. Would you be able to provide more details?
  3. For the Function Category and Period, would it be better to do the same thing that is done for databc with displaying the Current and Historic functions? Otherwise I'm a bit confused what should be the results, would you be able to expand on?
jrods commented 1 month ago

@emjohnst another question:

  1. For the heritage class columns: contributing resource count, ownership, and heritage category, I'm seeing multiple entries per resource (1 or more), what should be done here? Is it expected to include all in a readable format?
image
emjohnst commented 1 month ago

@jrods

  1. Yes include all events
  2. Continue to export as architect/designer one column and builder another column as with data bc export
  3. Yes let's keep the same as data bc version, with one column of all historic functions and one column with all current functions.
  4. I'm not sure the best approach - can we discuss at check-in tomorrow? Perhaps it would make more sense to have Many Rows versus a One Row approach but lets discuss.
emjohnst commented 1 month ago

@jrods As discussed, here are some options to transform the heritage class information into one string and one column for the csv: Shortened heritage category: Archaeology, Building, Collection, Landscape, Structure. String to appear something like this: Landscape (Public (local), 1); Building (Private, 2)

In the DataBC csv we limited export to highest level of recognition, but here we want to include all recognition. There may need to be some work done to make these columns legible for multiple entries:
"Recognition Government" - Government Name "Recognition Type" - Legislative Act "Reference Number" "Recognition Start Date" - Designation or Protection Start Date "Recognition End Date" - Designation or Protection End Date