Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 36 additions & 4 deletions static/js/i18n/i18n_tool_messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,42 @@ 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: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed that this chart shows a per capita option which I don't think makes sense -- https://screenshot.googleplex.com/AjXTGCvVRkQ2Rvs

Is this something that could be addressed as a followup?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll look into it as a follow-up! There's no built-in logic for when a per capita option is shown right now, and I think figuring out what heuristics we want to use to determine when to allow per-capita needs more discussion as a team.

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",
},
carbonDioxideEmissionsInWorldCountries: {
id: "carbon_dioxide_emissions_in_world_countries",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

another example where having the per capita option doesn't make sense: https://screenshot.googleplex.com/Bt5VKvv9mpSz7Ug

Do we always show that option for this tool? Or is it dynamic based on the statvar?

Also, what are "installations"?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We had a URL param that triggered us plotting the locations of power plants on the map. I don't think it works anymore though..

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, in that case, what do you guys think of just removing this example to remove confusion? @beets @miss-o-soup

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can remove the example, along with the straggler code for it:
https://github.com/search?q=repo%3Adatacommonsorg/website%20MAP_POINTS_PLACE_TYPE&type=code

(i'd rename the dict key to RESERVED or PREVIOUSLY_USED so we don't re-use that param)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, done.

defaultMessage: "Carbon dioxide emissions in world countries",
description:
"Title of a map plotting the statistical variable 'carbon dioxide emissions' in countries of the world",
},
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",
},
});
39 changes: 36 additions & 3 deletions static/js/tools/shared/vis_tools/landing_page_example_links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,32 @@ 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",
},
{
id: "map_carbon_dioxide_emissions_in_world_countries",
title: intl.formatMessage(
VisToolExampleChartMessages.carbonDioxideEmissionsInWorldCountries
),
url: "/tools/map#%26sv%3DAmount_Emissions_CarbonDioxide_PerCapita%26pc%3D0%26denom%3DCount_Person%26pd%3DEarth%26ept%3DCountry%26ppt%3DEpaReportingFacility",
},
],
scatterLinks: [
{
Expand Down Expand Up @@ -91,11 +117,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",
},
],
};
Loading