News for hackers. Stuff that matters.
Re:Maps Distort How We See the World by zimpenfish on Thursday June 22, 2023 @04:02PM (#36437992)
> The result is 0.82, which indicates a strong positive correlation.

datamash gave me 0.52 for Pearson. Which is "eh, maybe".

Re:Maps Distort How We See the World by erwald on Friday June 30, 2023 @02:17PM (#36539680)
That's weird, are you looking only at the top 10 countries?

I've reproduced dwaltrib's results using World Bank data on 251 countries, and I get a Pearson's r of 0.82 and a p value of 5.6e-61 (!). I.e. a strong correlation, with high confidence. It makes sense too -- larger countries generally have more people, and more people generally generate more economic activity.

Code if you want to try yourself:

import pandas as pd

gdp = pd.read_csv("~/Downloads/API_NY.GDP.MKTP.CD_DS2_en_csv_v2_5551501.csv").set_index("Country Name")

land_area = pd.read_csv("~/Downloads/API_AG.LND.TOTL.K2_DS2_en_csv_v2_5552158.csv").set_index("Country Name")

gdp["GDP"] = gdp["2020"]

gdp["Land"] = land_area["2020"]

gdp = gdp.dropna(subset=["GDP", "Land"])

from scipy import stats

print(stats.pearsonr(gdp.Land, gdp.GDP))

#+RESULTS: : PearsonRResult(statistic=0.8151313879150333, pvalue=5.621180589722219e-61)

Re:Maps Distort How We See the World by dwaltrip on Monday July 10, 2023 @01:41PM (#36669969)
Thanks for double checking. I ran out of steam on the convo heh.