bbest / ucsb-network-data-science-2016

UCSB IGERT Network Data Science Boot Camp (2016) materials
http://bbest.github.io/ucsb-network-data-science-2016
2 stars 12 forks source link

ucsb-network-data-science-2016

UCSB IGERT Network Data Science Boot Camp (2016) materials

This is initially just my portion of the boot camp for setup and 2 hours of initial instruction.

Setup

Optional in brackets:

Git, Github

Python

Have notes, but do interactively

PANDAS

Tabular data (esp CSV)

d = {} rdr = csv.reader(open('filename.csv', 'r')) d.keys = rdr.next() for row in rdr: k, v = row d[d.keys()] = v

-[pandas](http://pandas.pydata.org/pandas-docs/stable/) is well suited for "Tabular data with heterogeneously-typed columns, as in an SQL table or Excel spreadsheet"
- [Package overview — pandas 0.18.1 documentation](http://pandas.pydata.org/pandas-docs/stable/overview.html)
- [10 Minutes to pandas — pandas 0.18.1 documentation](http://pandas.pydata.org/pandas-docs/stable/10min.html)
- read csv (vs dic representation)
  ```python
  dic = pd.Series.from_csv(filename, names=cols, header=None).to_dict()

Projects

Both projects rely on creation of simpler networks from a dense raster for various applications: