Graphs and tables for your Spotify account.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
792 B

  1. <!DOCTYPE html>
  2. {% load static %}
  3. <html lang="en">
  4. <head>
  5. <meta charset="UTF-8">
  6. <title>Artist Graphs</title>
  7. </head>
  8. <body>
  9. <p>Logged in as {{ user_id }}</p>
  10. <script src="https://d3js.org/d3.v5.js"></script>
  11. <script src="{% static "spotifyvis/scripts/artist_graph.js" %}"></script>
  12. <script>
  13. d3.json("{% url "get_artist_data" user_secret %}").then(function(data) {
  14. for (let index = 0; index < data.length; index++) {
  15. console.log(data[index].name);
  16. console.log(data[index].num_songs);
  17. }
  18. // this is the data format needed for bubble charts
  19. data = {
  20. "children": data
  21. };
  22. drawArtistGraph(data, "body");
  23. });
  24. </script>
  25. </body>
  26. </html>