Skip to content

Commit

Permalink
working
Browse files Browse the repository at this point in the history
  • Loading branch information
BabaVasss committed Apr 30, 2024
1 parent dbf3c92 commit e641a34
Show file tree
Hide file tree
Showing 4 changed files with 324 additions and 7 deletions.
3 changes: 2 additions & 1 deletion 4_2_mapbox/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro">
</head>
<body>
<h3>Section 4 | Tutorial 2 | Mapbox</h3>
<h3>What to expect at MoMa</h3>
<h4> Introduction | Abstract | Purpose</h4>
<div id='map' style='width: 100%; height: 800px;'></div>
<script src='https://api.mapbox.com/mapbox-gl-js/v2.14.1/mapbox-gl.js'></script>
<link href='https://api.mapbox.com/mapbox-gl-js/v2.14.1/mapbox-gl.css' rel='stylesheet' />
Expand Down
10 changes: 7 additions & 3 deletions 4_2_mapbox/main.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
//constants and globals for all graphs
const width = window.innerWidth * 0.9,
height = window.innerHeight * 0.7;
let svg;

//Map Building
mapboxgl.accessToken = 'pk.eyJ1IjoiYWtlZW1zaGVwaGVyZCIsImEiOiJjbHZianY3am4wOXZpMmpsNDR0enNwbWtyIn0.W-Bc7R2RIh11qf5f0EbA8A';

const usMap = new mapboxgl.Map({
container: 'map',
center: [-73.98066323065026, 40.76101009762772],//[-122.420679, 37.772537], // starting position [lng, lat]
center: [-73.98066323065026, 40.76101009762772], // starting position [lng, lat] -> New York
zoom: 14, // starting zoom
style: 'mapbox://styles/akeemshepherd/clvbm7eh8016p01ph9vfr931o',
})

const MoMaPopUp = new mapboxgl.Popup().setText("Museum of Modern Art [MoMa]")
//Popup - MoMa
const MoMaPopUp = new mapboxgl.Popup().setText("Museum of Modern Art [MoMa]") //append MoMa popup

const MoMa = new mapboxgl.Marker()
.setLngLat([-73.98066323065026, 40.76101009762772])
.setPopup(MoMaPopUp)
.addTo(usMap)

//end of map building






6 changes: 3 additions & 3 deletions data/MoMA_distributions.csv
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Triad,Eszter Haraszty,7336,"(American, born Hungary. 1920–1994)",(American),19
Triad,Eszter Haraszty,7336,"(American, born Hungary. 1920–1994)",(American),1920,1994,74,(Female),c. 1951,151.7653,111.7602
Triad,Eszter Haraszty,7336,"(American, born Hungary. 1920–1994)",(American),1920,1994,74,(Female),c. 1951,155,113.0302
Stone on Stone,Vera (Vera Neumann),7364,"(American, 1909–1993)",(American),1909,1993,84,(Female),c. 1950,174,109.2202
Trapeze,"Gretl Wollner, Leo Wollner","7365, 37596","(Austrian, 1920–2006) (Austrian, 1925–1995)",(Austrian) (Austrian),0,0,0,(Female) (),c. 1955,180.3,114.3002
Trapeze,"Gretl Wollner, Leo Wollner","7365, 37596","(Austrian, 1920–2006) (Austrian, 1925–1995)",(Austrian) (Austrian),0,0,0,(Female),c. 1955,180.3,114.3002
Banda,Angelo Testa,7357,"(American, 1921–1984)",(American),1921,1984,63,(Male),c. 1949,146,113
Banda,Angelo Testa,7357,"(American, 1921–1984)",(American),1921,1984,63,(Male),c. 1949,132.0803,116.8402
Tracy Sheer Fabric,Eszter Haraszty,7336,"(American, born Hungary. 1920–1994)",(American),1920,1994,74,(Female),1952,139.7,110.5
Expand Down Expand Up @@ -92,7 +92,7 @@ Crinkled Sheer Fabric,Junichi Arai,7044,"(Japanese, 1932–2017)",(Japanese),193
Crinkled Metallic Fabric,Junichi Arai,7044,"(Japanese, 1932–2017)",(Japanese),1932,2017,85,(Male),c. 1995,431.8009,86.3
Clothes Brush,Unidentified Designer,6011,(Nationality unknown),(Nationality unknown),0,0,0,(),c. 1900,12.7,3.5
Letter Opener,Marcello Nizzoli,4316,"(Italian, 1887–1969)",(Italian),1887,1969,82,(Male),1960,21.9075,4.445
Tablecloth,"Josef Hoffmann, Berthold Löffler","2694, 3585","(Austrian, 1870–1956) (Austrian, 1874–1960)",(Austrian) (Austrian),0,0,0,(Male) (Male),1905,133.4,135.8903
Tablecloth,"Josef Hoffmann, Berthold Löffler","2694, 3585","(Austrian, 1870–1956) (Austrian, 1874–1960)",(Austrian) (Austrian),0,0,0,(Male),1905,133.4,135.8903
Scarf,Eiji Miyamoto,7507,"(Japanese, born 1948)",(Japanese),1948,0,0,(Male),1991,195.5804,85.0902
Spatula,"Karlsson & Nilsson, Sweden",9693,,(Swedish),0,0,0,(),c. 1946,28.6,5.1
Adjustable Garden Rake,Vernon P. Steele,5617,(American),(American),0,0,0,(Male),1945,127,24.765
Expand Down Expand Up @@ -309,4 +309,4 @@ Chinese Coins,Noémi Raymond,36881,"(American, born France. 1889–1980)",(Ameri
Circles,Noémi Raymond,36881,"(American, born France. 1889–1980)",(American),1889,1980,91,(Female),c.1939-40,194.3104,111.1252
"Combination of Strips, Reeds",Noémi Raymond,36881,"(American, born France. 1889–1980)",(American),1889,1980,91,(Female),c.1940,172.7,116.8
Circles,Noémi Raymond,36881,"(American, born France. 1889–1980)",(American),1889,1980,91,(Female),c.1941,205.7404,119.4
Woven Upholstery Fabric,Ulla af Ugglas,6003,"(Swedish, born 1916)",(Swedish),1916,0,0,(Female),c. 1936-41,92.7,33
Woven Upholstery Fabric,Ulla af Ugglas,6003,"(Swedish, born 1916)",(Swedish),1916,0,0,(Female),c. 1936-41,92.7,33
Loading

0 comments on commit e641a34

Please sign in to comment.