ryanmklee / elisa_fanclub_part2 Goto Github PK
View Code? Open in Web Editor NEWCPSC 410 Software Visualization Project
CPSC 410 Software Visualization Project
So currently, we get profiler data we run it through the main block. Would it be possible to do it through command line instead?
When this scales up, ensure that we have an output folder with the graphs so we don't clutter our main directory.
When we start doing code profiling for multiple input size, we want to modify our barchart to construct multiple bars showing the differences in runtime per value of input size.
Possibly another way for us to visualize our profiled data.
Yet again: this does not influence your grade. It's something that I do in both 310 and 410 so we can discuss code design and learn things outside of the scope of what is being evaluated. That being said, let's roll:
Naming conventions:
Why have a prefix viz_ for things which are inside the viz module? It adds redundancy and the usage of the underscore is discouraged.
viz_factory.py
My biggest issue if the lack of a init method. and how the render works. The variable chart_type
could be easily moved to an init (I'm not sure about the others) but it seems that the most important variable here is just iteration_data
Try to use more private methods. It will facilitate easy of readiness
if track:
self.__get_data_from ....
else:
self.__get_data_from ....
Another example:
for fn in new_fns:
for i in range(idx):
backfill_value = self.get_line(all_lines[i], fn)
iter_lines[i].append(backfill_value)
could be:
__append_backfill_values(new_fns, idx)
viz_utils.py
Avoid magic numbers. what 3, 1 and the others numbers represent?
builder module: Awesome usage of abstractions/inheritance!
I hope some of these comments make sense. Feel free to ignore any comments that don't.
Awesome project and good luck with your finals!
In this code block, we are only using one preset colour for the bar graph. We should generate a gradient or something to indicate the colour.
for i in range(0, len(x_data[0])): for xd, yd in zip(x_data, y_data): traces.append(go.Bar( x=[xd[i]], y=[yd], orientation='h', marker=dict( # TODO: create colour intensity, not just taking the first color based on x values color=colors[0], line=dict( color='rgb(248, 248, 249)', width=1) ) ))
In the profiler's code, we need to extract the function name not all the other details so our graph doesn't have a large overflow.
For example, using the profiler the function name is
{method 'query' of 'sklearn.neighbors.kd_tree.BinaryTree' objects}
we want instead to be able to clean this data
to return
'sklearn.neighbors.kd_tree.BinaryTree'
Bar chart data filtering is done inside it's class, we should probably move it outside of the class to abstract it for other graphs and extract different data, then pass in the relevant data to each graph we will have. We will need to move the function _filter_data
out from the BarGraph class and into the main function or somewhere else.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.