diff --git a/static/js/i18n/i18n_tool_messages.ts b/static/js/i18n/i18n_tool_messages.ts index e70c61a535..b2731cd082 100644 --- a/static/js/i18n/i18n_tool_messages.ts +++ b/static/js/i18n/i18n_tool_messages.ts @@ -249,10 +249,36 @@ export const VisToolExampleChartMessages = defineMessages({ description: "Title of a line chart plotting the statistical variable 'income' in a set of towns known for having a university", }, - berkeleyAndPiedmontPoverty: { - id: "berkeley_and_piedmont_poverty", - defaultMessage: "Berkeley & Piedmont poverty", + closeButDifferentBerkeleyAndPiedmont: { + id: "close_but_different_berkeley_and_piedmont", + defaultMessage: + "Close but different: Quality of life indicators in Berkeley & Piedmont", + description: + "Title of a timeline showing the differences between Berkeley, USA and Piedmont, USA", + }, + projectedTemperatureRiseInUsa: { + id: "projected_temperature_rise_in_the_usa", + defaultMessage: "Projected temperature rise in the USA", + description: + "Title of a map plotting the statistical variable 'projected temperature rise' in counties of the USA", + }, + medianAgeInUsa: { + id: "median_age_in_the_usa", + defaultMessage: "Median age in the USA", + description: + "Title of a map plotting the statistical variable 'median age' in counties of the USA", + }, + noSchoolingCompletedInUsa: { + id: "no_schooling_completed_in_the_usa", + defaultMessage: "Population with no schooling completed in the USA", + description: + "Title of a map plotting the statistical variable 'no schooling completed' in counties of the USA", + }, + closeButDifferentPaloAltoAndEastPaloAlto: { + id: "close_but_different_palo_alto_and_east_palo_alto", + defaultMessage: + "Close but different: Quality of life indicators in Palo Alto & East Palo Alto", description: - "Title of a line chart plotting the statistical variable 'poverty' for both Berkeley, USA and Piedmont, USA", + "Title of a timeline showing the differences between Palo Alto and East Palo Alto", }, }); diff --git a/static/js/tools/map/util.ts b/static/js/tools/map/util.ts index 5b7211675e..4040851c97 100644 --- a/static/js/tools/map/util.ts +++ b/static/js/tools/map/util.ts @@ -103,7 +103,7 @@ const URL_PARAM_DOMAIN_SEPARATOR = ":"; export const URL_PARAM_KEYS = { SELECTED_PLACE_DCID: "pd", ENCLOSED_PLACE_TYPE: "ept", - MAP_POINTS_PLACE_TYPE: "ppt", + DEPRECATED_MAP_POINTS_PLACE_TYPE: "ppt", // This param key is deprecated, but we keep it to prevent reusing it for something else. PER_CAPITA: "pc", STAT_VAR_DCID: "sv", DATE: "dt", @@ -297,7 +297,6 @@ export function applyHashStatVar(params: URLSearchParams): StatVar { export function applyHashPlaceInfo(params: URLSearchParams): PlaceInfo { const selectedPlaceDcid = params.get(URL_PARAM_KEYS.SELECTED_PLACE_DCID); const enclosedPlaceType = params.get(URL_PARAM_KEYS.ENCLOSED_PLACE_TYPE); - const mapPointPlaceType = params.get(URL_PARAM_KEYS.MAP_POINTS_PLACE_TYPE); return { selectedPlace: { dcid: selectedPlaceDcid ? selectedPlaceDcid : "", @@ -310,7 +309,7 @@ export function applyHashPlaceInfo(params: URLSearchParams): PlaceInfo { }, enclosedPlaceType: enclosedPlaceType ? enclosedPlaceType : "", parentPlaces: null, - mapPointPlaceType: mapPointPlaceType ? mapPointPlaceType : "", + mapPointPlaceType: "", }; } @@ -390,9 +389,6 @@ export function updateHashPlaceInfo( if (!_.isEmpty(placeInfo.enclosedPlaceType)) { params = `${params}&${URL_PARAM_KEYS.ENCLOSED_PLACE_TYPE}=${placeInfo.enclosedPlaceType}`; } - if (!_.isEmpty(placeInfo.mapPointPlaceType)) { - params = `${params}&${URL_PARAM_KEYS.MAP_POINTS_PLACE_TYPE}=${placeInfo.mapPointPlaceType}`; - } return hash + params; } diff --git a/static/js/tools/shared/vis_tools/landing_page_example_links.ts b/static/js/tools/shared/vis_tools/landing_page_example_links.ts index 652cbb7710..ccfd866c1d 100644 --- a/static/js/tools/shared/vis_tools/landing_page_example_links.ts +++ b/static/js/tools/shared/vis_tools/landing_page_example_links.ts @@ -58,6 +58,25 @@ export const landingPageLinks: LandingPageLinkConfig = { ), url: "/tools/map#%26sv%3DCount_Person_EducationalAttainmentBachelorsDegreeOrHigher%26pc%3D1%26denom%3DCount_Person%26pd%3DgeoId%2F08%26ept%3DCounty", }, + { + id: "map_projected_temperature_rise_in_the_usa", + title: intl.formatMessage( + VisToolExampleChartMessages.projectedTemperatureRiseInUsa + ), + url: "/tools/map#%26sv%3DDifferenceRelativeToBaseDate2006_Max_Temperature_RCP45%26pc%3D0%26denom%3DCount_Person%26pd%3Dcountry%2FUSA%26ept%3DCounty", + }, + { + id: "map_median_age_in_usa", + title: intl.formatMessage(VisToolExampleChartMessages.medianAgeInUsa), + url: "/tools/map#%26sv%3DMedian_Age_Person%26pc%3D0%26denom%3DCount_Person%26pd%3Dcountry%2FUSA%26ept%3DCounty", + }, + { + id: "map_no_schooling_completed_in_usa", + title: intl.formatMessage( + VisToolExampleChartMessages.noSchoolingCompletedInUsa + ), + url: "/tools/map#%26sv%3DCount_Person_EducationalAttainmentNoSchoolingCompleted%26pc%3D0%26denom%3DCount_Person%26pd%3Dcountry%2FUSA%26ept%3DCounty", + }, ], scatterLinks: [ { @@ -91,11 +110,18 @@ export const landingPageLinks: LandingPageLinkConfig = { url: "/tools/timeline#&place=geoId/0606000,geoId/2511000,geoId/2603000,geoId/1777005,geoId/1225175,geoId/4815976&statsVar=Median_Income_Person", }, { - id: "timeline_berkeley_and_piedmont_poverty", + id: "timeline_close_but_different_berkeley_and_piedmont", + title: intl.formatMessage( + VisToolExampleChartMessages.closeButDifferentBerkeleyAndPiedmont + ), + url: "/tools/timeline#place=geoId%2F0606000%2CgeoId%2F0656938&statsVar=Median_Income_Person__Percent_Person_18OrMoreYears_WithPoorGeneralHealth__Monthly_Median_GrossRent_HousingUnit__Count_CriminalActivities_CombinedCrime&chart=%7B%22count-none%22%3A%7B%22pc%22%3Afalse%2C%22delta%22%3Afalse%7D%2C%22age-none%22%3A%7B%22pc%22%3Afalse%2C%22delta%22%3Afalse%7D%2C%22grossRent-none%22%3A%7B%22pc%22%3Afalse%2C%22delta%22%3Afalse%7D%2C%22unemploymentRate-none%22%3A%7B%22pc%22%3Afalse%2C%22delta%22%3Afalse%7D%7D", + }, + { + id: "timeline_close_but_different_palo_alto_and_east_palo_alto", title: intl.formatMessage( - VisToolExampleChartMessages.berkeleyAndPiedmontPoverty + VisToolExampleChartMessages.closeButDifferentPaloAltoAndEastPaloAlto ), - url: '/tools/timeline#place=geoId%2F0606000%2CgeoId%2F0656938&statsVar=Count_Person_BelowPovertyLevelInThePast12Months&chart=%7B"count"%3A%7B"pc"%3Atrue%2C"denom"%3A"Count_Person"%7D%7D', + url: "/tools/timeline#place=geoId%2F0655282%2CgeoId%2F0620956&statsVar=Median_Income_Person__UnemploymentRate_Person__Count_Person_HispanicOrLatino__Count_Person_AsianAlone__Count_Person_BlackOrAfricanAmericanAlone__Count_Person_WhiteAlone__Percent_Person_18OrMoreYears_WithPoorGeneralHealth__Monthly_Median_GrossRent_HousingUnit&chart=%7B%22count-none%22%3A%7B%22pc%22%3Afalse%2C%22delta%22%3Afalse%7D%2C%22age-none%22%3A%7B%22pc%22%3Afalse%2C%22delta%22%3Afalse%7D%2C%22grossRent-none%22%3A%7B%22pc%22%3Afalse%2C%22delta%22%3Afalse%7D%7D", }, ], };