Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 01:11
    davidwagner opened #414
  • Sep 17 22:21

    adnanhemani on gh-pages

    Generated by commit 23b4f5f6482… (compare)

  • Sep 17 22:04

    adnanhemani on gh-pages

    Generated by commit 23b4f5f6482… (compare)

  • Sep 17 21:13

    davidwagner on fix_version_15_2

    (compare)

  • Sep 17 21:13

    davidwagner on master

    fixed bug from previous version CHANGELOG Delete top_movies.csv Accident… and 2 more (compare)

  • Sep 17 21:13
    davidwagner closed #413
  • Sep 17 20:37

    adnanhemani on gh-pages

    Generated by commit ec024b264ff… (compare)

  • Sep 17 20:32

    davidwagner on travis_doesnt_like_libgfortran

    (compare)

  • Sep 17 20:32

    davidwagner on master

    Try removing libgfortran depend… Merge pull request #412 from da… (compare)

  • Sep 17 20:32
    davidwagner closed #412
  • Sep 16 17:04
    SamLau95 commented #412
  • Sep 16 06:23
    adnanhemani commented #412
  • Sep 16 06:16

    adnanhemani on fix_version_15_2

    Delete hist_workout_2.ipynb Ac… (compare)

  • Sep 16 06:16
    adnanhemani synchronize #413
  • Sep 16 06:15

    adnanhemani on fix_version_15_2

    Delete top_movies.csv Accident… (compare)

  • Sep 16 06:15
    adnanhemani synchronize #413
  • Sep 16 06:09
    adnanhemani review_requested #413
  • Sep 16 06:09
    adnanhemani review_requested #413
  • Sep 16 06:09
    adnanhemani opened #413
  • Sep 16 06:07

    adnanhemani on fix_version_15_2

    CHANGELOG (compare)

Sam Lau
@SamLau95
hello world! this is the chat room for the datascience library
feel free to ping me or the other devs here
i hope this room serves as a useful alternative to email for simpler tasks for this library
Stefan van der Walt
@stefanv
Hey, everyone!
Sam Lau
@SamLau95
in the ideal case, this room will lower the overhead of asking questions for the connector faculty
Carl Boettiger
@cboettig
Hey Sam, thanks for setting this up (and for your earlier answers).
Sam Lau
@SamLau95
my pleasure! hope this is helpful
ping me anytime and i’ll do my best to respond
Carl Boettiger
@cboettig
Hi folks -- where does that tabledemos repo that David Culler mentioned on the mailing list live? I'm not seeing it in github.com/dsten
Carl Boettiger
@cboettig
Aha, looks like it's https://github.com/deculler/TableDemos I believe.
Carl Boettiger
@cboettig
Hmm, don't seem to be able to paste into the jupyter terminal. Looks like that was a known issue jupyter/notebook#104 but since resolved?
Sam Lau
@SamLau95
@cboettig looks like david has a bunch of IPython notebooks in his repo
to open those notebooks, you can go to https://ds8.berkeley.edu/hub/home and upload them
Carl Boettiger
@cboettig
@SamLau95 thanks; I've just been using git through the Jupyter terminal to get things over. nice, but the lack of copy-paste makes that a bit of a nuisance though
Sam Lau
@SamLau95

@cboettig i don’t think i’m familiar with the Jupyter terminal. to clarify, you have the .ipynb files on your local machine and want to run the notebooks, right?

if you’re okay with running the notebooks on ds8, the method i described is the easiest way to do so.

if you want to run them on your own computer, you’ll have to run ipython notebook in your terminal to start a jupyter server locally to view them

Carl Boettiger
@cboettig
@SamLau95 From the Jupyter homepage there's an option to open a new Python 3 notebook, and under it an option to open a terminal which runs in the browser. It's really convenient since I can then move my notebooks between my local machine, github, the hosted ds8.berkeley.edu site; seems to be pretty much a fully functional bash terminal except for the lack of copy-paste which is a bit of a nuisance.
Sam Lau
@SamLau95

@cboettig ah i see, this is running on your local machine (eg. localhost)? it looks like if you open a terminal window and run

git clone https://github.com/deculler/TableDemos

you can switch back to the ‘Files’ tab and open the notebooks locally

Carl Boettiger
@cboettig
nope, terminal is running on ds8.berkeley.edu instance (though also works locally)
Sam Lau
@SamLau95
ah, gotcha. that command should work both on ds8 and locally
Carl Boettiger
@cboettig
@SamLau95 Any recommendation for a style guide for python? In particular, looking for clarification on when to use the notation x.method() vs the notation method(x)
Stefan van der Walt
@stefanv
Is this specifically wrt numpy?
Carl Boettiger
@cboettig
anything really, it's all pretty new to me. does style differ wrt different modules?
Stefan van der Walt
@stefanv
I think numpy has both class and normal methods available due to history, but in most other packages you have only one or the other.
Most of the time, we try to use Python's rich containers in combination with functions. Only when there's a lot of state being dragged around the system do we start looking at objects even.
Carl Boettiger
@cboettig
that seems like a good starting point. so just to be clear, you call method(object) function notation, and object.method to be object notation?
it seems that plotting starts off with method notation in the textbook, but switch later into object notation?
Sam Lau
@SamLau95

@cboettig do you have an example? we use stuff like

foo_table.hist()

quite a bit, but when we needed plotting functionality that the table didn’t provide we switched to using matplotlib directly instead (the plots variable). for example, in http://data8.org/text/4_prediction.html#correlation we make a scatter plot using

plots.scatter(ht_pw['mat_ht'], ht_pw['mat_pw'], s=5, color='gold')
plots.xlabel('height (inches)')
plots.ylabel('pregnancy weight (pounds)’)

this is because the table class didn’t provide the functionality we wanted in order to make these plots; we typically try to use the Table class as much as possible

tap2k
@tap2k
Do I need to do anything special to show a Marker once Ive called the function?
for maps
tap2k
@tap2k
basically the functionality Im looking for is to add circles one by one and then show the resulting map. possible?
tap2k
@tap2k
also - is there a way to change the datatype of a column? I need the lat, long values to be treated as floats for Circle.map to work
Sam Lau
@SamLau95

@tap2k i believe they’ll show up automatically — checkout david wagner’s lecture on privacy: http://data8.org/text/slides/lec10.pdf

i think what you want has been done before

if you have a table called foo_table and a column called x with integers, you can change the type to floats with Table.apply like:

foo_table.apply(float, 'x')
tap2k
@tap2k
thanks! helpful
tap2k
@tap2k
when I use the Circle.map or Marker.map functions how do I set the map center and zoom?
Sam Lau
@SamLau95
not super sure myself — @papajohn @alvinwan , do you know how?
tap2k
@tap2k
figured that out
one issue I had is that Circle or Marker.map is not the last expression in the cell the map doesnt show. this makes it hard to wrap in a function unless someone has a workaround
Carl Boettiger
@cboettig
Curious if any connectors are touching on sql databases. Just need some very simple imports from postgres, doesn't look like psycopg2 is available.
Guess I could just export the data to csv for them, but torn between wanting to give a light exposure to databases vs just streamlining things
Stefan van der Walt
@stefanv
@cboettig Is postgres the system you have to use? Because Python has built in sqlite, if you can port the DB to that.
Carl Boettiger
@cboettig
yeah, in this particular case data is already in postgres, though pedagogically maybe sqlite makes more sense then
tap2k
@tap2k
ok got it - chalk it up to the stupid question dept
henryem
@henryem
@cboettig Tables support a lot of SQL-like things (join, group by, where) that they learn about in the first month or so of the base class. Could be easier to introduce database operations that way, without a new language. (Sorry if you're already aware of that!)