Skip to content

Commit

Permalink
Merge pull request #50 from earthrise-media/update-data-file
Browse files Browse the repository at this point in the history
Update data to include all crops
  • Loading branch information
Martin Bernard authored Nov 22, 2023
2 parents 5db8c8f + 90109b0 commit 15fedcd
Show file tree
Hide file tree
Showing 45 changed files with 20,517 additions and 10,255 deletions.
10,236 changes: 10,236 additions & 0 deletions vacs-map-app/public/data/crop-yields-mean-models(old).csv

Large diffs are not rendered by default.

20,472 changes: 10,236 additions & 10,236 deletions vacs-map-app/public/data/crop-yields-mean-models.csv

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions vacs-map-app/scripts/generate-minimaps.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ const getData = () => {
const [_, crop, timeframe, scenario] = k.split('_');
if (timeframe === 'historical') return;

const historicalKey = ['yield', crop, 'historical_ssp370'].join('_');
const historicalKey = ['yield', crop, 'historical'].join('_');

if (!yieldKeys.includes(historicalKey)) return;

const yieldRatioKey = ['yieldratio', crop, timeframe, scenario].join('_');

let yieldRatioValue = null;
if (d[k] !== null && d[historicalKey] !== null) {
if (d[k] !== null && d[historicalKey] !== null && d[historicalKey]) {
yieldRatioValue = (d[k] - d[historicalKey]) / d[historicalKey];
}
rowWithYields[yieldRatioKey] = yieldRatioValue;
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion vacs-map-app/src/assets/img/minimaps/tef_future_ssp126.svg

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion vacs-map-app/src/assets/img/minimaps/tef_future_ssp370.svg

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions vacs-map-app/src/stores/cropYields.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ export const useCropYieldsStore = defineStore('cropYields', () => {
const [_, crop, timeframe, scenario] = k.split('_')
if (timeframe === 'historical') return

const historicalKey = ['yield', crop, 'historical_ssp370'].join('_')
const historicalKey = ['yield', crop, 'historical'].join('_')

if (!yieldKeys.includes(historicalKey)) return

const yieldRatioKey = ['yieldratio', crop, timeframe, scenario].join('_')

let yieldRatioValue = null
if (d[k] !== null && d[historicalKey] !== null) {
if (d[k] !== null && d[historicalKey] !== null && d[historicalKey]) {
yieldRatioValue = (d[k] - d[historicalKey]) / d[historicalKey]
}

Expand Down
2 changes: 1 addition & 1 deletion vacs-map-app/src/stores/filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const useFiltersStore = defineStore('filters', () => {
new Set(
Object.keys(firstRow)
.filter((k) => k !== 'id')
.map((k) => k.split('_').slice(-2).join('_'))
.map((k) => k.split('_').slice(2).join('_'))
)
).sort()
selectedModel.value = availableModels.value[0]
Expand Down

0 comments on commit 15fedcd

Please sign in to comment.