Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update place page summaries #4875

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

juliawu
Copy link
Contributor

@juliawu juliawu commented Jan 22, 2025

(1) Updates the data values used in place page summaries to more recent data.
(2) Cleans up the summary generation code, adding a new utility function.

@juliawu juliawu requested review from dwnoble and gmechali January 22, 2025 20:33
},
"country/ARG": {
"summary": "Argentina is a country in South America. The population in Argentina was 45,808,747 in 2021. The nominal GDP per capita in Argentina was $10,636.12 in 2021. The Gini index in Argentina was 42 in 2021. The life expectancy in Argentina was 75.39 in 2021. The energy consumption per capita in Argentina was 2,029.92kg in 2014. The carbon dioxide emissions per capita in Argentina was 3.41t in 2020."
"summary": "Argentina is a country in South America. The population in Argentina was 46,654,581 in 2023. The nominal GDP per capita in Argentina was $13,730.51 in 2023. The Gini index in Argentina was 40.7 in 2022. The life expectancy in Argentina was 76.06 in 2022. The energy consumption per capita in Argentina was 2,029.92kg in 2014. The carbon dioxide emissions per capita in Argentina was 3.41t in 2020."
Copy link
Contributor

@dwnoble dwnoble Jan 22, 2025

Choose a reason for hiding this comment

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

Running a spot check here- looks like the population values im seeing in the table (45,538,401) don't line up with the value here (46,654,581)

(link: https://autopush.datacommons.org/place/country/ARG?force_dev_places=true)

3kWPtWRoYSXjpfv

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like there was a data update between this run and when you got the screenshots. Rerunning the script has updated the numbers to match. I spot checked a couple places after the re-run, and the population numbers appear to match now:

image

dwnoble added a commit that referenced this pull request Jan 25, 2025
- Updated key demographics variable names to match figma mocks
- Added localization support to display values, units, and dates
- Moved overview table data fetch path from the client side to the
server side (new endpoint: `/api/dev-place/overview-table/<place-dcid>`
for a performance boost.
- @juliawu - this also changes the data fetching strategy a bit. Can you
take a look and see if my comment from
#4875 still applies?

Before:

![overview_before](https://github.com/user-attachments/assets/ec97f4c6-ffc9-4c37-b97d-16c035e1a12b)


After: 

![overview_after](https://github.com/user-attachments/assets/f36fe87b-2a1e-41c1-9662-2dba1495f55b)
rohitkumarbhagat pushed a commit to rohitkumarbhagat/website that referenced this pull request Jan 27, 2025
…acommonsorg#4884)

- Updated key demographics variable names to match figma mocks
- Added localization support to display values, units, and dates
- Moved overview table data fetch path from the client side to the
server side (new endpoint: `/api/dev-place/overview-table/<place-dcid>`
for a performance boost.
- @juliawu - this also changes the data fetching strategy a bit. Can you
take a look and see if my comment from
datacommonsorg#4875 still applies?

Before:

![overview_before](https://github.com/user-attachments/assets/ec97f4c6-ffc9-4c37-b97d-16c035e1a12b)


After: 

![overview_after](https://github.com/user-attachments/assets/f36fe87b-2a1e-41c1-9662-2dba1495f55b)
@juliawu juliawu requested a review from dwnoble February 7, 2025 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants