Esempio n. 1
0
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)
Esempio n. 2
0
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
Esempio n. 3
0
def test_tracts90():
    df = datasets.tracts_1990()
    assert df.shape == (60658, 164)
Esempio n. 4
0
def test_tracts90():
    df = datasets.tracts_1990(states=["11"])
    assert df.shape == (192, 164)
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)