Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 13 07:00
    adnanhemani review_requested #409
  • Aug 13 07:00
    adnanhemani opened #409
  • Aug 13 06:58

    adnanhemani on change_to_area

    made change bumped version (compare)

  • Aug 13 06:42
    adnanhemani edited #407
  • Aug 13 06:41
    adnanhemani labeled #406
  • Aug 13 06:41
    adnanhemani labeled #406
  • Aug 13 06:40
    adnanhemani opened #408
  • Aug 13 06:40
    adnanhemani review_requested #408
  • Aug 13 06:39

    adnanhemani on map_table_flexibility

    bump version number (compare)

  • Aug 13 06:37

    adnanhemani on map_table_flexibility

    feature completed (compare)

  • Aug 08 06:38
    papajohn commented #407
  • Aug 08 06:00
    adnanhemani commented #407
  • Aug 07 16:32
    papajohn commented #407
  • Aug 07 06:52

    adnanhemani on maps_examples

    almost completed section 2, blo… (compare)

  • Aug 07 06:33
    adnanhemani opened #407
  • Aug 07 06:31
    adnanhemani opened #406
  • Aug 07 05:47

    adnanhemani on maps_examples

    initial commit on examples (compare)

  • Jul 23 17:40

    adnanhemani on gh-pages

    Generated by commit f154b0d3157… (compare)

  • Jul 23 17:34

    davidwagner on shaded_histograms

    (compare)

  • Jul 23 17:34

    davidwagner on master

    implemented shading for non-ove… Split apart tests of shaded his… remove print statement debugging and 5 more (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