Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
fix: renamed file name and current data
Browse files Browse the repository at this point in the history
  • Loading branch information
VWSCoronaDashboard27 authored and VWSCoronaDashboard27 committed Aug 8, 2023
1 parent 1163bb5 commit 36f767a
Show file tree
Hide file tree
Showing 20 changed files with 44 additions and 44 deletions.
8 changes: 4 additions & 4 deletions packages/app/schema/archived_gm/__index.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"$ref": "__difference.json"
},
"deceased_rivm_archived_20221231": {
"$ref": "deceased_rivm_archived_20221231.json"
"$ref": "deceased_rivm.json"
},
"last_generated": {
"type": "string"
Expand All @@ -35,13 +35,13 @@
"$ref": "#/$defs/archived_gm_code"
},
"vaccine_coverage_per_age_group_archived_20220622": {
"$ref": "vaccine_coverage_per_age_group_archived_20220622.json"
"$ref": "vaccine_coverage_per_age_group.json"
},
"vaccine_coverage_per_age_group_archived_20220908": {
"$ref": "vaccine_coverage_per_age_group_archived_20220908.json"
"$ref": "vaccine_coverage_per_age_group_with_booster_shot.json"
},
"booster_coverage_archived_20220904": {
"$ref": "booster_coverage_archived_20220904.json"
"$ref": "booster_coverage.json"
},
"sewer_archived_20230623": {
"$ref": "sewer.json"
Expand Down
26 changes: 13 additions & 13 deletions packages/app/schema/archived_nl/__index.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,26 +55,26 @@
"behavior_per_age_group_archived_20230411": {
"$ref": "behavior/behavior_per_age_group.json"
},
"deceased_rivm_archived_20221231": {
"$ref": "deceased_rivm_archived_20221231.json"
},
"booster_shot_administered_archived_20220904": {
"$ref": "booster_shot_administered_archived_20220904.json"
"$ref": "booster_shot_administered.json"
},
"booster_coverage_archived_20220904": {
"$ref": "booster_coverage_archived_20220904.json"
"$ref": "booster_coverage.json"
},
"deceased_rivm_archived_20221231": {
"$ref": "deceased_rivm.json"
},
"deceased_rivm_per_age_group_archived_20221231": {
"$ref": "deceased_rivm_per_age_group_archived_20221231.json"
"$ref": "deceased_rivm_per_age_group.json"
},
"doctor_archived_20210903": {
"$ref": "doctor.json"
},
"disability_care_archived_20230126": {
"$ref": "disability_care_archived_20230126.json"
"$ref": "disability_care.json"
},
"elderly_at_home_archived_20230126": {
"$ref": "elderly_at_home_archived_20230126.json"
"$ref": "elderly_at_home.json"
},
"nursing_home_archived_20230126": {
"$ref": "nursing_home.json"
Expand All @@ -83,19 +83,19 @@
"$ref": "sewer.json"
},
"vaccine_campaigns_archived_20220908": {
"$ref": "vaccine_campaigns_archived_20220908.json"
"$ref": "vaccine_campaigns.json"
},
"vaccine_planned_archived_20220908": {
"$ref": "vaccine_planned_archived_20220908.json"
"$ref": "vaccine_planned.json"
},
"vaccine_coverage_per_age_group_archived_20220622": {
"$ref": "vaccine_coverage_per_age_group_archived_20220622.json"
"$ref": "vaccine_coverage_per_age_group.json"
},
"vaccine_coverage_per_age_group_archived_20220908": {
"$ref": "vaccine_coverage_per_age_group_archived_20220908.json"
"$ref": "vaccine_coverage_per_age_group_with_booster_shot.json"
},
"vaccine_coverage_per_age_group_estimated_archived_20220908": {
"$ref": "vaccine_coverage_per_age_group_estimated_archived_20220908.json"
"$ref": "vaccine_coverage_per_age_group_estimated.json"
},
"vulnerable_nursing_home_archived_20230711": {
"$ref": "vulnerable_nursing_home.json"
Expand Down
12 changes: 6 additions & 6 deletions packages/app/src/pages/gemeente/[code]/vaccinaties.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export const getStaticProps = createGetStaticProps(
);

export const VaccinationsGmPage = (props: StaticProps<typeof getStaticProps>) => {
const { pageText, choropleth, municipalityName, selectedGmData: nonArchivedData, selectedArchivedGmData: archivedData, content, lastGenerated } = props;
const { pageText, choropleth, municipalityName, selectedGmData: currentData, selectedArchivedGmData: archivedData, content, lastGenerated } = props;
const { commonTexts } = useIntl();
const { formatPercentageAsNumber } = useFormatLokalizePercentage();
const [hasHideArchivedCharts, setHideArchivedCharts] = useState<boolean>(false);
Expand All @@ -93,8 +93,8 @@ export const VaccinationsGmPage = (props: StaticProps<typeof getStaticProps>) =>
};

const filteredVaccination = {
primarySeries: nonArchivedData.vaccine_coverage_per_age_group.values.find((item) => item.vaccination_type === 'primary_series'),
autumn2022: nonArchivedData.vaccine_coverage_per_age_group.values.find((item) => item.vaccination_type === 'autumn_2022'),
primarySeries: currentData.vaccine_coverage_per_age_group.values.find((item) => item.vaccination_type === 'primary_series'),
autumn2022: currentData.vaccine_coverage_per_age_group.values.find((item) => item.vaccination_type === 'autumn_2022'),
};

assert(filteredVaccination.primarySeries, `[${VaccinationsGmPage.name}] Could not find data for the vaccine coverage per age group for the primary series`);
Expand All @@ -112,11 +112,11 @@ export const VaccinationsGmPage = (props: StaticProps<typeof getStaticProps>) =>
archivedData.vaccine_coverage_per_age_group_archived_20220908.values.find((x) => x.age_group_range === '12+') ||
emptyCoverageData.vaccine_coverage_per_age_group_archived_20220908.values[1];

const lastInsertionDateOfPage = getLastInsertionDateOfPage(nonArchivedData, pageMetrics);
const lastInsertionDateOfPage = getLastInsertionDateOfPage(currentData, pageMetrics);

return (
<Layout {...metadata} lastGenerated={lastGenerated}>
<GmLayout code={nonArchivedData.code} municipalityName={municipalityName}>
<GmLayout code={currentData.code} municipalityName={municipalityName}>
<TileList>
<PageInformationBlock
category={commonTexts.sidebar.categories.actions_to_take.title}
Expand Down Expand Up @@ -203,7 +203,7 @@ export const VaccinationsGmPage = (props: StaticProps<typeof getStaticProps>) =>
/>
<VaccineCoverageChoropleth
data={choropleth.gm.vaccine_coverage_per_age_group}
dataOptions={{ getLink: reverseRouter.gm.vaccinaties, selectedCode: nonArchivedData.code, isPercentage: true }}
dataOptions={{ getLink: reverseRouter.gm.vaccinaties, selectedCode: currentData.code, isPercentage: true }}
text={{
title: replaceVariablesInText(commonTexts.choropleth.choropleth_vaccination_coverage.gm.title, { municipalityName: municipalityName }),
description: replaceVariablesInText(commonTexts.choropleth.choropleth_vaccination_coverage.gm.description, { municipalityName: municipalityName }),
Expand Down
4 changes: 2 additions & 2 deletions packages/app/src/pages/landelijk/sterfte.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ export const getStaticProps = createGetStaticProps(
);

const DeceasedNationalPage = (props: StaticProps<typeof getStaticProps>) => {
const { pageText, selectedNlData: nonArchivedData, selectedArchivedNlData: archivedData, lastGenerated, content } = props;
const { pageText, selectedNlData: currentData, selectedArchivedNlData: archivedData, lastGenerated, content } = props;

const [deceasedOverTimeTimeframe, setDeceasedOverTimeTimeframe] = useState<TimeframeOption>(TimeframeOption.ALL);
const [isArchivedContentShown, setIsArchivedContentShown] = useState<boolean>(false);

const dataCbs = nonArchivedData.deceased_cbs;
const dataCbs = currentData.deceased_cbs;
const dataRivm = archivedData.deceased_rivm_archived_20221231;
const dataDeceasedPerAgeGroup = archivedData.deceased_rivm_per_age_group_archived_20221231;

Expand Down
38 changes: 19 additions & 19 deletions packages/app/src/pages/landelijk/vaccinaties.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export const getStaticProps = createGetStaticProps(
);

function VaccinationPage(props: StaticProps<typeof getStaticProps>) {
const { content, choropleth, selectedNlData: nonArchivedData, selectedArchivedNlData: archivedData, lastGenerated, administrationData } = props;
const { content, choropleth, selectedNlData: currentData, selectedArchivedNlData: archivedData, lastGenerated, administrationData } = props;
const { commonTexts, formatNumber } = useIntl();
const reverseRouter = useReverseRouter();

Expand All @@ -146,8 +146,8 @@ function VaccinationPage(props: StaticProps<typeof getStaticProps>) {
description: textNl.metadata.description,
};

const vaccineCoverageEstimatedFullyVaccinated = nonArchivedData.vaccine_coverage_per_age_group_estimated_fully_vaccinated.last_value;
const vaccineCoverageEstimatedAutumn2022 = nonArchivedData.vaccine_coverage_per_age_group_estimated_autumn_2022.last_value;
const vaccineCoverageEstimatedFullyVaccinated = currentData.vaccine_coverage_per_age_group_estimated_fully_vaccinated.last_value;
const vaccineCoverageEstimatedAutumn2022 = currentData.vaccine_coverage_per_age_group_estimated_autumn_2022.last_value;

const vaccineCoverageEstimatedArchivedLastValue = archivedData.vaccine_coverage_per_age_group_estimated_archived_20220908.last_value;

Expand All @@ -159,11 +159,11 @@ function VaccinationPage(props: StaticProps<typeof getStaticProps>) {
assert(boosterCoverage18PlusArchivedValue, `[${VaccinationPage.name}] Missing value for booster_coverage 18+`);
assert(boosterCoverage12PlusArchivedValue, `[${VaccinationPage.name}] Missing value for booster_coverage 12+`);

const repeatingShotAdministeredLastValue = nonArchivedData.repeating_shot_administered?.last_value;
const repeatingShotAdministeredLastValue = currentData.repeating_shot_administered?.last_value;

const hasActiveWarningTile = textNl.belangrijk_bericht && !isEmpty(textNl.belangrijk_bericht);

const lastInsertionDateOfPage = getLastInsertionDateOfPage(nonArchivedData, pageMetrics);
const lastInsertionDateOfPage = getLastInsertionDateOfPage(currentData, pageMetrics);

const variables = {
regio: commonTexts.choropleth.choropleth_vaccination_coverage.nl,
Expand All @@ -181,7 +181,7 @@ function VaccinationPage(props: StaticProps<typeof getStaticProps>) {
description={textNl.information_block.description}
metadata={{
datumsText: textNl.dates,
dateOrRange: nonArchivedData.vaccine_administered_total.last_value.date_unix,
dateOrRange: currentData.vaccine_administered_total.last_value.date_unix,
dateOfInsertionUnix: lastInsertionDateOfPage,
dataSources: [textShared.bronnen.rivm],
}}
Expand Down Expand Up @@ -258,23 +258,23 @@ function VaccinationPage(props: StaticProps<typeof getStaticProps>) {
description={textNl.vaccine_campaigns.description}
descriptionFooter={textNl.vaccine_campaigns.description_footer}
headers={textNl.vaccine_campaigns.headers}
campaigns={nonArchivedData.vaccine_campaigns.vaccine_campaigns}
campaigns={currentData.vaccine_campaigns.vaccine_campaigns}
campaignDescriptions={textNl.vaccine_campaigns.campaigns}
metadata={{
datumsText: textNl.dates,
date: nonArchivedData.vaccine_campaigns.date_unix,
date: currentData.vaccine_campaigns.date_unix,
source: textNl.vaccine_campaigns.bronnen.rivm,
}}
/>

<VaccinationsPerSupplierOverLastTimeframeTile
title={textNl.vaccinations_per_supplier_over_last_timeframe.title}
description={textNl.vaccinations_per_supplier_over_last_timeframe.description}
data={nonArchivedData.vaccine_administered_last_timeframe.vaccine_types}
data={currentData.vaccine_administered_last_timeframe.vaccine_types}
metadata={{
source: textShared.bronnen.rivm,
date: [nonArchivedData.vaccine_administered_last_timeframe.date_start_unix, nonArchivedData.vaccine_administered_last_timeframe.date_end_unix],
obtainedAt: nonArchivedData.vaccine_administered_last_timeframe.date_of_insertion_unix,
date: [currentData.vaccine_administered_last_timeframe.date_start_unix, currentData.vaccine_administered_last_timeframe.date_end_unix],
obtainedAt: currentData.vaccine_administered_last_timeframe.date_of_insertion_unix,
}}
/>

Expand All @@ -295,10 +295,10 @@ function VaccinationPage(props: StaticProps<typeof getStaticProps>) {
sortingOrder={['80+', '70-79', '60-69', '50-59', '40-49', '30-39', '18-29', '12-17', '5-11']}
metadata={{
datumsText: textNl.dates,
date: nonArchivedData.vaccine_coverage_per_age_group.values[0].date_unix,
date: currentData.vaccine_coverage_per_age_group.values[0].date_unix,
source: textNl.vaccination_coverage.bronnen.rivm,
}}
values={nonArchivedData.vaccine_coverage_per_age_group.values}
values={currentData.vaccine_coverage_per_age_group.values}
/>

{content.faqs && content.faqs.questions?.length > 0 && <PageFaqTile questions={content.faqs.questions} title={content.faqs.sectionTitle} />}
Expand Down Expand Up @@ -389,9 +389,9 @@ function VaccinationPage(props: StaticProps<typeof getStaticProps>) {

<VaccinationsOverTimeTile
text={textNl}
coverageData={nonArchivedData.vaccine_coverage}
coverageData={currentData.vaccine_coverage}
administrationData={administrationData}
vaccineAdministeredPlannedLastValue={nonArchivedData.vaccine_administered_planned.last_value}
vaccineAdministeredPlannedLastValue={currentData.vaccine_administered_planned.last_value}
timelineEvents={{
coverage: getTimelineEvents(content.elements.timeSeries, 'vaccine_coverage'),
deliveryAndAdministration: getTimelineEvents(content.elements.timeSeries, 'vaccine_administered'),
Expand Down Expand Up @@ -448,24 +448,24 @@ function VaccinationPage(props: StaticProps<typeof getStaticProps>) {
values={archivedData.vaccine_coverage_per_age_group_archived_20220622.values}
/>

<VaccineDeliveryBarChart data={nonArchivedData.vaccine_delivery_per_supplier} text={textNl} />
<VaccineDeliveryBarChart data={currentData.vaccine_delivery_per_supplier} text={textNl} />

<VaccineStockPerSupplierChart values={nonArchivedData.vaccine_stock.values} text={textNl} />
<VaccineStockPerSupplierChart values={currentData.vaccine_stock.values} text={textNl} />

<ChartTile
title={textNl.grafiek_draagvlak.titel}
description={textNl.grafiek_draagvlak.omschrijving}
metadata={{
datumsText: textNl.grafiek_draagvlak.metadata_tekst,
date: [nonArchivedData.vaccine_vaccinated_or_support.last_value.date_start_unix, nonArchivedData.vaccine_vaccinated_or_support.last_value.date_end_unix],
date: [currentData.vaccine_vaccinated_or_support.last_value.date_start_unix, currentData.vaccine_vaccinated_or_support.last_value.date_end_unix],
}}
>
<TimeSeriesChart
accessibility={{
key: 'vaccines_support_over_time_chart',
}}
tooltipTitle={textNl.grafiek_draagvlak.titel}
values={nonArchivedData.vaccine_vaccinated_or_support.values}
values={currentData.vaccine_vaccinated_or_support.values}
numGridLines={20}
tickValues={[0, 25, 50, 75, 100]}
dataOptions={{
Expand Down

0 comments on commit 36f767a

Please sign in to comment.