Skip to content

Commit

Permalink
Hotfix for Zoning Atlas Data
Browse files Browse the repository at this point in the history
* Because the Zoning Atlas data did not properly display for users who chose to use Excel as their CSV viewer, we are now providing a Sharepoint link that is in XLSX format for their conveinence.
* Even more annoying was that the shapefile did not include any shapes when we exported it. So we also had to create the shapefile manually and put into sharefile.

Related to #366 and #365, but does not fix them beyond Zoning Atlas.
  • Loading branch information
mzagaja committed Jan 6, 2021
1 parent 3f294c7 commit dcbf856
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/javascript/pages/components/partials/DatasetHeader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,19 @@ function downloadCsv(
queryYearColumn = ''
) {
const yearString = selectedYears.join();
if (table === 'zoning_atlas') {
return 'https://mapc365.sharepoint.com/:x:/s/DataServicesSP/Efonrnmw_kdMhmG3Dw2BkTcBIpe2sC_2ADWTWfUjOs4JhQ?e=K65BCE';
}
if (selectedYears.length > 0 && queryYearColumn !== '') {
return `/csv?table=${schema}.${table}&database=${database}&years=${yearString}&year_col=${queryYearColumn}`;
}
return `/csv?table=${schema}.${table}&database=${database}`;
}

function downloadShp(database, schema, table) {
if (table === 'zoning_atlas') {
return 'https://mapc365.sharepoint.com/:f:/s/DataServicesSP/ErKkXSLH_iBOlDhJrTXldrYBIIZ4ZXe4Bkw7OyVapVpX3Q?e=iRkWVB';
}
return `/shapefile?table=${database}.${schema}.${table}&database=${database}`;
}

Expand Down

0 comments on commit dcbf856

Please sign in to comment.