{"id":171,"date":"2022-12-04T13:40:53","date_gmt":"2022-12-04T18:40:53","guid":{"rendered":"http:\/\/jazzgraphs.com\/wordpress\/?p=171"},"modified":"2024-02-05T16:35:55","modified_gmt":"2024-02-05T16:35:55","slug":"music-venues-mapped","status":"publish","type":"post","link":"https:\/\/jazzgraphs.com\/wp2\/2022\/12\/04\/music-venues-mapped\/","title":{"rendered":"Music Venues Mapped"},"content":{"rendered":"\r\n<div class=\"boldgrid-section\">\r\n<div class=\"container\">\r\n<div class=\"row\">\r\n<div class=\"col-lg-12 col-md-12 col-xs-12 col-sm-12\">\r\n<p class=\"\">The last two weeks have been quite involved with updating my local database with data from the amazing <a href=\"https:\/\/musicbrainz.org\/\" target=\"_blank\" rel=\"noreferrer noopener\" data-type=\"URL\" data-id=\"https:\/\/musicbrainz.org\/\">MusicBrainz<\/a> site. If you&#8217;re not familiar with MusicBrainz, it is a bit of a wiki for musical data, including artists, releases, places, and so much more. It&#8217;s a truly impressive data source, and it is, of course, very large from a data perspective.<\/p>\r\n<p class=\"\">While this site is skewed toward jazz, it would be a shame not to dabble in some other genres; after all, I have spent my share of time listening to classical, rock, Americana, and a few more styles of music. I&#8217;ll begin with a simple mapping of all the places (not just jazz venues) in MusicBrainz with lat\/lng coordinates, using my old friend <a href=\"https:\/\/carto.com\/\" target=\"_blank\" rel=\"noreferrer noopener\" data-type=\"URL\" data-id=\"https:\/\/carto.com\/\">Carto<\/a> to do the display work.<\/p>\r\n<p>Let&#8217;s start by viewing a set of the raw data from the <strong>place<\/strong> table using <a href=\"https:\/\/dbeaver.io\/\" target=\"_blank\" rel=\"noreferrer noopener\" data-type=\"URL\" data-id=\"https:\/\/dbeaver.io\/\">DBeaver<\/a>:<\/p>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-full\">\r\n<p class=\"mod-reset\"><img decoding=\"async\" class=\"wp-image-173\" src=\"http:\/\/jazzgraphs.com\/wordpress\/wp-content\/uploads\/2022\/12\/places_grid_20221204.png\" alt=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-424\" src=\"https:\/\/jazzgraphs.com\/wp2\/wp-content\/uploads\/2024\/02\/places_grid_20221204.png\" alt=\"\" width=\"782\" height=\"325\" srcset=\"https:\/\/jazzgraphs.com\/wp2\/wp-content\/uploads\/2024\/02\/places_grid_20221204.png 782w, https:\/\/jazzgraphs.com\/wp2\/wp-content\/uploads\/2024\/02\/places_grid_20221204-300x125.png 300w, https:\/\/jazzgraphs.com\/wp2\/wp-content\/uploads\/2024\/02\/places_grid_20221204-768x319.png 768w\" sizes=\"auto, (max-width: 782px) 100vw, 782px\" \/><\/p>\r\n<figcaption class=\"wp-element-caption\">Data sample of MusicBrainz places<\/figcaption>\r\n<\/figure>\r\n\r\n\r\n\r\n<div class=\"boldgrid-section\">\r\n<div class=\"container\">\r\n<div class=\"row\">\r\n<div class=\"col-lg-12 col-md-12 col-xs-12 col-sm-12\">\r\n<p>Here you get an idea of useful information we can pull from the place table; name, address, coordinates, and type, plus new fields created in the query for latitude and longitude. Carto (plus Mapbox and other mapping platforms) requires latitude and longitude attributes in order to map the data. Here&#8217;s the simple code used to extract this information:<\/p>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-full\">\r\n<p class=\"mod-reset\"><img decoding=\"async\" class=\"wp-image-174\" src=\"http:\/\/jazzgraphs.com\/wordpress\/wp-content\/uploads\/2022\/12\/places_code_20221204.png\" alt=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-492 size-full\" src=\"https:\/\/jazzgraphs.com\/wp2\/wp-content\/uploads\/2022\/12\/places_code_20221204.png\" alt=\"\" width=\"782\" height=\"106\" srcset=\"https:\/\/jazzgraphs.com\/wp2\/wp-content\/uploads\/2022\/12\/places_code_20221204.png 782w, https:\/\/jazzgraphs.com\/wp2\/wp-content\/uploads\/2022\/12\/places_code_20221204-300x41.png 300w, https:\/\/jazzgraphs.com\/wp2\/wp-content\/uploads\/2022\/12\/places_code_20221204-768x104.png 768w\" sizes=\"auto, (max-width: 782px) 100vw, 782px\" \/><\/p>\r\n<figcaption class=\"wp-element-caption\">Code to create lat\/lng attributes<\/figcaption>\r\n<\/figure>\r\n\r\n\r\n\r\n<div class=\"boldgrid-section\">\r\n<div class=\"container\">\r\n<div class=\"row\">\r\n<div class=\"col-lg-12 col-md-12 col-xs-12 col-sm-12\">\r\n<p>After creating a .csv export file, the data is uploaded to Carto, where we can begin mapping the information in a variety of ways. Since the places dataset is quite large (21k records with coordinates), a cluster map might prove useful. Carto allows for setting some options, including bubble and text sizes to optimize the display. Cluster maps aggregate the information at high levels, and then allow us to scroll in on the information at a more localized level. Here is the Carto menu:<\/p>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-full\">\r\n<p class=\"mod-reset\"><img decoding=\"async\" class=\"wp-image-178\" src=\"http:\/\/jazzgraphs.com\/wordpress\/wp-content\/uploads\/2022\/12\/cluster_20221204-1.png\" alt=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-478\" src=\"https:\/\/jazzgraphs.com\/wp2\/wp-content\/uploads\/2024\/02\/cluster_20221204-1.png\" alt=\"\" width=\"373\" height=\"518\" srcset=\"https:\/\/jazzgraphs.com\/wp2\/wp-content\/uploads\/2024\/02\/cluster_20221204-1.png 373w, https:\/\/jazzgraphs.com\/wp2\/wp-content\/uploads\/2024\/02\/cluster_20221204-1-216x300.png 216w\" sizes=\"auto, (max-width: 373px) 100vw, 373px\" \/><\/p>\r\n<figcaption class=\"wp-element-caption\">Setting cluster options in Carto<\/figcaption>\r\n<\/figure>\r\n\r\n\r\n\r\n<div class=\"boldgrid-section\">\r\n<div class=\"container\">\r\n<div class=\"row\">\r\n<div class=\"col-lg-12 col-md-12 col-xs-12 col-sm-12\">\r\n<p>Here&#8217;s a very high level display using the cluster option:<\/p>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-full\">\r\n<p class=\"mod-reset\"><img decoding=\"async\" class=\"wp-image-176\" src=\"http:\/\/jazzgraphs.com\/wordpress\/wp-content\/uploads\/2022\/12\/cluster_1_20221204.png\" alt=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-471\" src=\"https:\/\/jazzgraphs.com\/wp2\/wp-content\/uploads\/2024\/02\/cluster_1_20221204.png\" alt=\"\" width=\"900\" height=\"440\" srcset=\"https:\/\/jazzgraphs.com\/wp2\/wp-content\/uploads\/2024\/02\/cluster_1_20221204.png 966w, https:\/\/jazzgraphs.com\/wp2\/wp-content\/uploads\/2024\/02\/cluster_1_20221204-300x147.png 300w, https:\/\/jazzgraphs.com\/wp2\/wp-content\/uploads\/2024\/02\/cluster_1_20221204-768x375.png 768w\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" \/><\/p>\r\n<figcaption class=\"wp-element-caption\">Top level of the place cluster map<\/figcaption>\r\n<\/figure>\r\n\r\n\r\n\r\n<div class=\"boldgrid-section\">\r\n<div class=\"container\">\r\n<div class=\"row\">\r\n<div class=\"col-lg-12 col-md-12 col-xs-12 col-sm-12\">\r\n<p>As we scroll in, the bubbles will change into smaller aggregations:<\/p>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-large\">\r\n<p class=\"mod-reset\"><img decoding=\"async\" class=\"wp-image-177\" src=\"http:\/\/jazzgraphs.com\/wordpress\/wp-content\/uploads\/2022\/12\/cluster_2_20221204-1024x472.png\" alt=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-465\" src=\"https:\/\/jazzgraphs.com\/wp2\/wp-content\/uploads\/2024\/02\/cluster_2_20221204-1024x472.png\" alt=\"\" width=\"900\" height=\"415\" srcset=\"https:\/\/jazzgraphs.com\/wp2\/wp-content\/uploads\/2024\/02\/cluster_2_20221204-1024x472.png 1024w, https:\/\/jazzgraphs.com\/wp2\/wp-content\/uploads\/2024\/02\/cluster_2_20221204-300x138.png 300w, https:\/\/jazzgraphs.com\/wp2\/wp-content\/uploads\/2024\/02\/cluster_2_20221204-768x354.png 768w, https:\/\/jazzgraphs.com\/wp2\/wp-content\/uploads\/2024\/02\/cluster_2_20221204.png 1038w\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" \/><\/p>\r\n<figcaption class=\"wp-element-caption\">Scrolling in on the place cluster map<\/figcaption>\r\n<\/figure>\r\n\r\n\r\n\r\n<div class=\"boldgrid-section\">\r\n<div class=\"container\">\r\n<div class=\"row\">\r\n<div class=\"col-lg-12 col-md-12 col-xs-12 col-sm-12\">\r\n<p>At the deepest level of scrolling, every place in the data file will display as a single point at it&#8217;s respective lat\/lng coordinates:<\/p>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-full\">\r\n<p class=\"mod-reset\"><img decoding=\"async\" class=\"wp-image-179\" src=\"http:\/\/jazzgraphs.com\/wordpress\/wp-content\/uploads\/2022\/12\/cluster_3_20221204.png\" alt=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-466\" src=\"https:\/\/jazzgraphs.com\/wp2\/wp-content\/uploads\/2024\/02\/cluster_3_20221204.png\" alt=\"\" width=\"880\" height=\"472\" srcset=\"https:\/\/jazzgraphs.com\/wp2\/wp-content\/uploads\/2024\/02\/cluster_3_20221204.png 880w, https:\/\/jazzgraphs.com\/wp2\/wp-content\/uploads\/2024\/02\/cluster_3_20221204-300x161.png 300w, https:\/\/jazzgraphs.com\/wp2\/wp-content\/uploads\/2024\/02\/cluster_3_20221204-768x412.png 768w\" sizes=\"auto, (max-width: 880px) 100vw, 880px\" \/><\/p>\r\n<figcaption class=\"wp-element-caption\">Lowest level of the place cluster map<\/figcaption>\r\n<\/figure>\r\n\r\n\r\n\r\n<div class=\"boldgrid-section\">\r\n<div class=\"container\">\r\n<div class=\"row\">\r\n<div class=\"col-lg-12 col-md-12 col-xs-12 col-sm-12\">\r\n<p>This is fun to see how the data is aggregated and ultimately dispersed at lower and lower levels, but it comes with some limitations, including the inability to see any identifying details at the individual place level. To see this information, we&#8217;ll need a different Carto visualization.<\/p>\r\n<p class=\"\">Let&#8217;s investigate the category option, which allows for the addition of labels and the coloring of attributes by a specific category. We select the <strong>category <\/strong>wizard, and choose the <strong>type<\/strong> column to be used for coloring markers on the map.<\/p>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n\r\n\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-full\">\r\n<p class=\"mod-reset\"><img decoding=\"async\" class=\"wp-image-180\" src=\"http:\/\/jazzgraphs.com\/wordpress\/wp-content\/uploads\/2022\/12\/category_20221204.png\" alt=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-480\" src=\"https:\/\/jazzgraphs.com\/wp2\/wp-content\/uploads\/2024\/02\/category_20221204.png\" alt=\"\" width=\"365\" height=\"503\" srcset=\"https:\/\/jazzgraphs.com\/wp2\/wp-content\/uploads\/2024\/02\/category_20221204.png 365w, https:\/\/jazzgraphs.com\/wp2\/wp-content\/uploads\/2024\/02\/category_20221204-218x300.png 218w\" sizes=\"auto, (max-width: 365px) 100vw, 365px\" \/><\/p>\r\n<figcaption class=\"wp-element-caption\">Setting Carto category map options<\/figcaption>\r\n<\/figure>\r\n\r\n\r\n\r\n<div class=\"boldgrid-section\">\r\n<div class=\"container\">\r\n<div class=\"row\">\r\n<div class=\"col-lg-12 col-md-12 col-xs-12 col-sm-12\">\r\n<p class=\"\">Here&#8217;s what we see at a very high level &#8211; lots of individual markers (and colors) that are not consolidated as they were with the cluster approach.<\/p>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-full\">\r\n<p class=\"mod-reset\"><img decoding=\"async\" class=\"wp-image-181\" src=\"http:\/\/jazzgraphs.com\/wordpress\/wp-content\/uploads\/2022\/12\/category_2_20221204.png\" alt=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-468\" src=\"https:\/\/jazzgraphs.com\/wp2\/wp-content\/uploads\/2024\/02\/category_2_20221204.png\" alt=\"\" width=\"939\" height=\"468\" srcset=\"https:\/\/jazzgraphs.com\/wp2\/wp-content\/uploads\/2024\/02\/category_2_20221204.png 939w, https:\/\/jazzgraphs.com\/wp2\/wp-content\/uploads\/2024\/02\/category_2_20221204-300x150.png 300w, https:\/\/jazzgraphs.com\/wp2\/wp-content\/uploads\/2024\/02\/category_2_20221204-768x383.png 768w\" sizes=\"auto, (max-width: 939px) 100vw, 939px\" \/><\/p>\r\n<figcaption class=\"wp-element-caption\">High level view of the place category map with type colors<\/figcaption>\r\n<\/figure>\r\n\r\n\r\n\r\n<div class=\"boldgrid-section\">\r\n<div class=\"container\">\r\n<div class=\"row\">\r\n<div class=\"col-lg-12 col-md-12 col-xs-12 col-sm-12\">\r\n<p>The positive trade-off comes when we select any individual marker, where we have set up the info window to display the name, type, and address:<\/p>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-full\">\r\n<p class=\"mod-reset\"><img decoding=\"async\" class=\"wp-image-182\" src=\"http:\/\/jazzgraphs.com\/wordpress\/wp-content\/uploads\/2022\/12\/category_3_20221204.png\" alt=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-472\" src=\"https:\/\/jazzgraphs.com\/wp2\/wp-content\/uploads\/2024\/02\/category_3_20221204.png\" alt=\"\" width=\"898\" height=\"465\" srcset=\"https:\/\/jazzgraphs.com\/wp2\/wp-content\/uploads\/2024\/02\/category_3_20221204.png 898w, https:\/\/jazzgraphs.com\/wp2\/wp-content\/uploads\/2024\/02\/category_3_20221204-300x155.png 300w, https:\/\/jazzgraphs.com\/wp2\/wp-content\/uploads\/2024\/02\/category_3_20221204-768x398.png 768w\" sizes=\"auto, (max-width: 898px) 100vw, 898px\" \/><\/p>\r\n<figcaption class=\"wp-element-caption\">An individual place with detailed information<\/figcaption>\r\n<\/figure>\r\n\r\n\r\n\r\n<div class=\"boldgrid-section\">\r\n<div class=\"container\">\r\n<div class=\"row\">\r\n<div class=\"col-lg-12 col-md-12 col-xs-12 col-sm-12\">\r\n<p>This was a simple overview for how we can visualize the place data; in future posts I look forward to exploring some more interesting uses of this rich geographic data. Thanks for reading!<\/p>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n","protected":false},"excerpt":{"rendered":"<p>The last two weeks have been quite involved with updating my local database with data from the amazing MusicBrainz site. If you&#8217;re not familiar with MusicBrainz, it is a bit of a wiki for musical data, including artists, releases, places, and so much more. It&#8217;s a truly impressive data source, and it is, of course, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,28],"tags":[31,32,30,26],"class_list":["post-171","post","type-post","status-publish","format-standard","hentry","category-jazz","category-mapping","tag-carto","tag-dbeaver","tag-maps","tag-musicbrainz"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/jazzgraphs.com\/wp2\/wp-json\/wp\/v2\/posts\/171","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jazzgraphs.com\/wp2\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jazzgraphs.com\/wp2\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jazzgraphs.com\/wp2\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jazzgraphs.com\/wp2\/wp-json\/wp\/v2\/comments?post=171"}],"version-history":[{"count":8,"href":"https:\/\/jazzgraphs.com\/wp2\/wp-json\/wp\/v2\/posts\/171\/revisions"}],"predecessor-version":[{"id":494,"href":"https:\/\/jazzgraphs.com\/wp2\/wp-json\/wp\/v2\/posts\/171\/revisions\/494"}],"wp:attachment":[{"href":"https:\/\/jazzgraphs.com\/wp2\/wp-json\/wp\/v2\/media?parent=171"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jazzgraphs.com\/wp2\/wp-json\/wp\/v2\/categories?post=171"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jazzgraphs.com\/wp2\/wp-json\/wp\/v2\/tags?post=171"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}