def test_Community_from_gdfs(): t90 = datasets.tracts_1990() t90 = t90[t90.geoid.str.startswith("11")] t00 = datasets.tracts_2000() t00 = t00[t00.geoid.str.startswith("11")] assert Community.from_geodataframes([t90, t00]).gdf.shape == (380, 192)
def test_Community_from_gdfs_crs(): t90 = datasets.tracts_1990() t00 = datasets.tracts_2000() t90 = t90.to_crs(4236) t00 = t00.to_crs(3857) try: Community.from_geodataframes([t90, t00]) except AssertionError: print("From_gdfs constructor successfully detects inconsistent crs.") pass
def test_tracts00(): df = datasets.tracts_2000(convert=False) assert df.shape == (65677, 192)
def test_tracts00(): df = datasets.tracts_2000(states=["11"]) assert df.shape == (188, 192)
def test_tracts(): assert datasets.tracts_1990(convert=False).shape[0] == 60658 assert datasets.tracts_2000(convert=False).shape == (65677, 192) assert datasets.tracts_2010(convert=False).shape == (72832, 194)