In [1]:
%matplotlib inline
import metapack as mp

In [23]:
doc = mp.jupyter.open_package()
doc


Out[23]:

San Diego Point In Time County 2010

rtfhsd.org-pitc-2010-1 Last Update: 2018-09-13T16:43:56

Point data for locations of homeless for the 2010 PiTC count in San Diego county.

Contacts

Resources

  • pitc Datafile. Point in time count geo data for 2010

In [24]:
pitc = doc.resource('pitc').geoframe()

In [4]:
pitc.plot()


Out[4]:
<matplotlib.axes._subplots.AxesSubplot at 0x103354e80>

In [5]:
pitc.head()


Out[5]:
id tract observe municiplty locaccurac geometry
0 0 14000US607319405000000000 Handbuilt Structure Vista NaN POINT (-117.2783206487761 33.1931401603591)
1 1 14000US607319405000000000 Handbuilt Structure Vista NaN POINT (-117.2755271030352 33.19106585259205)
2 2 14000US607319405000000000 Handbuilt Structure Vista NaN POINT (-117.2729841130781 33.19476218891354)
3 3 14000US607319406000000000 Handbuilt Structure Vista NaN POINT (-117.2613263882209 33.19486242999563)
4 4 14000US607319406000000000 Handbuilt Structure Vista NaN POINT (-117.260782966759 33.19454916397248)

In [25]:
pitc = doc.resource('pitc')\
    .geoframe()\
    .groupby(['tract','observe'])\
    .geometry.count().to_frame()\
    .unstack(-1)\
    .fillna(0)

pitc.columns = ['handbuilt','individual','vehicle']
pitc['total'] = pitc.sum(axis=1)

pitc


Out[25]:
handbuilt individual vehicle total
tract
14000US60730000000000 0.0 1.0 0.0 1.0
14000US6073100000000000 0.0 6.0 3.0 9.0
14000US60731000000000000 0.0 0.0 3.0 3.0
14000US607310001000000000 0.0 3.0 2.0 5.0
14000US607310003000000000 0.0 0.0 1.0 1.0
14000US607310005000000000 0.0 1.0 14.0 15.0
14000US607310009000000000 0.0 0.0 1.0 1.0
14000US607310010000000000 0.0 2.0 4.0 6.0
14000US607310011000000000 0.0 4.0 2.0 6.0
14000US607310013000000000 4.0 8.0 3.0 15.0
14000US607310014000000000 0.0 1.0 0.0 1.0
14000US607310015000000000 0.0 18.0 3.0 21.0
14000US607310103000000000 8.0 9.0 1.0 18.0
14000US607310104000000000 0.0 0.0 1.0 1.0
14000US607310106000000000 0.0 0.0 5.0 5.0
14000US607310107000000000 0.0 0.0 2.0 2.0
14000US607310109000000000 0.0 0.0 2.0 2.0
14000US607310110000000000 0.0 0.0 3.0 3.0
14000US607310112000000000 0.0 0.0 1.0 1.0
14000US607310200000000000 0.0 6.0 0.0 6.0
14000US607310300000000000 0.0 4.0 2.0 6.0
14000US607310401000000000 0.0 2.0 0.0 2.0
14000US607310402000000000 0.0 0.0 1.0 1.0
14000US607310502000000000 0.0 5.0 1.0 6.0
14000US607310601000000000 5.0 0.0 0.0 5.0
14000US60731100000000000 0.0 0.0 2.0 2.0
14000US607311000000000000 0.0 0.0 5.0 5.0
14000US607311200000000000 0.0 1.0 0.0 1.0
14000US607311400000000000 0.0 5.0 0.0 5.0
14000US607311500000000000 1.0 1.0 10.0 12.0
... ... ... ... ...
14000US60738505000000000 1.0 2.0 3.0 6.0
14000US60738506000000000 0.0 0.0 2.0 2.0
14000US60738507000000000 0.0 3.0 0.0 3.0
14000US60738509000000000 0.0 1.0 0.0 1.0
14000US60738510000000000 0.0 2.0 2.0 4.0
14000US60738511000000000 0.0 10.0 21.0 31.0
14000US60738600000000000 0.0 2.0 1.0 3.0
14000US60738701000000000 0.0 4.0 2.0 6.0
14000US60738800000000000 0.0 2.0 0.0 2.0
14000US60738901000000000 1.0 0.0 1.0 2.0
14000US60738902000000000 1.0 3.0 0.0 4.0
14000US6073900000000000 0.0 3.0 0.0 3.0
14000US60739000000000000 0.0 0.0 1.0 1.0
14000US60739101000000000 0.0 3.0 0.0 3.0
14000US60739102000000000 0.0 1.0 3.0 4.0
14000US60739103000000000 0.0 0.0 6.0 6.0
14000US60739104000000000 4.0 0.0 0.0 4.0
14000US60739106000000000 0.0 1.0 16.0 17.0
14000US60739107000000000 0.0 8.0 0.0 8.0
14000US60739301000000000 0.0 0.0 5.0 5.0
14000US60739303000000000 0.0 0.0 2.0 2.0
14000US60739304000000000 0.0 0.0 1.0 1.0
14000US60739502000000000 2.0 2.0 0.0 4.0
14000US60739507000000000 0.0 1.0 0.0 1.0
14000US60739508000000000 0.0 1.0 0.0 1.0
14000US60739509000000000 0.0 0.0 1.0 1.0
14000US60739603000000000 1.0 0.0 0.0 1.0
14000US60739801000000000 0.0 0.0 1.0 1.0
14000US60739804000000000 0.0 0.0 2.0 2.0
14000US60739805000000000 0.0 0.0 1.0 1.0

334 rows × 4 columns


In [ ]: