Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graphing app.. #28

Open
MB6 opened this issue Dec 1, 2014 · 9 comments
Open

Graphing app.. #28

MB6 opened this issue Dec 1, 2014 · 9 comments

Comments

@MB6
Copy link
Contributor

MB6 commented Dec 1, 2014

I've made a commonscontrol api graphing app, you can find it at mb6/commonsgraph. Please check it out.

@wrongu
Copy link
Contributor

wrongu commented Dec 1, 2014

Very cool! Takes forever to install all of the dependencies, but graphtk.py ran fine once I got everything. (frz.py and commonsgraph.py both break when run from the command line, FYI)

I have to ask, though - what's the plan for using this app? Seems very similar to what the website's analyze page already does.

@MB6
Copy link
Contributor Author

MB6 commented Dec 1, 2014

Try to run the webapp for over one month of data...

-Max B.

@MB6
Copy link
Contributor Author

MB6 commented Dec 1, 2014

frz is broken because it is me trying to distribute on windows without installing anything... bbfreeze is unmaintained and doesn't work.

@MB6
Copy link
Contributor Author

MB6 commented Dec 1, 2014

I could not use ciso8601, but it is the fastest iso 8601 timestamp parser.. i need to make a requirements.txt to speed that up (you just do pip install -r requirements.txt)

@wrongu
Copy link
Contributor

wrongu commented Dec 1, 2014

Good point. The long-term solution should be to fix the site.

In terms of downloading big CSV files, using generators to stream rows back would be ideal. The reason that hasn't been done yet is because the split_on_indexes function is a batch operation. The first step would be to streamline that function (for example, we could have it generate the indexes quickly based on only the most recent data points analogous to how we made /data/api/systems faster)

In terms of plotting tons of points with highcharts, this appears relevant.

I'll be working on these things over winter break (when school lets up)

@wrongu
Copy link
Contributor

wrongu commented Dec 1, 2014

if you use virtualenv, requirements are easy. pip freeze > requirements.txt

@wrongu
Copy link
Contributor

wrongu commented Dec 1, 2014

requirements:

altgraph==0.9
bbfreeze==1.1.3
bbfreeze-loader==1.1.0
ciso8601==1.0.1
matplotlib==1.4.2
mock==1.0.1
nose==1.3.4
numpy==1.9.1
pyparsing==2.0.3
python-dateutil==2.2
pytz==2014.10
requests==2.4.3
six==1.8.0
wsgiref==0.1.2

@MB6
Copy link
Contributor Author

MB6 commented Dec 1, 2014

BTW, try using that app and make a request for something with indexes for 10 or so months, all that waiting time is the server. I checked.

@wrongu
Copy link
Contributor

wrongu commented Dec 1, 2014

Right... Big queries are definitely a bottleneck. Same problem with too much batch processing. There are 2 cards on the ol' Trello that would address this: caching queries and streaming them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants