a graph visualization for "album of the day" selections
Construct a graph by running build_graph.py, then visualize it by running
draw_graph.py.

The goal is to create a meaningful graph of albums (identified by YouTube URL), so that algorithms "near" each other on the graph should be "similar."
Initially, every selected album is a vertex on the graph. How will we connect similar albums in meaningful ways?
The idea is to scrape the YouTube URL's to get related URL's for each album, and add a new vertex for each related album, with a corresponding new edge from the album it was related to. Thus, edges in the graph signify that two albums are similar enough that YouTube lists one as a related video from the other. These "explored" albums are the small vertices in the image above.
By recursing deeper into the tree of related videos, we hope to eventually flesh out the graph.
The final graph is rendered with a force-directed layout that should place albums which are more closely connected (shorter path of related videos) or more strongly connected (larger number of mutual related videos) closer together.
Ideally, we want to explore regions of YouTube video space which represent albums, not arbitary links such as cat videos. Therefore, we restrict our exploration to videos which contain the substring "album" in their title.
Install Docker
C:\Windows\System32\drivers\etc\hosts
and add the machine name to a loopback IP (e.g., ::1 MY-COMPUTER-NAME)Pull the image from the Docker Cloud
$ docker pull thomasgilgenast/aotd-graph
Configure the Remote Interpreter
thomasgilgenast/aotd-graph:latest from the "Image name"
dropdownpython3Test the installation
test.py and choose "Run 'test'"test.png should appear in the project directory
You can always run scripts directly within a Docker container by mapping the
host directory where you cloned this repo to /aotd-graph on the container.
For example:
$ docker run -it -v <host directory>:/aotd-graph thomasgilgenast/aotd-graph python3 build_graph.py
$ docker run -it -v <host directory>:/aotd-graph thomasgilgenast/aotd-graph python3 draw_graph.py
This should happen automatically for pushes to master, version tags, and for
PR's opened against this repo, but for posterity here is the "long way" to do
it.
Edit the Dockerfile
Re-build the container
$ docker build -t aotd-graph .
Tag the container with a new version number
$ docker tag aotd-graph <docker username>/aotd-graph:<version>
Push the new version to Docker cloud
$ docker push <docker username>/aotd-graph:<version>
Content type
Image
Digest
Size
308.3 MB
Last updated
over 9 years ago
docker pull thomasgilgenast/aotd-graph