├── landing_page ├── fonts │ └── Mouly.ttf ├── images │ ├── carousel │ │ ├── 1.png │ │ ├── 2.png │ │ ├── 3.png │ │ ├── 4.png │ │ ├── 5.png │ │ └── 6.png │ ├── SuiGeneris_logo.png │ ├── aequa-tech_logo.jpg │ ├── loghi_app_store.png │ ├── logo_DIARY_365.png │ └── arquivo_dos_diarios_logo.png ├── slick │ ├── ajax-loader.gif │ ├── fonts │ │ ├── slick.eot │ │ ├── slick.ttf │ │ ├── slick.woff │ │ └── slick.svg │ ├── config.rb │ ├── slick.less │ ├── slick.scss │ ├── slick.css │ ├── slick-theme.css │ ├── slick-theme.less │ ├── slick-theme.scss │ └── slick.min.js ├── css │ ├── timeline.css │ ├── map.css │ ├── index.css │ ├── cards.css │ ├── index2.css │ └── leaflet.css ├── index.js └── index.html ├── DIARY 365 business model ├── 5_summary.jpg ├── 4_differentiation.jpg ├── 3_market-our-proposal.jpg ├── 1_business-model-canvas.jpg └── 2_business-model-detailed.jpg ├── explore_map_demo ├── images │ ├── marker-icon.png │ ├── marker-shadow.png │ ├── icons8-libri-50.png │ ├── icons8-libro-50.png │ └── prima_pagina │ │ ├── 1PP.png │ │ ├── 2PP.png │ │ ├── 3PP.png │ │ ├── 4PP.png │ │ ├── 5PP.png │ │ ├── 6PP.png │ │ ├── 7PP.png │ │ └── 8PP.png ├── prepare_data.py ├── css │ ├── timeline.css │ ├── index.css │ ├── index2.css │ ├── map.css │ ├── cards.css │ └── leaflet.css ├── index2.html ├── js │ ├── map2.js │ ├── cards.js │ ├── plot3.js │ ├── plot.js │ ├── plot2.js │ └── markercluster.js ├── data │ └── sp500.csv └── index.html ├── mock-up pictures DIARY 365 App ├── 4_upload.png ├── 3_Insights.png ├── 6_translation.png ├── 1_write your diary.png ├── 5_tags and emotion.png └── 2_read other diaries.png ├── README.md └── License CC BY 4.0 (Attribution 4.0 International).txt /landing_page/fonts/Mouly.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AequaTech/DIARY365_4NGISearch/HEAD/landing_page/fonts/Mouly.ttf -------------------------------------------------------------------------------- /landing_page/images/carousel/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AequaTech/DIARY365_4NGISearch/HEAD/landing_page/images/carousel/1.png -------------------------------------------------------------------------------- /landing_page/images/carousel/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AequaTech/DIARY365_4NGISearch/HEAD/landing_page/images/carousel/2.png -------------------------------------------------------------------------------- /landing_page/images/carousel/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AequaTech/DIARY365_4NGISearch/HEAD/landing_page/images/carousel/3.png -------------------------------------------------------------------------------- /landing_page/images/carousel/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AequaTech/DIARY365_4NGISearch/HEAD/landing_page/images/carousel/4.png -------------------------------------------------------------------------------- /landing_page/images/carousel/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AequaTech/DIARY365_4NGISearch/HEAD/landing_page/images/carousel/5.png -------------------------------------------------------------------------------- /landing_page/images/carousel/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AequaTech/DIARY365_4NGISearch/HEAD/landing_page/images/carousel/6.png -------------------------------------------------------------------------------- /landing_page/slick/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AequaTech/DIARY365_4NGISearch/HEAD/landing_page/slick/ajax-loader.gif -------------------------------------------------------------------------------- /landing_page/slick/fonts/slick.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AequaTech/DIARY365_4NGISearch/HEAD/landing_page/slick/fonts/slick.eot -------------------------------------------------------------------------------- /landing_page/slick/fonts/slick.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AequaTech/DIARY365_4NGISearch/HEAD/landing_page/slick/fonts/slick.ttf -------------------------------------------------------------------------------- /landing_page/slick/fonts/slick.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AequaTech/DIARY365_4NGISearch/HEAD/landing_page/slick/fonts/slick.woff -------------------------------------------------------------------------------- /DIARY 365 business model/5_summary.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AequaTech/DIARY365_4NGISearch/HEAD/DIARY 365 business model/5_summary.jpg -------------------------------------------------------------------------------- /explore_map_demo/images/marker-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AequaTech/DIARY365_4NGISearch/HEAD/explore_map_demo/images/marker-icon.png -------------------------------------------------------------------------------- /landing_page/images/SuiGeneris_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AequaTech/DIARY365_4NGISearch/HEAD/landing_page/images/SuiGeneris_logo.png -------------------------------------------------------------------------------- /landing_page/images/aequa-tech_logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AequaTech/DIARY365_4NGISearch/HEAD/landing_page/images/aequa-tech_logo.jpg -------------------------------------------------------------------------------- /landing_page/images/loghi_app_store.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AequaTech/DIARY365_4NGISearch/HEAD/landing_page/images/loghi_app_store.png -------------------------------------------------------------------------------- /landing_page/images/logo_DIARY_365.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AequaTech/DIARY365_4NGISearch/HEAD/landing_page/images/logo_DIARY_365.png -------------------------------------------------------------------------------- /explore_map_demo/images/marker-shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AequaTech/DIARY365_4NGISearch/HEAD/explore_map_demo/images/marker-shadow.png -------------------------------------------------------------------------------- /explore_map_demo/images/icons8-libri-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AequaTech/DIARY365_4NGISearch/HEAD/explore_map_demo/images/icons8-libri-50.png -------------------------------------------------------------------------------- /explore_map_demo/images/icons8-libro-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AequaTech/DIARY365_4NGISearch/HEAD/explore_map_demo/images/icons8-libro-50.png -------------------------------------------------------------------------------- /explore_map_demo/images/prima_pagina/1PP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AequaTech/DIARY365_4NGISearch/HEAD/explore_map_demo/images/prima_pagina/1PP.png -------------------------------------------------------------------------------- /explore_map_demo/images/prima_pagina/2PP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AequaTech/DIARY365_4NGISearch/HEAD/explore_map_demo/images/prima_pagina/2PP.png -------------------------------------------------------------------------------- /explore_map_demo/images/prima_pagina/3PP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AequaTech/DIARY365_4NGISearch/HEAD/explore_map_demo/images/prima_pagina/3PP.png -------------------------------------------------------------------------------- /explore_map_demo/images/prima_pagina/4PP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AequaTech/DIARY365_4NGISearch/HEAD/explore_map_demo/images/prima_pagina/4PP.png -------------------------------------------------------------------------------- /explore_map_demo/images/prima_pagina/5PP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AequaTech/DIARY365_4NGISearch/HEAD/explore_map_demo/images/prima_pagina/5PP.png -------------------------------------------------------------------------------- /explore_map_demo/images/prima_pagina/6PP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AequaTech/DIARY365_4NGISearch/HEAD/explore_map_demo/images/prima_pagina/6PP.png -------------------------------------------------------------------------------- /explore_map_demo/images/prima_pagina/7PP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AequaTech/DIARY365_4NGISearch/HEAD/explore_map_demo/images/prima_pagina/7PP.png -------------------------------------------------------------------------------- /explore_map_demo/images/prima_pagina/8PP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AequaTech/DIARY365_4NGISearch/HEAD/explore_map_demo/images/prima_pagina/8PP.png -------------------------------------------------------------------------------- /mock-up pictures DIARY 365 App/4_upload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AequaTech/DIARY365_4NGISearch/HEAD/mock-up pictures DIARY 365 App/4_upload.png -------------------------------------------------------------------------------- /DIARY 365 business model/4_differentiation.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AequaTech/DIARY365_4NGISearch/HEAD/DIARY 365 business model/4_differentiation.jpg -------------------------------------------------------------------------------- /mock-up pictures DIARY 365 App/3_Insights.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AequaTech/DIARY365_4NGISearch/HEAD/mock-up pictures DIARY 365 App/3_Insights.png -------------------------------------------------------------------------------- /landing_page/images/arquivo_dos_diarios_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AequaTech/DIARY365_4NGISearch/HEAD/landing_page/images/arquivo_dos_diarios_logo.png -------------------------------------------------------------------------------- /mock-up pictures DIARY 365 App/6_translation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AequaTech/DIARY365_4NGISearch/HEAD/mock-up pictures DIARY 365 App/6_translation.png -------------------------------------------------------------------------------- /DIARY 365 business model/3_market-our-proposal.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AequaTech/DIARY365_4NGISearch/HEAD/DIARY 365 business model/3_market-our-proposal.jpg -------------------------------------------------------------------------------- /DIARY 365 business model/1_business-model-canvas.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AequaTech/DIARY365_4NGISearch/HEAD/DIARY 365 business model/1_business-model-canvas.jpg -------------------------------------------------------------------------------- /DIARY 365 business model/2_business-model-detailed.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AequaTech/DIARY365_4NGISearch/HEAD/DIARY 365 business model/2_business-model-detailed.jpg -------------------------------------------------------------------------------- /mock-up pictures DIARY 365 App/1_write your diary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AequaTech/DIARY365_4NGISearch/HEAD/mock-up pictures DIARY 365 App/1_write your diary.png -------------------------------------------------------------------------------- /mock-up pictures DIARY 365 App/5_tags and emotion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AequaTech/DIARY365_4NGISearch/HEAD/mock-up pictures DIARY 365 App/5_tags and emotion.png -------------------------------------------------------------------------------- /mock-up pictures DIARY 365 App/2_read other diaries.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AequaTech/DIARY365_4NGISearch/HEAD/mock-up pictures DIARY 365 App/2_read other diaries.png -------------------------------------------------------------------------------- /explore_map_demo/prepare_data.py: -------------------------------------------------------------------------------- 1 | import pandas as pd 2 | 3 | df = pd.read_csv('data/data_diary.tsv', sep='\t') 4 | # print(df.head()) 5 | df.to_csv('data_diary_2.tsv', sep='\t', index=False) -------------------------------------------------------------------------------- /landing_page/slick/config.rb: -------------------------------------------------------------------------------- 1 | css_dir = "." 2 | sass_dir = "." 3 | images_dir = "." 4 | fonts_dir = "fonts" 5 | relative_assets = true 6 | 7 | output_style = :compact 8 | line_comments = false 9 | 10 | preferred_syntax = :scss -------------------------------------------------------------------------------- /landing_page/css/timeline.css: -------------------------------------------------------------------------------- 1 | /*.area { 2 | fill: steelblue; 3 | clip-path: url(#clip); 4 | } 5 | 6 | .zoom { 7 | cursor: move; 8 | fill: none; 9 | pointer-events: all; 10 | }*/ 11 | 12 | #timeline__container { 13 | position: absolute; 14 | top: 75%; 15 | left: 50%; 16 | transform: translate(-50%, -5%); 17 | z-index: 100; 18 | } 19 | #timeline__container svg { 20 | shape-rendering: crispedges; 21 | /* z-index: 120;*/ 22 | width: 100%; height: 100%; 23 | } 24 | .brush, .bars { 25 | z-index: 110; 26 | } 27 | 28 | #timeline__container_div{ 29 | padding: 0; 30 | } 31 | 32 | .axis--x{ 33 | font-size: 15; 34 | } -------------------------------------------------------------------------------- /explore_map_demo/css/timeline.css: -------------------------------------------------------------------------------- 1 | /*.area { 2 | fill: steelblue; 3 | clip-path: url(#clip); 4 | } 5 | 6 | .zoom { 7 | cursor: move; 8 | fill: none; 9 | pointer-events: all; 10 | }*/ 11 | 12 | #timeline__container { 13 | position: absolute; 14 | top: 75%; 15 | left: 50%; 16 | transform: translate(-50%, -5%); 17 | z-index: 100; 18 | } 19 | #timeline__container svg { 20 | shape-rendering: crispedges; 21 | /* z-index: 120;*/ 22 | width: 100%; height: 100%; 23 | } 24 | .brush, .bars { 25 | z-index: 110; 26 | } 27 | 28 | #timeline__container_div{ 29 | padding: 0; 30 | } 31 | 32 | .axis--x{ 33 | font-size: 15; 34 | } -------------------------------------------------------------------------------- /explore_map_demo/css/index.css: -------------------------------------------------------------------------------- 1 | #image1 img { 2 | width: 100%; 3 | } 4 | #image2 img { 5 | width: 100%; 6 | } 7 | #image3 { 8 | width: 100%; 9 | } 10 | 11 | .text-title{ 12 | font-size: 3em!important; 13 | } 14 | .text-title2{ 15 | font-size: 2.2em!important; 16 | } 17 | .text-title3{ 18 | font-size: 1.3em!important; 19 | } 20 | .imglogo{ 21 | max-height: 90px; 22 | } 23 | 24 | .text-click { 25 | display:inline-block; 26 | color:#444; 27 | border:1px solid #CCC; 28 | background:#f3f3f3; 29 | box-shadow: 0 0 5px -1px rgba(0,0,0,0.2); 30 | cursor:pointer; 31 | } 32 | .text-click:active { 33 | color:#8e2957; 34 | box-shadow: 0 0 5px -1px rgba(0,0,0,0.6); 35 | } 36 | .text-click:hover { 37 | opacity: 0.7; 38 | cursor: pointer; 39 | } 40 | 41 | a { 42 | all: unset; 43 | color: inherit!important; /* blue colors for links too */ 44 | text-decoration: inherit!important; /* no underline */ 45 | } 46 | 47 | .mkHistory { 48 | padding-left: 0!important; 49 | } 50 | 51 | @font-face { 52 | font-family: "Mouly"; 53 | src: url(https://annotazione.didattica.aequa-tech.com/diary/fonts/Mouly.ttf) format("truetype"); 54 | } 55 | 56 | .logo{ 57 | font-family: Mouly; 58 | } -------------------------------------------------------------------------------- /explore_map_demo/css/index2.css: -------------------------------------------------------------------------------- 1 | #image1 img { 2 | width: 100%; 3 | } 4 | #image2 img { 5 | width: 100%; 6 | } 7 | #image3 { 8 | width: 100%; 9 | } 10 | 11 | .text-title{ 12 | font-size: 3em!important; 13 | } 14 | .text-title2{ 15 | font-size: 2.2em!important; 16 | } 17 | .text-title3{ 18 | font-size: 1.3em!important; 19 | } 20 | .imglogo{ 21 | max-height: 90px; 22 | } 23 | 24 | .text-click { 25 | display:inline-block; 26 | color:#444; 27 | border:1px solid #CCC; 28 | background:#f3f3f3; 29 | box-shadow: 0 0 5px -1px rgba(0,0,0,0.2); 30 | cursor:pointer; 31 | } 32 | .text-click:active { 33 | color:#8e2957; 34 | box-shadow: 0 0 5px -1px rgba(0,0,0,0.6); 35 | } 36 | .text-click:hover { 37 | opacity: 0.7; 38 | cursor: pointer; 39 | } 40 | 41 | a { 42 | all: unset; 43 | color: inherit!important; /* blue colors for links too */ 44 | text-decoration: inherit!important; /* no underline */ 45 | } 46 | 47 | .mkHistory { 48 | padding-left: 0!important; 49 | } 50 | 51 | @font-face { 52 | font-family: "Mouly"; 53 | src: url(https://annotazione.didattica.aequa-tech.com/diary/fonts/Mouly.ttf) format("truetype"); 54 | } 55 | 56 | .logo{ 57 | font-family: Mouly; 58 | } -------------------------------------------------------------------------------- /landing_page/css/map.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: #fff; 3 | } 4 | 5 | .grid{ 6 | color: red!important; 7 | } 8 | 9 | #pf-timeline { 10 | width: 100%; 11 | margin-left: auto; 12 | margin-right: auto; 13 | position: relative; 14 | } 15 | 16 | #pf-timeline .popover { 17 | white-space: pre; 18 | max-width: none; 19 | } 20 | 21 | .timeline-pf-drop { 22 | font-size: 29px!important; 23 | } 24 | 25 | .timeline-pf-drop:hover { 26 | font-size: 35px!important; 27 | } 28 | 29 | .form-control { 30 | height: 30px!important; 31 | } 32 | 33 | .diaryText { 34 | height: 100px; 35 | overflow-x:hidden 36 | } 37 | #map__container { 38 | height: 480px; 39 | z-index: 1; 40 | } 41 | 42 | .overlay { 43 | fill: none; 44 | pointer-events: all; 45 | } 46 | 47 | .land { 48 | fill: #000; 49 | } 50 | 51 | .boundary { 52 | fill: none; 53 | stroke: #fff; 54 | stroke-linejoin: round; 55 | stroke-linecap: round; 56 | } 57 | .counties { 58 | fill: #ff000000; 59 | /* stroke: #fff; 60 | stroke-width: .5px;*/ 61 | } 62 | 63 | .counties:hover { 64 | fill: #ff000029; 65 | } 66 | 67 | .customMarkerGroup { 68 | background-image: url(../images/icons8-libri-50.png); 69 | background-position: center; 70 | background-repeat: no-repeat; 71 | background-size: contain; 72 | font-size: 17pt; 73 | text-align: right; 74 | } -------------------------------------------------------------------------------- /explore_map_demo/css/map.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: #fff; 3 | } 4 | 5 | .grid{ 6 | color: red!important; 7 | } 8 | 9 | #pf-timeline { 10 | width: 100%; 11 | margin-left: auto; 12 | margin-right: auto; 13 | position: relative; 14 | } 15 | 16 | #pf-timeline .popover { 17 | white-space: pre; 18 | max-width: none; 19 | } 20 | 21 | .timeline-pf-drop { 22 | font-size: 29px!important; 23 | } 24 | 25 | .timeline-pf-drop:hover { 26 | font-size: 35px!important; 27 | } 28 | 29 | .form-control { 30 | height: 30px!important; 31 | } 32 | 33 | .diaryText { 34 | height: 100px; 35 | overflow-x:hidden 36 | } 37 | #map__container { 38 | height: 480px; 39 | z-index: 1; 40 | } 41 | 42 | .overlay { 43 | fill: none; 44 | pointer-events: all; 45 | } 46 | 47 | .land { 48 | fill: #000; 49 | } 50 | 51 | .boundary { 52 | fill: none; 53 | stroke: #fff; 54 | stroke-linejoin: round; 55 | stroke-linecap: round; 56 | } 57 | .counties { 58 | fill: #ff000000; 59 | /* stroke: #fff; 60 | stroke-width: .5px;*/ 61 | } 62 | 63 | .counties:hover { 64 | fill: #ff000029; 65 | } 66 | 67 | .customMarkerGroup { 68 | background-image: url(../images/icons8-libri-50.png); 69 | background-position: center; 70 | background-repeat: no-repeat; 71 | background-size: contain; 72 | font-size: 17pt; 73 | text-align: right; 74 | } -------------------------------------------------------------------------------- /explore_map_demo/index2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | D3 5 | 6 | 7 | 8 | 9 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /landing_page/css/index.css: -------------------------------------------------------------------------------- 1 | #image1 img { 2 | width: 100%; 3 | } 4 | #image2 img { 5 | width: 100%; 6 | } 7 | #image3 { 8 | width: 100%; 9 | } 10 | 11 | .text-title{ 12 | font-size: 3em!important; 13 | } 14 | .text-title2{ 15 | font-size: 2.2em!important; 16 | } 17 | .text-title3{ 18 | font-size: 1.3em!important; 19 | } 20 | .imglogo{ 21 | max-height: 90px; 22 | } 23 | 24 | .text-click { 25 | display:inline-block; 26 | color:#444; 27 | border:1px solid #CCC; 28 | background:#f3f3f3; 29 | box-shadow: 0 0 5px -1px rgba(0,0,0,0.2); 30 | cursor:pointer; 31 | } 32 | .text-click:active { 33 | color:#8e2957; 34 | box-shadow: 0 0 5px -1px rgba(0,0,0,0.6); 35 | } 36 | .text-click:hover { 37 | opacity: 0.7; 38 | cursor: pointer; 39 | } 40 | 41 | a { 42 | all: unset; 43 | color: inherit!important; /* blue colors for links too */ 44 | text-decoration: inherit!important; /* no underline */ 45 | } 46 | 47 | .slick-container { 48 | max-height: 500px; 49 | } 50 | .slick-slide { 51 | height: 0px!important; 52 | } 53 | .slick-slide.slick-active { 54 | height: 100% !important; 55 | } 56 | 57 | .slick-slide img { 58 | height:500px; 59 | } 60 | .mkHistory { 61 | padding-left: 0!important; 62 | } 63 | 64 | @font-face { 65 | font-family: "Mouly"; 66 | src: url(https://annotazione.didattica.aequa-tech.com/diary/fonts/Mouly.ttf) format("truetype"); 67 | } 68 | 69 | .logo{ 70 | /* font-family: Mouly;*/ 71 | } -------------------------------------------------------------------------------- /landing_page/index.js: -------------------------------------------------------------------------------- 1 | // $('#myCarousel').carousel({ 2 | // interval: 10000 3 | // }) 4 | 5 | // $('.carousel .item').each(function(){ 6 | // var next = $(this).next(); 7 | // if (!next.length) { 8 | // next = $(this).siblings(':first'); 9 | // } 10 | // next.children(':first-child').clone().appendTo($(this)); 11 | 12 | // if (next.next().length>0) { 13 | // next.next().children(':first-child').clone().appendTo($(this)); 14 | // } 15 | // else { 16 | // $(this).siblings(':first').children(':first-child').clone().appendTo($(this)); 17 | // } 18 | // }); 19 | var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent); 20 | 21 | if (isMobile) { 22 | console.log("Mobile device detected"); 23 | $(document).ready(function(){ 24 | $('.your-class').slick({ 25 | infinite: false, 26 | slidesToShow: 1, 27 | slidesToScroll: 1, 28 | dots: true, 29 | // customPaging : function(slider, i) { 30 | // var thumb = $(slider.$slides[i]).data(); 31 | // console.log(thumb) 32 | // return '' + (i+1) + ''; 33 | // }, 34 | centerMode: true, 35 | focusOnSelect: true, 36 | autoplaySpeed: 3000, 37 | arrows:true, 38 | adaptiveHeight: false 39 | }); 40 | }); 41 | } else { 42 | console.log("Desktop device detected"); 43 | $(document).ready(function(){ 44 | $('.your-class').slick({ 45 | infinite: true, 46 | slidesToShow: 3, 47 | slidesToScroll: 1, 48 | dots: true, 49 | // customPaging : function(slider, i) { 50 | // var thumb = $(slider.$slides[i]).data(); 51 | // console.log(thumb) 52 | // return '' + (i+1) + ''; 53 | // }, 54 | centerMode: true, 55 | focusOnSelect: true, 56 | autoplaySpeed: 3000, 57 | arrows:true, 58 | adaptiveHeight: false 59 | }); 60 | }); 61 | } 62 | -------------------------------------------------------------------------------- /landing_page/slick/fonts/slick.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Generated by Fontastic.me 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /explore_map_demo/js/map2.js: -------------------------------------------------------------------------------- 1 | // $(document).ready(function() { 2 | $("#map__container").css("width", "100%"); 3 | $("#map__container").css("height", "100%"); 4 | $("#map__container").css("position", "absolute"); 5 | $("#map__container").css("top", "0px"); 6 | $("#map__container").css("left", "0px"); 7 | 8 | var southWest = L.latLng(-89.98155760646617, -180), 9 | northEast = L.latLng(89.99346179538875, 180); 10 | var bounds = L.latLngBounds(southWest, northEast); 11 | var Stadia_StamenWatercolor = L.tileLayer('https://tiles.stadiamaps.com/tiles/stamen_watercolor/{z}/{x}/{y}.{ext}', { 12 | maxZoom: 16, 13 | minZoom: 3, 14 | attribution: '© Stadia Maps © Stamen Design © OpenMapTiles © OpenStreetMap contributors', 15 | ext: 'jpg' 16 | }); 17 | 18 | // map.setMaxBounds(bounds); 19 | var map = new L.Map("map__container", { 20 | center: [41.90, 12.49], 21 | zoom: 3, 22 | maxZoom: 16, 23 | minZoom: 3, 24 | maxBounds: bounds, 25 | maxBoundsViscosity: 0.0 26 | 27 | }).addLayer(new L.TileLayer("http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png")); 28 | map.on('drag', function() { 29 | map.panInsideBounds(bounds, { animate: false }); 30 | }); 31 | 32 | var bookIcon = L.Icon.extend({ 33 | options:{iconUrl: 'images/icons8-libro-50.png', 34 | // shadowUrl: 'leaf-shadow.png', 35 | 36 | iconSize: [40, 40], // size of the icon 37 | // shadowSize: [50, 64], // size of the shadow 38 | // iconAnchor: [22, 94], // point of the icon which will correspond to marker's location 39 | // shadowAnchor: [4, 62], // the same for the shadow 40 | popupAnchor: [0, -20] // point from which the popup should open relative to the iconAnchor 41 | } 42 | }); 43 | 44 | var bookIcon = new bookIcon() 45 | 46 | var markers = L.markerClusterGroup({ 47 | iconCreateFunction: function(cluster) { 48 | return L.divIcon({ html: '' + cluster.getChildCount() + '', className: 'customMarkerGroup', iconSize: L.point(50, 50)}); 49 | } 50 | }); 51 | 52 | map.addLayer(markers); 53 | 54 | 55 | function getRandom(min, max) { 56 | return Math.random() * (max - min) + min; 57 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DIARY 365 for NGI Search 4th Open Call 2 | 3 | The project is newly initiated, therefore only the proof of concept is visible here. 4 | 5 | At the moment the repository contains: 6 | 1. link to the landing page advertising the DIARY 365 App ([https://diary365.aequa-tech.com/](https://diary365.aequa-tech.com/)); 7 | 2. mock-up pictures showing the features of the App (how it will look on mobile); 8 | 3. code of the landing page advertising DIARY 365; 9 | 4. code of the current interactive map of DIARY 365; 10 | 5. slides showing DIARY 365’s business model. 11 | 12 | --- 13 | 14 | Upon acceptance of the DIARY 365 proposal, we will start working on developing a Minimum Viable Product (MVP) to develop the App, and we will upload this repository also with the following: 15 | * the code of the mobile app that will be created for DIARY 365; 16 | * the NLP model for emotion detection developed by aequa-tech; 17 | * the NLP model for automatic translation developed by aequa-tech; 18 | * the excerpts from the digitalized diaries (within the permission of author’s rights); 19 | * the URL to the site that presents the NGI-funded project and collects the community’s contributions that will be born around it (e.g. new partnerships with other national diaristic archives, museums, etc). 20 | 21 | 22 | This work is licensed under CC BY 4.0 23 | 24 | --- 25 | 26 | ## DIARY 365 LANDING PAGE: 27 | * Link: http://diary365.aequa-tech.com/ 28 | 29 | --- 30 | 31 | ### Acknowledgements (aequa-tech's members) 32 | * [Alessandra Teresa Cignarella](https://www.unito.it/persone/acignare) 33 | * [Arthur Thomas Edward Capozzi Lupi](https://www.unito.it/persone/acapozzi) 34 | * [Mirko Lai](http://www.di.unito.it/~lai/) 35 | * [Simona Frenda](https://www.unito.it/persone/sfrenda) 36 | * [Marco Stranisci](https://www.unito.it/persone/mstranis) 37 | * [Alessandra Urbinati](https://www.networkscienceinstitute.org/people/alessandra-urbinati) 38 | 39 | 40 | ### Team Leader (SuiGeneris) 41 | * [Oriana Conte](https://www.linkedin.com/in/orianasuigeneris/) 42 | * [Edizioni SuiGeneris](https://edizionisuigeneris.it/) 43 | 44 | ### Other collaborations 45 | * [2i3T - Incubatore di Imprese e per il Trasferimento Tecnologico dell’Università di Torino](https://2i3t.it/2i3t-chi-siamo/) 46 | * [Arquivo dos Diários](https://www.arquivodosdiarios.pt/) 47 | -------------------------------------------------------------------------------- /landing_page/slick/slick.less: -------------------------------------------------------------------------------- 1 | /* Slider */ 2 | 3 | .slick-slider { 4 | position: relative; 5 | display: block; 6 | box-sizing: border-box; 7 | -webkit-touch-callout: none; 8 | -webkit-user-select: none; 9 | -khtml-user-select: none; 10 | -moz-user-select: none; 11 | -ms-user-select: none; 12 | user-select: none; 13 | -ms-touch-action: pan-y; 14 | touch-action: pan-y; 15 | -webkit-tap-highlight-color: transparent; 16 | } 17 | .slick-list { 18 | position: relative; 19 | overflow: hidden; 20 | display: block; 21 | margin: 0; 22 | padding: 0; 23 | 24 | &:focus { 25 | outline: none; 26 | } 27 | 28 | &.dragging { 29 | cursor: pointer; 30 | cursor: hand; 31 | } 32 | } 33 | .slick-slider .slick-track, 34 | .slick-slider .slick-list { 35 | -webkit-transform: translate3d(0, 0, 0); 36 | -moz-transform: translate3d(0, 0, 0); 37 | -ms-transform: translate3d(0, 0, 0); 38 | -o-transform: translate3d(0, 0, 0); 39 | transform: translate3d(0, 0, 0); 40 | } 41 | 42 | .slick-track { 43 | position: relative; 44 | left: 0; 45 | top: 0; 46 | display: block; 47 | margin-left: auto; 48 | margin-right: auto; 49 | 50 | &:before, 51 | &:after { 52 | content: ""; 53 | display: table; 54 | } 55 | 56 | &:after { 57 | clear: both; 58 | } 59 | 60 | .slick-loading & { 61 | visibility: hidden; 62 | } 63 | } 64 | .slick-slide { 65 | float: left; 66 | height: 100%; 67 | min-height: 1px; 68 | [dir="rtl"] & { 69 | float: right; 70 | } 71 | img { 72 | display: block; 73 | } 74 | &.slick-loading img { 75 | display: none; 76 | } 77 | 78 | display: none; 79 | 80 | &.dragging img { 81 | pointer-events: none; 82 | } 83 | 84 | .slick-initialized & { 85 | display: block; 86 | } 87 | 88 | .slick-loading & { 89 | visibility: hidden; 90 | } 91 | 92 | .slick-vertical & { 93 | display: block; 94 | height: auto; 95 | border: 1px solid transparent; 96 | } 97 | } 98 | .slick-arrow.slick-hidden { 99 | display: none; 100 | } 101 | -------------------------------------------------------------------------------- /landing_page/slick/slick.scss: -------------------------------------------------------------------------------- 1 | /* Slider */ 2 | 3 | .slick-slider { 4 | position: relative; 5 | display: block; 6 | box-sizing: border-box; 7 | -webkit-touch-callout: none; 8 | -webkit-user-select: none; 9 | -khtml-user-select: none; 10 | -moz-user-select: none; 11 | -ms-user-select: none; 12 | user-select: none; 13 | -ms-touch-action: pan-y; 14 | touch-action: pan-y; 15 | -webkit-tap-highlight-color: transparent; 16 | } 17 | .slick-list { 18 | position: relative; 19 | overflow: hidden; 20 | display: block; 21 | margin: 0; 22 | padding: 0; 23 | 24 | &:focus { 25 | outline: none; 26 | } 27 | 28 | &.dragging { 29 | cursor: pointer; 30 | cursor: hand; 31 | } 32 | } 33 | .slick-slider .slick-track, 34 | .slick-slider .slick-list { 35 | -webkit-transform: translate3d(0, 0, 0); 36 | -moz-transform: translate3d(0, 0, 0); 37 | -ms-transform: translate3d(0, 0, 0); 38 | -o-transform: translate3d(0, 0, 0); 39 | transform: translate3d(0, 0, 0); 40 | } 41 | 42 | .slick-track { 43 | position: relative; 44 | left: 0; 45 | top: 0; 46 | display: block; 47 | margin-left: auto; 48 | margin-right: auto; 49 | 50 | &:before, 51 | &:after { 52 | content: ""; 53 | display: table; 54 | } 55 | 56 | &:after { 57 | clear: both; 58 | } 59 | 60 | .slick-loading & { 61 | visibility: hidden; 62 | } 63 | } 64 | .slick-slide { 65 | float: left; 66 | height: 100%; 67 | min-height: 1px; 68 | [dir="rtl"] & { 69 | float: right; 70 | } 71 | img { 72 | display: block; 73 | } 74 | &.slick-loading img { 75 | display: none; 76 | } 77 | 78 | display: none; 79 | 80 | &.dragging img { 81 | pointer-events: none; 82 | } 83 | 84 | .slick-initialized & { 85 | display: block; 86 | } 87 | 88 | .slick-loading & { 89 | visibility: hidden; 90 | } 91 | 92 | .slick-vertical & { 93 | display: block; 94 | height: auto; 95 | border: 1px solid transparent; 96 | } 97 | } 98 | .slick-arrow.slick-hidden { 99 | display: none; 100 | } 101 | -------------------------------------------------------------------------------- /landing_page/slick/slick.css: -------------------------------------------------------------------------------- 1 | /* Slider */ 2 | .slick-slider 3 | { 4 | position: relative; 5 | 6 | display: block; 7 | box-sizing: border-box; 8 | 9 | -webkit-user-select: none; 10 | -moz-user-select: none; 11 | -ms-user-select: none; 12 | user-select: none; 13 | 14 | -webkit-touch-callout: none; 15 | -khtml-user-select: none; 16 | -ms-touch-action: pan-y; 17 | touch-action: pan-y; 18 | -webkit-tap-highlight-color: transparent; 19 | } 20 | 21 | .slick-list 22 | { 23 | position: relative; 24 | 25 | display: block; 26 | overflow: hidden; 27 | 28 | margin: 0; 29 | padding: 0; 30 | } 31 | .slick-list:focus 32 | { 33 | outline: none; 34 | } 35 | .slick-list.dragging 36 | { 37 | cursor: pointer; 38 | cursor: hand; 39 | } 40 | 41 | .slick-slider .slick-track, 42 | .slick-slider .slick-list 43 | { 44 | -webkit-transform: translate3d(0, 0, 0); 45 | -moz-transform: translate3d(0, 0, 0); 46 | -ms-transform: translate3d(0, 0, 0); 47 | -o-transform: translate3d(0, 0, 0); 48 | transform: translate3d(0, 0, 0); 49 | } 50 | 51 | .slick-track 52 | { 53 | position: relative; 54 | top: 0; 55 | left: 0; 56 | 57 | display: block; 58 | margin-left: auto; 59 | margin-right: auto; 60 | } 61 | .slick-track:before, 62 | .slick-track:after 63 | { 64 | display: table; 65 | 66 | content: ''; 67 | } 68 | .slick-track:after 69 | { 70 | clear: both; 71 | } 72 | .slick-loading .slick-track 73 | { 74 | visibility: hidden; 75 | } 76 | 77 | .slick-slide 78 | { 79 | display: none; 80 | float: left; 81 | 82 | height: 100%; 83 | min-height: 1px; 84 | } 85 | [dir='rtl'] .slick-slide 86 | { 87 | float: right; 88 | } 89 | .slick-slide img 90 | { 91 | display: block; 92 | } 93 | .slick-slide.slick-loading img 94 | { 95 | display: none; 96 | } 97 | .slick-slide.dragging img 98 | { 99 | pointer-events: none; 100 | } 101 | .slick-initialized .slick-slide 102 | { 103 | display: block; 104 | } 105 | .slick-loading .slick-slide 106 | { 107 | visibility: hidden; 108 | } 109 | .slick-vertical .slick-slide 110 | { 111 | display: block; 112 | 113 | height: auto; 114 | 115 | border: 1px solid transparent; 116 | } 117 | .slick-arrow.slick-hidden { 118 | display: none; 119 | } 120 | -------------------------------------------------------------------------------- /landing_page/css/cards.css: -------------------------------------------------------------------------------- 1 | #diary1 { 2 | position: absolute; 3 | z-index: 120; 4 | width: 250px; 5 | background-color: #f1f1f1; 6 | border: 1px solid #d3d3d3; 7 | text-align: center; 8 | } 9 | #contentDiary1, #contentDiary2 { 10 | overflow: auto !important; 11 | /* height: 500px;*/ 12 | height: 350px; 13 | padding: 9px; 14 | } 15 | 16 | #contentFilters { 17 | overflow-y: auto !important; 18 | /* height: 500px;*/ 19 | /* height: 150px;*/ 20 | padding: 9px; 21 | overflow-x: hidden; 22 | } 23 | 24 | #diary2 { 25 | position: absolute; 26 | z-index: 120; 27 | width: 250px; 28 | background-color: #f1f1f1; 29 | border: 1px solid #d3d3d3; 30 | text-align: center; 31 | 32 | } 33 | 34 | #reset_brush_container { 35 | position: absolute; 36 | z-index: 120; 37 | bottom: 2%; 38 | left: 1%; 39 | } 40 | 41 | #collapsibleFilters { 42 | } 43 | 44 | #filters { 45 | position: absolute; 46 | z-index: 119; 47 | width: 250px; 48 | background-color: #f1f1f1; 49 | border: 1px solid #d3d3d3; 50 | text-align: center; 51 | 52 | left: calc(50vw - 125px); 53 | 54 | } 55 | 56 | #mydivheader { 57 | padding: 3px; 58 | cursor: move; 59 | z-index: 130; 60 | background-color: #2196F3; 61 | color: #fff; 62 | } 63 | 64 | .collapsible { 65 | background-color: #777; 66 | color: white; 67 | cursor: pointer; 68 | padding: 18px; 69 | width: 100%; 70 | border: none; 71 | text-align: left; 72 | outline: none; 73 | font-size: 15px; 74 | } 75 | 76 | .active, .collapsible:hover { 77 | background-color: #555; 78 | } 79 | 80 | .collapsible:after { 81 | content: '\002B'; 82 | color: white; 83 | font-weight: bold; 84 | float: right; 85 | margin-left: 5px; 86 | } 87 | 88 | .active:after { 89 | content: "\2212"; 90 | } 91 | 92 | .content { 93 | /* padding: 0 9px;*/ 94 | max-height: 0; 95 | overflow: hidden; 96 | transition: max-height 0.2s ease-out; 97 | background-color: #f1f1f1; 98 | } 99 | 100 | #contentDiary1::-webkit-scrollbar { 101 | width: .5em; 102 | } 103 | 104 | #contentDiary1::-webkit-scrollbar-track { 105 | -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); 106 | } 107 | 108 | #contentDiary1::-webkit-scrollbar-thumb { 109 | background-color: darkgrey; 110 | outline: 1px solid slategrey; 111 | } 112 | 113 | #contentDiary2::-webkit-scrollbar { 114 | width: .5em; 115 | } 116 | 117 | #contentDiary2::-webkit-scrollbar-track { 118 | -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); 119 | } 120 | 121 | #contentDiary2::-webkit-scrollbar-thumb { 122 | background-color: darkgrey; 123 | outline: 1px solid slategrey; 124 | } -------------------------------------------------------------------------------- /explore_map_demo/css/cards.css: -------------------------------------------------------------------------------- 1 | #diary1 { 2 | position: absolute; 3 | z-index: 120; 4 | width: 250px; 5 | background-color: #f1f1f1; 6 | border: 1px solid #d3d3d3; 7 | text-align: center; 8 | } 9 | #contentDiary1, #contentDiary2 { 10 | overflow: auto !important; 11 | /* height: 500px;*/ 12 | height: 350px; 13 | padding: 9px; 14 | } 15 | 16 | #contentFilters { 17 | overflow-y: auto !important; 18 | /* height: 500px;*/ 19 | /* height: 150px;*/ 20 | padding: 9px; 21 | overflow-x: hidden; 22 | } 23 | 24 | #diary2 { 25 | position: absolute; 26 | z-index: 120; 27 | width: 250px; 28 | background-color: #f1f1f1; 29 | border: 1px solid #d3d3d3; 30 | text-align: center; 31 | 32 | } 33 | 34 | #reset_brush_container { 35 | position: absolute; 36 | z-index: 120; 37 | bottom: 2%; 38 | left: 1%; 39 | } 40 | 41 | #collapsibleFilters { 42 | } 43 | 44 | #filters { 45 | position: absolute; 46 | z-index: 119; 47 | width: 250px; 48 | background-color: #f1f1f1; 49 | border: 1px solid #d3d3d3; 50 | text-align: center; 51 | 52 | left: calc(50vw - 125px); 53 | 54 | } 55 | 56 | #mydivheader { 57 | padding: 3px; 58 | cursor: move; 59 | z-index: 130; 60 | background-color: #2196F3; 61 | color: #fff; 62 | } 63 | 64 | .collapsible { 65 | background-color: #777; 66 | color: white; 67 | cursor: pointer; 68 | padding: 18px; 69 | width: 100%; 70 | border: none; 71 | text-align: left; 72 | outline: none; 73 | font-size: 15px; 74 | } 75 | 76 | .active, .collapsible:hover { 77 | background-color: #555; 78 | } 79 | 80 | .collapsible:after { 81 | content: '\002B'; 82 | color: white; 83 | font-weight: bold; 84 | float: right; 85 | margin-left: 5px; 86 | } 87 | 88 | .active:after { 89 | content: "\2212"; 90 | } 91 | 92 | .content { 93 | /* padding: 0 9px;*/ 94 | max-height: 0; 95 | overflow: hidden; 96 | transition: max-height 0.2s ease-out; 97 | background-color: #f1f1f1; 98 | } 99 | 100 | #contentDiary1::-webkit-scrollbar { 101 | width: .5em; 102 | } 103 | 104 | #contentDiary1::-webkit-scrollbar-track { 105 | -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); 106 | } 107 | 108 | #contentDiary1::-webkit-scrollbar-thumb { 109 | background-color: darkgrey; 110 | outline: 1px solid slategrey; 111 | } 112 | 113 | #contentDiary2::-webkit-scrollbar { 114 | width: .5em; 115 | } 116 | 117 | #contentDiary2::-webkit-scrollbar-track { 118 | -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); 119 | } 120 | 121 | #contentDiary2::-webkit-scrollbar-thumb { 122 | background-color: darkgrey; 123 | outline: 1px solid slategrey; 124 | } -------------------------------------------------------------------------------- /explore_map_demo/data/sp500.csv: -------------------------------------------------------------------------------- 1 | date,price 2 | Jan 2000,1394.46 3 | Feb 2000,1366.42 4 | Mar 2000,1498.58 5 | Apr 2000,1452.43 6 | May 2000,1420.6 7 | Jun 2000,1454.6 8 | Jul 2000,1430.83 9 | Aug 2000,1517.68 10 | Sep 2000,1436.51 11 | Oct 2000,1429.4 12 | Nov 2000,1314.95 13 | Dec 2000,1320.28 14 | Jan 2001,1366.01 15 | Feb 2001,1239.94 16 | Mar 2001,1160.33 17 | Apr 2001,1249.46 18 | May 2001,1255.82 19 | Jun 2001,1224.38 20 | Jul 2001,1211.23 21 | Aug 2001,1133.58 22 | Sep 2001,1040.94 23 | Oct 2001,1059.78 24 | Nov 2001,1139.45 25 | Dec 2001,1148.08 26 | Jan 2002,1130.2 27 | Feb 2002,1106.73 28 | Mar 2002,1147.39 29 | Apr 2002,1076.92 30 | May 2002,1067.14 31 | Jun 2002,989.82 32 | Jul 2002,911.62 33 | Aug 2002,916.07 34 | Sep 2002,815.28 35 | Oct 2002,885.76 36 | Nov 2002,936.31 37 | Dec 2002,879.82 38 | Jan 2003,855.7 39 | Feb 2003,841.15 40 | Mar 2003,848.18 41 | Apr 2003,916.92 42 | May 2003,963.59 43 | Jun 2003,974.5 44 | Jul 2003,990.31 45 | Aug 2003,1008.01 46 | Sep 2003,995.97 47 | Oct 2003,1050.71 48 | Nov 2003,1058.2 49 | Dec 2003,1111.92 50 | Jan 2004,1131.13 51 | Feb 2004,1144.94 52 | Mar 2004,1126.21 53 | Apr 2004,1107.3 54 | May 2004,1120.68 55 | Jun 2004,1140.84 56 | Jul 2004,1101.72 57 | Aug 2004,1104.24 58 | Sep 2004,1114.58 59 | Oct 2004,1130.2 60 | Nov 2004,1173.82 61 | Dec 2004,1211.92 62 | Jan 2005,1181.27 63 | Feb 2005,1203.6 64 | Mar 2005,1180.59 65 | Apr 2005,1156.85 66 | May 2005,1191.5 67 | Jun 2005,1191.33 68 | Jul 2005,1234.18 69 | Aug 2005,1220.33 70 | Sep 2005,1228.81 71 | Oct 2005,1207.01 72 | Nov 2005,1249.48 73 | Dec 2005,1248.29 74 | Jan 2006,1280.08 75 | Feb 2006,1280.66 76 | Mar 2006,1294.87 77 | Apr 2006,1310.61 78 | May 2006,1270.09 79 | Jun 2006,1270.2 80 | Jul 2006,1276.66 81 | Aug 2006,1303.82 82 | Sep 2006,1335.85 83 | Oct 2006,1377.94 84 | Nov 2006,1400.63 85 | Dec 2006,1418.3 86 | Jan 2007,1438.24 87 | Feb 2007,1406.82 88 | Mar 2007,1420.86 89 | Apr 2007,1482.37 90 | May 2007,1530.62 91 | Jun 2007,1503.35 92 | Jul 2007,1455.27 93 | Aug 2007,1473.99 94 | Sep 2007,1526.75 95 | Oct 2007,1549.38 96 | Nov 2007,1481.14 97 | Dec 2007,1468.36 98 | Jan 2008,1378.55 99 | Feb 2008,1330.63 100 | Mar 2008,1322.7 101 | Apr 2008,1385.59 102 | May 2008,1400.38 103 | Jun 2008,1280 104 | Jul 2008,1267.38 105 | Aug 2008,1282.83 106 | Sep 2008,1166.36 107 | Oct 2008,968.75 108 | Nov 2008,896.24 109 | Dec 2008,903.25 110 | Jan 2009,825.88 111 | Feb 2009,735.09 112 | Mar 2009,797.87 113 | Apr 2009,872.81 114 | May 2009,919.14 115 | Jun 2009,919.32 116 | Jul 2009,987.48 117 | Aug 2009,1020.62 118 | Sep 2009,1057.08 119 | Oct 2009,1036.19 120 | Nov 2009,1095.63 121 | Dec 2009,1115.1 122 | Jan 2010,1073.87 123 | Feb 2010,1104.49 124 | Mar 2010,1140.45 -------------------------------------------------------------------------------- /explore_map_demo/js/cards.js: -------------------------------------------------------------------------------- 1 | // Make the DIV element draggable: 2 | dragElement(document.getElementById("diary1")); 3 | dragElement(document.getElementById("diary2")); 4 | // dragElement(document.getElementById("collapsibleFilters")); 5 | 6 | let windowHeight = $(window).height(); 7 | let windowWidth = $(window).width(); 8 | 9 | let mydivwidth = $('#diary1').width(); 10 | let start = 0 11 | function dragElement(elmnt) { 12 | var pos1 = 100, pos2 = 200, pos3 = 100, pos4 = 200; 13 | if (document.getElementById(elmnt.id + "header")) { 14 | // if present, the header is where you move the DIV from: 15 | document.getElementById(elmnt.id + "header").onmousedown = dragMouseDown; 16 | } else { 17 | // otherwise, move the DIV from anywhere inside the DIV: 18 | elmnt.onmousedown = dragMouseDown; 19 | if (elmnt.id == 'diary1'){ 20 | elmnt.style.top = "90px"; 21 | elmnt.style.left = "50px"; 22 | } else if (elmnt.id == 'diary2'){ 23 | elmnt.style.top = "90px"; 24 | elmnt.style.right = "50px"; 25 | } else if (elmnt.id == 'filters'){ 26 | elmnt.style.top = "250px"; 27 | elmnt.style.left = "50px"; 28 | } 29 | } 30 | 31 | function dragMouseDown(e) { 32 | e = e || window.event; 33 | e.preventDefault(); 34 | // get the mouse cursor position at startup: 35 | 36 | pos3 = e.clientX; 37 | pos4 = e.clientY; 38 | document.onmouseup = closeDragElement; 39 | // call a function whenever the cursor moves: 40 | document.onmousemove = elementDrag; 41 | } 42 | 43 | function elementDrag(e) { 44 | e = e || window.event; 45 | e.preventDefault(); 46 | // calculate the new cursor position: 47 | pos1 = pos3 - e.clientX; 48 | pos2 = pos4 - e.clientY; 49 | pos3 = e.clientX; 50 | pos4 = e.clientY; 51 | // set the element's new position: 52 | // console.log(e) 53 | if((elmnt.offsetTop - pos2) < (windowHeight-430) && (elmnt.offsetTop - pos2) > 10){ 54 | elmnt.style.top = (elmnt.offsetTop - pos2) + "px"; 55 | } 56 | if((elmnt.offsetLeft - pos1) > 10 && (elmnt.offsetLeft - pos1) < (windowWidth-mydivwidth-10)){ 57 | elmnt.style.left = (elmnt.offsetLeft - pos1) + "px"; 58 | } 59 | } 60 | 61 | function closeDragElement() { 62 | // stop moving when mouse button is released: 63 | document.onmouseup = null; 64 | document.onmousemove = null; 65 | } 66 | } 67 | 68 | 69 | var coll = document.getElementsByClassName("collapsible"); 70 | var i; 71 | 72 | for (i = 0; i < coll.length; i++) { 73 | coll[i].addEventListener("click", function() { 74 | this.classList.toggle("active"); 75 | var content = this.nextElementSibling; 76 | if (content.style.maxHeight){ 77 | content.style.maxHeight = null; 78 | } else { 79 | content.style.maxHeight = content.scrollHeight + "px"; 80 | } 81 | }); 82 | } -------------------------------------------------------------------------------- /landing_page/css/index2.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.cdnfonts.com/css/mouly'); 2 | 3 | #image1 img { 4 | width: 100%; 5 | } 6 | #image2 img { 7 | width: 100%; 8 | } 9 | #image3 { 10 | width: 100%; 11 | } 12 | 13 | .text-title{ 14 | font-size: 3em!important; 15 | } 16 | .text-title2{ 17 | font-size: 2.2em!important; 18 | } 19 | .text-title3{ 20 | font-size: 1.3em!important; 21 | } 22 | .imglogoA{ 23 | max-width: 50%; 24 | } 25 | .imglogoS{ 26 | max-width: 23%; 27 | } 28 | .imglogo{ 29 | max-width: 50%; 30 | max-height: 19%; 31 | height: auto; 32 | } 33 | .applogo:hover{ 34 | opacity: 50$; 35 | } 36 | .imgDiary{ 37 | max-height: 23%; 38 | height: auto; 39 | } 40 | 41 | .text-click { 42 | display:inline-block; 43 | color:#444; 44 | border:1px solid #CCC; 45 | background:#f3f3f3; 46 | box-shadow: 0 0 5px -1px rgba(0,0,0,0.2); 47 | cursor:pointer; 48 | } 49 | .text-click:active { 50 | color:#8e2957; 51 | box-shadow: 0 0 5px -1px rgba(0,0,0,0.6); 52 | } 53 | .applogo:hover { 54 | opacity: 0.7; 55 | cursor: pointer; 56 | } 57 | 58 | a { 59 | all: unset; 60 | color: inherit!important; /* blue colors for links too */ 61 | text-decoration: inherit!important; /* no underline */ 62 | } 63 | 64 | .mkHistory { 65 | padding-left: 0!important; 66 | } 67 | /*.slick-list{padding:0 20% 0 0 !important;}*/ 68 | 69 | /*@font-face { 70 | font-family: "Mouly"; 71 | src: url(localhost:9000/demo3/fonts/Mouly.ttf); 72 | } 73 | */ 74 | .logo{ 75 | /* font-family: 'Mouly', sans-serif;*/ 76 | font-size: 1.9em !important; 77 | } 78 | 79 | /*.slick-container { 80 | height:80%; 81 | 82 | max-height: 100px; 83 | }*/ 84 | 85 | .slick-dots { 86 | font-size: 2em; 87 | } 88 | .slick-active a { 89 | /* background: red;*/ 90 | color: black; 91 | font-size: 2em; 92 | } 93 | 94 | .slick-dots li.slick-active button:before { 95 | color: #8e2957 !important; 96 | } 97 | 98 | .slick-dots li button:before 99 | { 100 | font-size: 20px !important; 101 | line-height: 20px !important; 102 | } 103 | 104 | .vertical-align { 105 | display: flex; 106 | align-items: center; 107 | } 108 | 109 | .slick-prev, 110 | .slick-next{ 111 | z-index: 1000; 112 | top: 105% !important; 113 | } 114 | .slick-prev { 115 | left: 21% !important; 116 | } 117 | .slick-next { 118 | right: 21% !important; 119 | } 120 | .slick-prev:before, 121 | .slick-next:before 122 | { 123 | font-family: 'slick'; 124 | font-size: 42px !important; 125 | line-height: 1; 126 | 127 | opacity: .75; 128 | color: #8e2957 !important; 129 | /* background-color: black;*/ 130 | 131 | -webkit-font-smoothing: antialiased; 132 | -moz-osx-font-smoothing: grayscale; 133 | } -------------------------------------------------------------------------------- /explore_map_demo/js/plot3.js: -------------------------------------------------------------------------------- 1 | // import './styles.css'; 2 | import { select, selectAll, event } from 'd3-selection'; 3 | import { scaleLinear, scaleTime } from 'd3-scale'; 4 | import { max } from 'd3-array'; 5 | import { brushX } from 'd3-brush'; 6 | import { zoom } from 'd3-zoom'; 7 | 8 | const NOW = Date.now(); 9 | const MINUTE = 1000 * 60; 10 | const HALF_HOUR = MINUTE * 30; 11 | const HOUR = MINUTE * 60; 12 | const COUNT = 100; 13 | 14 | const width = 600; 15 | const height = 200; 16 | const chartExtent = [ 17 | [0, 0], 18 | [width, height] 19 | ]; 20 | 21 | const data = new Array(COUNT) 22 | .fill(true) 23 | .map((_, i) => { 24 | const dateInMs = NOW - i * HOUR; 25 | return { 26 | count: Math.floor(100 * Math.random() + 10), 27 | start: new Date(dateInMs - HALF_HOUR), 28 | mid: new Date(dateInMs), 29 | end: new Date(dateInMs + HALF_HOUR) 30 | }; 31 | }) 32 | .reverse(); 33 | 34 | const origExtent = [data[0].start, data.at(-1).end]; 35 | let selectionExtent = [...origExtent]; 36 | 37 | const xScale = new scaleTime().domain(origExtent).range([0, width]); 38 | let _xScale = xScale.copy(); 39 | 40 | const yScale = new scaleLinear() 41 | .domain([0, max(data, (d) => d.count)]) 42 | .range([height, 0]); 43 | 44 | const isWithingSelection = (datum) => { 45 | const [begin, end] = selectionExtent; 46 | return datum.mid >= begin && datum.mid <= end; 47 | }; 48 | 49 | // Brushing 50 | const brush = brushX().on('brush end', () => { 51 | // console.log(event); 52 | if (event.sourceEvent.type === 'zoom') { 53 | return; 54 | } 55 | if (event.selection === null) { 56 | selectionExtent = origExtent; 57 | return renderBars(); 58 | } 59 | // get x coordinates 60 | const [x0, x1] = event.selection; 61 | // convert to dates 62 | const startDate = _xScale.invert(x0); 63 | const endDate = _xScale.invert(x1); 64 | selectionExtent = [startDate, endDate]; 65 | renderBars(); 66 | }); 67 | select('g.brush').call(brush); 68 | 69 | // Zooming 70 | select('svg').call( 71 | zoom() 72 | .scaleExtent([1, 10]) 73 | .translateExtent(chartExtent) 74 | .extent(chartExtent) 75 | .on('zoom', () => { 76 | const t = event.transform; 77 | 78 | // Update the x scale 79 | _xScale = t.rescaleX(xScale); 80 | 81 | // Apply new range to the bars 82 | selectAll('g.bars rect') 83 | .attr('x', (d) => _xScale(d.start)) 84 | .attr('width', (d) => _xScale(d.end) - _xScale(d.start) - 1); 85 | 86 | // Apply new scale to selection if needed 87 | if ( 88 | selectionExtent[0] !== data[0].start && 89 | selectionExtent[1] !== data.at(-1).end 90 | ) { 91 | // get the brush's x0/x1 92 | const [x0, x1] = selectionExtent.map(xScale); 93 | // rescale the coordinates to the new scale 94 | const _x0 = x0 * t.k + t.x; 95 | const _x1 = x1 * t.k + t.x; 96 | // move the brush 97 | brush.move(select('.brush'), [_x0, _x1]); 98 | } 99 | }) 100 | ); 101 | 102 | // Render bars 103 | function renderBars() { 104 | select('g.bars') 105 | .selectAll('rect') 106 | .data(data) 107 | .join( 108 | (enter) => { 109 | return enter 110 | .append('rect') 111 | .attr('y', (d) => yScale(d.count)) 112 | .attr('height', (d) => yScale(0) - yScale(d.count)) 113 | .attr('x', (d) => xScale(d.start)) 114 | .attr('width', (d) => xScale(d.end) - xScale(d.start) - 1) 115 | .attr('fill', (d) => (isWithingSelection(d) ? 'steelblue' : 'grey')); 116 | }, 117 | (update) => { 118 | return update.attr('fill', (d) => 119 | isWithingSelection(d) ? 'steelblue' : 'grey' 120 | ); 121 | } 122 | ); 123 | } 124 | 125 | renderBars(); 126 | -------------------------------------------------------------------------------- /landing_page/slick/slick-theme.css: -------------------------------------------------------------------------------- 1 | @charset 'UTF-8'; 2 | /* Slider */ 3 | .slick-loading .slick-list 4 | { 5 | background: #fff url('./ajax-loader.gif') center center no-repeat; 6 | } 7 | 8 | /* Icons */ 9 | @font-face 10 | { 11 | font-family: 'slick'; 12 | font-weight: normal; 13 | font-style: normal; 14 | 15 | src: url('./fonts/slick.eot'); 16 | src: url('./fonts/slick.eot?#iefix') format('embedded-opentype'), url('./fonts/slick.woff') format('woff'), url('./fonts/slick.ttf') format('truetype'), url('./fonts/slick.svg#slick') format('svg'); 17 | } 18 | /* Arrows */ 19 | .slick-prev, 20 | .slick-next 21 | { 22 | font-size: 0; 23 | line-height: 0; 24 | 25 | position: absolute; 26 | top: 50%; 27 | 28 | display: block; 29 | 30 | width: 20px; 31 | height: 20px; 32 | padding: 0; 33 | -webkit-transform: translate(0, -50%); 34 | -ms-transform: translate(0, -50%); 35 | transform: translate(0, -50%); 36 | 37 | cursor: pointer; 38 | 39 | color: transparent; 40 | border: none; 41 | outline: none; 42 | background: transparent; 43 | } 44 | .slick-prev:hover, 45 | .slick-prev:focus, 46 | .slick-next:hover, 47 | .slick-next:focus 48 | { 49 | color: transparent; 50 | outline: none; 51 | background: transparent; 52 | } 53 | .slick-prev:hover:before, 54 | .slick-prev:focus:before, 55 | .slick-next:hover:before, 56 | .slick-next:focus:before 57 | { 58 | opacity: 1; 59 | } 60 | .slick-prev.slick-disabled:before, 61 | .slick-next.slick-disabled:before 62 | { 63 | opacity: .25; 64 | } 65 | 66 | .slick-prev:before, 67 | .slick-next:before 68 | { 69 | font-family: 'slick'; 70 | font-size: 20px; 71 | line-height: 1; 72 | 73 | opacity: .75; 74 | color: white; 75 | 76 | -webkit-font-smoothing: antialiased; 77 | -moz-osx-font-smoothing: grayscale; 78 | } 79 | 80 | .slick-prev 81 | { 82 | left: -25px; 83 | } 84 | [dir='rtl'] .slick-prev 85 | { 86 | right: -25px; 87 | left: auto; 88 | } 89 | .slick-prev:before 90 | { 91 | content: '←'; 92 | } 93 | [dir='rtl'] .slick-prev:before 94 | { 95 | content: '→'; 96 | } 97 | 98 | .slick-next 99 | { 100 | right: -25px; 101 | } 102 | [dir='rtl'] .slick-next 103 | { 104 | right: auto; 105 | left: -25px; 106 | } 107 | .slick-next:before 108 | { 109 | content: '→'; 110 | } 111 | [dir='rtl'] .slick-next:before 112 | { 113 | content: '←'; 114 | } 115 | 116 | /* Dots */ 117 | .slick-dotted.slick-slider 118 | { 119 | margin-bottom: 30px; 120 | } 121 | 122 | .slick-dots 123 | { 124 | position: absolute; 125 | bottom: -25px; 126 | 127 | display: block; 128 | 129 | width: 100%; 130 | padding: 0; 131 | margin: 0; 132 | 133 | list-style: none; 134 | 135 | text-align: center; 136 | } 137 | .slick-dots li 138 | { 139 | position: relative; 140 | 141 | display: inline-block; 142 | 143 | width: 20px; 144 | height: 20px; 145 | margin: 0 5px; 146 | padding: 0; 147 | 148 | cursor: pointer; 149 | } 150 | .slick-dots li button 151 | { 152 | font-size: 0; 153 | line-height: 0; 154 | 155 | display: block; 156 | 157 | width: 20px; 158 | height: 20px; 159 | padding: 5px; 160 | 161 | cursor: pointer; 162 | 163 | color: transparent; 164 | border: 0; 165 | outline: none; 166 | background: transparent; 167 | } 168 | .slick-dots li button:hover, 169 | .slick-dots li button:focus 170 | { 171 | outline: none; 172 | } 173 | .slick-dots li button:hover:before, 174 | .slick-dots li button:focus:before 175 | { 176 | opacity: 1; 177 | } 178 | .slick-dots li button:before 179 | { 180 | font-family: 'slick'; 181 | font-size: 6px; 182 | line-height: 20px; 183 | 184 | position: absolute; 185 | top: 0; 186 | left: 0; 187 | 188 | width: 20px; 189 | height: 20px; 190 | 191 | content: '•'; 192 | text-align: center; 193 | 194 | opacity: .25; 195 | color: black; 196 | 197 | -webkit-font-smoothing: antialiased; 198 | -moz-osx-font-smoothing: grayscale; 199 | } 200 | .slick-dots li.slick-active button:before 201 | { 202 | opacity: .75; 203 | color: black; 204 | } 205 | -------------------------------------------------------------------------------- /landing_page/slick/slick-theme.less: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | // Default Variables 4 | 5 | @slick-font-path: "./fonts/"; 6 | @slick-font-family: "slick"; 7 | @slick-loader-path: "./"; 8 | @slick-arrow-color: white; 9 | @slick-dot-color: black; 10 | @slick-dot-color-active: @slick-dot-color; 11 | @slick-prev-character: "←"; 12 | @slick-next-character: "→"; 13 | @slick-dot-character: "•"; 14 | @slick-dot-size: 6px; 15 | @slick-opacity-default: 0.75; 16 | @slick-opacity-on-hover: 1; 17 | @slick-opacity-not-active: 0.25; 18 | 19 | /* Slider */ 20 | .slick-loading .slick-list{ 21 | background: #fff url('@{slick-loader-path}ajax-loader.gif') center center no-repeat; 22 | } 23 | 24 | /* Arrows */ 25 | .slick-prev, 26 | .slick-next { 27 | position: absolute; 28 | display: block; 29 | height: 20px; 30 | width: 20px; 31 | line-height: 0px; 32 | font-size: 0px; 33 | cursor: pointer; 34 | background: transparent; 35 | color: transparent; 36 | top: 50%; 37 | -webkit-transform: translate(0, -50%); 38 | -ms-transform: translate(0, -50%); 39 | transform: translate(0, -50%); 40 | padding: 0; 41 | border: none; 42 | outline: none; 43 | &:hover, &:focus { 44 | outline: none; 45 | background: transparent; 46 | color: transparent; 47 | &:before { 48 | opacity: @slick-opacity-on-hover; 49 | } 50 | } 51 | &.slick-disabled:before { 52 | opacity: @slick-opacity-not-active; 53 | } 54 | } 55 | 56 | .slick-prev:before, .slick-next:before { 57 | font-family: @slick-font-family; 58 | font-size: 20px; 59 | line-height: 1; 60 | color: @slick-arrow-color; 61 | opacity: @slick-opacity-default; 62 | -webkit-font-smoothing: antialiased; 63 | -moz-osx-font-smoothing: grayscale; 64 | 65 | & when ( @slick-font-family = 'slick' ) { 66 | /* Icons */ 67 | @font-face { 68 | font-family: 'slick'; 69 | font-weight: normal; 70 | font-style: normal; 71 | src: url('@{slick-font-path}slick.eot'); 72 | src: url('@{slick-font-path}slick.eot?#iefix') format('embedded-opentype'), url('@{slick-font-path}slick.woff') format('woff'), url('@{slick-font-path}slick.ttf') format('truetype'), url('@{slick-font-path}slick.svg#slick') format('svg'); 73 | } 74 | } 75 | } 76 | 77 | .slick-prev { 78 | left: -25px; 79 | [dir="rtl"] & { 80 | left: auto; 81 | right: -25px; 82 | } 83 | &:before { 84 | content: @slick-prev-character; 85 | [dir="rtl"] & { 86 | content: @slick-next-character; 87 | } 88 | } 89 | } 90 | 91 | .slick-next { 92 | right: -25px; 93 | [dir="rtl"] & { 94 | left: -25px; 95 | right: auto; 96 | } 97 | &:before { 98 | content: @slick-next-character; 99 | [dir="rtl"] & { 100 | content: @slick-prev-character; 101 | } 102 | } 103 | } 104 | 105 | /* Dots */ 106 | 107 | .slick-dotted .slick-slider { 108 | margin-bottom: 30px; 109 | } 110 | 111 | .slick-dots { 112 | position: absolute; 113 | bottom: -25px; 114 | list-style: none; 115 | display: block; 116 | text-align: center; 117 | padding: 0; 118 | margin: 0; 119 | width: 100%; 120 | li { 121 | position: relative; 122 | display: inline-block; 123 | height: 20px; 124 | width: 20px; 125 | margin: 0 5px; 126 | padding: 0; 127 | cursor: pointer; 128 | button { 129 | border: 0; 130 | background: transparent; 131 | display: block; 132 | height: 20px; 133 | width: 20px; 134 | outline: none; 135 | line-height: 0px; 136 | font-size: 0px; 137 | color: transparent; 138 | padding: 5px; 139 | cursor: pointer; 140 | &:hover, &:focus { 141 | outline: none; 142 | &:before { 143 | opacity: @slick-opacity-on-hover; 144 | } 145 | } 146 | &:before { 147 | position: absolute; 148 | top: 0; 149 | left: 0; 150 | content: @slick-dot-character; 151 | width: 20px; 152 | height: 20px; 153 | font-family: @slick-font-family; 154 | font-size: @slick-dot-size; 155 | line-height: 20px; 156 | text-align: center; 157 | color: @slick-dot-color; 158 | opacity: @slick-opacity-not-active; 159 | -webkit-font-smoothing: antialiased; 160 | -moz-osx-font-smoothing: grayscale; 161 | } 162 | } 163 | &.slick-active button:before { 164 | color: @slick-dot-color-active; 165 | opacity: @slick-opacity-default; 166 | } 167 | } 168 | } 169 | -------------------------------------------------------------------------------- /explore_map_demo/js/plot.js: -------------------------------------------------------------------------------- 1 | var svg = d3.select("#timeline__container"), 2 | margin = {top: 0, right: 20, bottom: 10, left: 40}, 3 | width = +svg.attr("width") - margin.left - margin.right, 4 | height = 130 - margin.top - margin.bottom; 5 | 6 | var parseDate = d3.timeParse("%b %Y"); 7 | 8 | var x = d3.scaleTime().range([0, width]), 9 | y = d3.scaleLinear().range([height, 0]); 10 | 11 | var xAxis = d3.axisBottom(x), 12 | yAxis = d3.axisLeft(y); 13 | 14 | var brush = d3.brushX() 15 | .extent([[0, 0], [width, height]]) 16 | .on("brush end", brushed) 17 | .on('end', ramdomizeMarkers); 18 | 19 | var zoom = d3.zoom() 20 | .scaleExtent([1, Infinity]) 21 | .translateExtent([[0, 0], [width, height]]) 22 | .extent([[0, 0], [width, height]]) 23 | .on("zoom", zoomed); 24 | 25 | // var area = d3.area() 26 | // .curve(d3.curveMonotoneX) 27 | // .x(function(d) { return x(d.date); }) 28 | // .y0(height) 29 | // .y1(function(d) { return y(d.price); }); 30 | 31 | var area = d3.area() 32 | .curve(d3.curveMonotoneX) 33 | .x(function(d) { return x(d.date); }) 34 | .y0(height) 35 | .y1(function(d) { return y(d.price); }); 36 | 37 | svg.append("defs").append("clipPath") 38 | .attr("id", "clip") 39 | .append("rect") 40 | .attr("width", width) 41 | .attr("height", height); 42 | 43 | // var focus = svg.append("g") 44 | // .attr("class", "focus") 45 | // .attr("transform", "translate(" + margin.left + "," + margin.top + ")"); 46 | 47 | var context = svg.append("g") 48 | .attr("class", "context") 49 | .attr("transform", "translate(" + margin.left + "," + margin.top + ")"); 50 | 51 | d3.csv("data/sp500.csv", type, function(error, data) { 52 | if (error) throw error; 53 | 54 | x.domain(d3.extent(data, function(d) { return d.date; })); 55 | y.domain([0, d3.max(data, function(d) { return d.price; })]); 56 | // x2.domain(x.domain()); 57 | // y2.domain(y.domain()); 58 | 59 | // focus.append("path") 60 | // .datum(data) 61 | // .attr("class", "area") 62 | // .attr("d", area); 63 | 64 | // focus.append("g") 65 | // .attr("class", "axis axis--x") 66 | // .attr("transform", "translate(0," + height + ")") 67 | // .call(xAxis); 68 | 69 | // focus.append("g") 70 | // .attr("class", "axis axis--y") 71 | // .call(yAxis); 72 | 73 | context.append("path") 74 | .datum(data) 75 | .attr("class", "area") 76 | .attr("d", area); 77 | 78 | context.append("g") 79 | .attr("class", "axis axis--x") 80 | .attr("transform", "translate(0," + height + ")") 81 | .call(xAxis); 82 | 83 | context.append("g") 84 | .attr("class", "brush") 85 | .call(brush) 86 | .call(brush.move, x.range()); 87 | 88 | // svg.append("rect") 89 | // .attr("class", "zoom") 90 | // .attr("width", width) 91 | // .attr("height", height) 92 | // .attr("transform", "translate(" + margin.left + "," + margin.top + ")") 93 | // .call(zoom); 94 | }); 95 | 96 | function brushed() { 97 | console.log('brushed') 98 | if (d3.event.sourceEvent && d3.event.sourceEvent.type === "zoom") return; // ignore brush-by-zoom 99 | var s = d3.event.selection || x.range(); 100 | x.domain(s.map(x.invert, x)); 101 | // focus.select(".area").attr("d", area); 102 | // focus.select(".axis--x").call(xAxis); 103 | // console.log(x.invert(d3.brushSelection(this)[0])) 104 | svg.select(".zoom").call(zoom.transform, d3.zoomIdentity 105 | .scale(width / (s[1] - s[0])) 106 | .translate(-s[0], 0)); 107 | } 108 | 109 | function zoomed() { 110 | if (d3.event.sourceEvent && d3.event.sourceEvent.type === "brush") return; // ignore zoom-by-brush 111 | var t = d3.event.transform; 112 | x.domain(t.rescaleX(x).domain()); 113 | // focus.select(".area").attr("d", area); 114 | // focus.select(".axis--x").call(xAxis); 115 | context.select(".brush").call(brush.move, x.range().map(t.invertX, t)); 116 | } 117 | 118 | function type(d) { 119 | d.date = parseDate(d.date); 120 | d.price = +d.price; 121 | return d; 122 | } 123 | 124 | function ramdomizeMarkers(){ 125 | console.log('ramdomizeMarkers') 126 | // map.removeLayer(markers); 127 | markers.clearLayers(); 128 | // var markers = L.markerClusterGroup(); 129 | 130 | for (let i=0; i<10; i++) { 131 | var popup = 'markers[i].name' + 132 | '
' + 'markers[i].city' + 133 | '
IATA/FAA: ' + 'markers[i].iata_faa' + 134 | '
ICAO: ' + 'markers[i].icao' + 135 | '
Altitude: ' + 'Math.round( markers[i].alt * 0.3048 )' + ' m' + 136 | '
Timezone: ' + 'markers[i].tz'; 137 | const marker = L.marker([ 138 | getRandom(0, 100), 139 | getRandom(-100, 100) 140 | ]).bindPopup( popup ) 141 | markers.addLayer(marker) 142 | } 143 | map.addLayer(markers); 144 | } -------------------------------------------------------------------------------- /explore_map_demo/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Diary 365 15 | 16 | 17 | 18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | 27 | 28 | 29 | 30 | 31 |
32 |
33 | 34 |
35 | 36 |
37 |
38 |

To view information about the diaries, click on a marker on the map.

39 |
40 |
41 |
42 |
43 | 44 |
45 |
46 |

To view information about the diaries, click on a marker on the map.

47 |
48 |
49 |
50 |
51 | 52 |
53 |
54 | Topic of diary: 55 | 62 | Emotions in diary: 63 | 76 | Age of the writer: 77 | 84 | Gender of the writer: 85 | 91 |
92 | Apply filters 93 | Reset filters 94 |
95 | 96 |
97 |
98 |
99 |
100 | Reset
selection
101 |
102 |
103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | -------------------------------------------------------------------------------- /landing_page/slick/slick-theme.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | // Default Variables 4 | 5 | // Slick icon entity codes outputs the following 6 | // "\2190" outputs ascii character "←" 7 | // "\2192" outputs ascii character "→" 8 | // "\2022" outputs ascii character "•" 9 | 10 | $slick-font-path: "./fonts/" !default; 11 | $slick-font-family: "slick" !default; 12 | $slick-loader-path: "./" !default; 13 | $slick-arrow-color: white !default; 14 | $slick-dot-color: black !default; 15 | $slick-dot-color-active: $slick-dot-color !default; 16 | $slick-prev-character: "\2190" !default; 17 | $slick-next-character: "\2192" !default; 18 | $slick-dot-character: "\2022" !default; 19 | $slick-dot-size: 6px !default; 20 | $slick-opacity-default: 0.75 !default; 21 | $slick-opacity-on-hover: 1 !default; 22 | $slick-opacity-not-active: 0.25 !default; 23 | 24 | @function slick-image-url($url) { 25 | @if function-exists(image-url) { 26 | @return image-url($url); 27 | } 28 | @else { 29 | @return url($slick-loader-path + $url); 30 | } 31 | } 32 | 33 | @function slick-font-url($url) { 34 | @if function-exists(font-url) { 35 | @return font-url($url); 36 | } 37 | @else { 38 | @return url($slick-font-path + $url); 39 | } 40 | } 41 | 42 | /* Slider */ 43 | 44 | .slick-list { 45 | .slick-loading & { 46 | background: #fff slick-image-url("ajax-loader.gif") center center no-repeat; 47 | } 48 | } 49 | 50 | /* Icons */ 51 | @if $slick-font-family == "slick" { 52 | @font-face { 53 | font-family: "slick"; 54 | src: slick-font-url("slick.eot"); 55 | src: slick-font-url("slick.eot?#iefix") format("embedded-opentype"), slick-font-url("slick.woff") format("woff"), slick-font-url("slick.ttf") format("truetype"), slick-font-url("slick.svg#slick") format("svg"); 56 | font-weight: normal; 57 | font-style: normal; 58 | } 59 | } 60 | 61 | /* Arrows */ 62 | 63 | .slick-prev, 64 | .slick-next { 65 | position: absolute; 66 | display: block; 67 | height: 20px; 68 | width: 20px; 69 | line-height: 0px; 70 | font-size: 0px; 71 | cursor: pointer; 72 | background: transparent; 73 | color: transparent; 74 | top: 50%; 75 | -webkit-transform: translate(0, -50%); 76 | -ms-transform: translate(0, -50%); 77 | transform: translate(0, -50%); 78 | padding: 0; 79 | border: none; 80 | outline: none; 81 | &:hover, &:focus { 82 | outline: none; 83 | background: transparent; 84 | color: transparent; 85 | &:before { 86 | opacity: $slick-opacity-on-hover; 87 | } 88 | } 89 | &.slick-disabled:before { 90 | opacity: $slick-opacity-not-active; 91 | } 92 | &:before { 93 | font-family: $slick-font-family; 94 | font-size: 20px; 95 | line-height: 1; 96 | color: $slick-arrow-color; 97 | opacity: $slick-opacity-default; 98 | -webkit-font-smoothing: antialiased; 99 | -moz-osx-font-smoothing: grayscale; 100 | } 101 | } 102 | 103 | .slick-prev { 104 | left: -25px; 105 | [dir="rtl"] & { 106 | left: auto; 107 | right: -25px; 108 | } 109 | &:before { 110 | content: $slick-prev-character; 111 | [dir="rtl"] & { 112 | content: $slick-next-character; 113 | } 114 | } 115 | } 116 | 117 | .slick-next { 118 | right: -25px; 119 | [dir="rtl"] & { 120 | left: -25px; 121 | right: auto; 122 | } 123 | &:before { 124 | content: $slick-next-character; 125 | [dir="rtl"] & { 126 | content: $slick-prev-character; 127 | } 128 | } 129 | } 130 | 131 | /* Dots */ 132 | 133 | .slick-dotted.slick-slider { 134 | margin-bottom: 30px; 135 | } 136 | 137 | .slick-dots { 138 | position: absolute; 139 | bottom: -25px; 140 | list-style: none; 141 | display: block; 142 | text-align: center; 143 | padding: 0; 144 | margin: 0; 145 | width: 100%; 146 | li { 147 | position: relative; 148 | display: inline-block; 149 | height: 20px; 150 | width: 20px; 151 | margin: 0 5px; 152 | padding: 0; 153 | cursor: pointer; 154 | button { 155 | border: 0; 156 | background: transparent; 157 | display: block; 158 | height: 20px; 159 | width: 20px; 160 | outline: none; 161 | line-height: 0px; 162 | font-size: 0px; 163 | color: transparent; 164 | padding: 5px; 165 | cursor: pointer; 166 | &:hover, &:focus { 167 | outline: none; 168 | &:before { 169 | opacity: $slick-opacity-on-hover; 170 | } 171 | } 172 | &:before { 173 | position: absolute; 174 | top: 0; 175 | left: 0; 176 | content: $slick-dot-character; 177 | width: 20px; 178 | height: 20px; 179 | font-family: $slick-font-family; 180 | font-size: $slick-dot-size; 181 | line-height: 20px; 182 | text-align: center; 183 | color: $slick-dot-color; 184 | opacity: $slick-opacity-not-active; 185 | -webkit-font-smoothing: antialiased; 186 | -moz-osx-font-smoothing: grayscale; 187 | } 188 | } 189 | &.slick-active button:before { 190 | color: $slick-dot-color-active; 191 | opacity: $slick-opacity-default; 192 | } 193 | } 194 | } 195 | -------------------------------------------------------------------------------- /landing_page/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 365.diary 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 29 |
30 | 35 |
36 | 37 |
38 | 39 |
40 | 43 |
44 | 45 |
46 | 47 |
48 |
49 |
50 | 51 | 52 |
53 | 54 |
55 |

56 |
57 | 58 | 59 |
60 | 61 |
62 | 63 |

64 |
65 |
66 | 69 |
70 |
71 |
72 | 73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 | 92 | 95 |
96 |
97 | 98 | 101 |
102 |
103 |
104 |
105 |
106 |
107 | 112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 | 124 |
125 |
126 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | -------------------------------------------------------------------------------- /explore_map_demo/css/leaflet.css: -------------------------------------------------------------------------------- 1 | /* required styles */ 2 | 3 | .leaflet-map-pane, 4 | .leaflet-tile, 5 | .leaflet-marker-icon, 6 | .leaflet-marker-shadow, 7 | .leaflet-tile-pane, 8 | .leaflet-tile-container, 9 | .leaflet-overlay-pane, 10 | .leaflet-shadow-pane, 11 | .leaflet-marker-pane, 12 | .leaflet-popup-pane, 13 | .leaflet-overlay-pane svg, 14 | .leaflet-zoom-box, 15 | .leaflet-image-layer, 16 | .leaflet-layer { 17 | position: absolute; 18 | left: 0; 19 | top: 0; 20 | } 21 | .leaflet-container { 22 | overflow: hidden; 23 | -ms-touch-action: none; 24 | } 25 | .leaflet-tile, 26 | .leaflet-marker-icon, 27 | .leaflet-marker-shadow { 28 | -webkit-user-select: none; 29 | -moz-user-select: none; 30 | user-select: none; 31 | -webkit-user-drag: none; 32 | } 33 | .leaflet-marker-icon, 34 | .leaflet-marker-shadow { 35 | display: block; 36 | } 37 | /* map is broken in FF if you have max-width: 100% on tiles */ 38 | .leaflet-container img { 39 | max-width: none !important; 40 | } 41 | /* stupid Android 2 doesn't understand "max-width: none" properly */ 42 | .leaflet-container img.leaflet-image-layer { 43 | max-width: 15000px !important; 44 | } 45 | .leaflet-tile { 46 | filter: inherit; 47 | visibility: hidden; 48 | } 49 | .leaflet-tile-loaded { 50 | visibility: inherit; 51 | } 52 | .leaflet-zoom-box { 53 | width: 0; 54 | height: 0; 55 | } 56 | /* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */ 57 | .leaflet-overlay-pane svg { 58 | -moz-user-select: none; 59 | } 60 | 61 | .leaflet-tile-pane { z-index: 2; } 62 | .leaflet-objects-pane { z-index: 3; } 63 | .leaflet-overlay-pane { z-index: 4; } 64 | .leaflet-shadow-pane { z-index: 5; } 65 | .leaflet-marker-pane { z-index: 6; } 66 | .leaflet-popup-pane { z-index: 7; } 67 | 68 | .leaflet-vml-shape { 69 | width: 1px; 70 | height: 1px; 71 | } 72 | .lvml { 73 | behavior: url(#default#VML); 74 | display: inline-block; 75 | position: absolute; 76 | } 77 | 78 | 79 | /* control positioning */ 80 | 81 | .leaflet-control { 82 | position: relative; 83 | z-index: 7; 84 | pointer-events: auto; 85 | } 86 | .leaflet-top, 87 | .leaflet-bottom { 88 | position: absolute; 89 | z-index: 1000; 90 | pointer-events: none; 91 | } 92 | .leaflet-top { 93 | top: 0; 94 | } 95 | .leaflet-right { 96 | right: 0; 97 | } 98 | .leaflet-bottom { 99 | bottom: 0; 100 | } 101 | .leaflet-left { 102 | left: 0; 103 | } 104 | .leaflet-control { 105 | float: left; 106 | clear: both; 107 | } 108 | .leaflet-right .leaflet-control { 109 | float: right; 110 | } 111 | .leaflet-top .leaflet-control { 112 | margin-top: 10px; 113 | } 114 | .leaflet-bottom .leaflet-control { 115 | margin-bottom: 10px; 116 | } 117 | .leaflet-left .leaflet-control { 118 | margin-left: 10px; 119 | } 120 | .leaflet-right .leaflet-control { 121 | margin-right: 10px; 122 | } 123 | 124 | 125 | /* zoom and fade animations */ 126 | 127 | .leaflet-fade-anim .leaflet-tile, 128 | .leaflet-fade-anim .leaflet-popup { 129 | opacity: 0; 130 | -webkit-transition: opacity 0.2s linear; 131 | -moz-transition: opacity 0.2s linear; 132 | -o-transition: opacity 0.2s linear; 133 | transition: opacity 0.2s linear; 134 | } 135 | .leaflet-fade-anim .leaflet-tile-loaded, 136 | .leaflet-fade-anim .leaflet-map-pane .leaflet-popup { 137 | opacity: 1; 138 | } 139 | 140 | .leaflet-zoom-anim .leaflet-zoom-animated { 141 | -webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1); 142 | -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1); 143 | -o-transition: -o-transform 0.25s cubic-bezier(0,0,0.25,1); 144 | transition: transform 0.25s cubic-bezier(0,0,0.25,1); 145 | } 146 | .leaflet-zoom-anim .leaflet-tile, 147 | .leaflet-pan-anim .leaflet-tile, 148 | .leaflet-touching .leaflet-zoom-animated { 149 | -webkit-transition: none; 150 | -moz-transition: none; 151 | -o-transition: none; 152 | transition: none; 153 | } 154 | 155 | .leaflet-zoom-anim .leaflet-zoom-hide { 156 | visibility: hidden; 157 | } 158 | 159 | 160 | /* cursors */ 161 | 162 | .leaflet-clickable { 163 | cursor: pointer; 164 | } 165 | .leaflet-container { 166 | cursor: -webkit-grab; 167 | cursor: -moz-grab; 168 | } 169 | .leaflet-popup-pane, 170 | .leaflet-control { 171 | cursor: auto; 172 | } 173 | .leaflet-dragging .leaflet-container, 174 | .leaflet-dragging .leaflet-clickable { 175 | cursor: move; 176 | cursor: -webkit-grabbing; 177 | cursor: -moz-grabbing; 178 | } 179 | 180 | 181 | /* visual tweaks */ 182 | 183 | .leaflet-container { 184 | background: #ddd; 185 | outline: 0; 186 | } 187 | .leaflet-container a { 188 | color: #0078A8; 189 | } 190 | .leaflet-container a.leaflet-active { 191 | outline: 2px solid orange; 192 | } 193 | .leaflet-zoom-box { 194 | border: 2px dotted #38f; 195 | background: rgba(255,255,255,0.5); 196 | } 197 | 198 | 199 | /* general typography */ 200 | .leaflet-container { 201 | font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif; 202 | } 203 | 204 | 205 | /* general toolbar styles */ 206 | 207 | .leaflet-bar { 208 | box-shadow: 0 1px 5px rgba(0,0,0,0.65); 209 | border-radius: 4px; 210 | } 211 | .leaflet-bar a, 212 | .leaflet-bar a:hover { 213 | background-color: #fff; 214 | border-bottom: 1px solid #ccc; 215 | width: 26px; 216 | height: 26px; 217 | line-height: 26px; 218 | display: block; 219 | text-align: center; 220 | text-decoration: none; 221 | color: black; 222 | } 223 | .leaflet-bar a, 224 | .leaflet-control-layers-toggle { 225 | background-position: 50% 50%; 226 | background-repeat: no-repeat; 227 | display: block; 228 | } 229 | .leaflet-bar a:hover { 230 | background-color: #f4f4f4; 231 | } 232 | .leaflet-bar a:first-child { 233 | border-top-left-radius: 4px; 234 | border-top-right-radius: 4px; 235 | } 236 | .leaflet-bar a:last-child { 237 | border-bottom-left-radius: 4px; 238 | border-bottom-right-radius: 4px; 239 | border-bottom: none; 240 | } 241 | .leaflet-bar a.leaflet-disabled { 242 | cursor: default; 243 | background-color: #f4f4f4; 244 | color: #bbb; 245 | } 246 | 247 | .leaflet-touch .leaflet-bar a { 248 | width: 30px; 249 | height: 30px; 250 | line-height: 30px; 251 | } 252 | 253 | 254 | /* zoom control */ 255 | 256 | .leaflet-control-zoom-in, 257 | .leaflet-control-zoom-out { 258 | font: bold 18px 'Lucida Console', Monaco, monospace; 259 | text-indent: 1px; 260 | } 261 | .leaflet-control-zoom-out { 262 | font-size: 20px; 263 | } 264 | 265 | .leaflet-touch .leaflet-control-zoom-in { 266 | font-size: 22px; 267 | } 268 | .leaflet-touch .leaflet-control-zoom-out { 269 | font-size: 24px; 270 | } 271 | 272 | 273 | /* layers control */ 274 | 275 | .leaflet-control-layers { 276 | box-shadow: 0 1px 5px rgba(0,0,0,0.4); 277 | background: #fff; 278 | border-radius: 5px; 279 | } 280 | .leaflet-control-layers-toggle { 281 | background-image: url(images/layers.png); 282 | width: 36px; 283 | height: 36px; 284 | } 285 | .leaflet-retina .leaflet-control-layers-toggle { 286 | background-image: url(images/layers-2x.png); 287 | background-size: 26px 26px; 288 | } 289 | .leaflet-touch .leaflet-control-layers-toggle { 290 | width: 44px; 291 | height: 44px; 292 | } 293 | .leaflet-control-layers .leaflet-control-layers-list, 294 | .leaflet-control-layers-expanded .leaflet-control-layers-toggle { 295 | display: none; 296 | } 297 | .leaflet-control-layers-expanded .leaflet-control-layers-list { 298 | display: block; 299 | position: relative; 300 | } 301 | .leaflet-control-layers-expanded { 302 | padding: 6px 10px 6px 6px; 303 | color: #333; 304 | background: #fff; 305 | } 306 | .leaflet-control-layers-selector { 307 | margin-top: 2px; 308 | position: relative; 309 | top: 1px; 310 | } 311 | .leaflet-control-layers label { 312 | display: block; 313 | } 314 | .leaflet-control-layers-separator { 315 | height: 0; 316 | border-top: 1px solid #ddd; 317 | margin: 5px -10px 5px -6px; 318 | } 319 | 320 | 321 | /* attribution and scale controls */ 322 | 323 | .leaflet-container .leaflet-control-attribution { 324 | background: #fff; 325 | background: rgba(255, 255, 255, 0.7); 326 | margin: 0; 327 | } 328 | .leaflet-control-attribution, 329 | .leaflet-control-scale-line { 330 | padding: 0 5px; 331 | color: #333; 332 | } 333 | .leaflet-control-attribution a { 334 | text-decoration: none; 335 | } 336 | .leaflet-control-attribution a:hover { 337 | text-decoration: underline; 338 | } 339 | .leaflet-container .leaflet-control-attribution, 340 | .leaflet-container .leaflet-control-scale { 341 | font-size: 11px; 342 | } 343 | .leaflet-left .leaflet-control-scale { 344 | margin-left: 5px; 345 | } 346 | .leaflet-bottom .leaflet-control-scale { 347 | margin-bottom: 5px; 348 | } 349 | .leaflet-control-scale-line { 350 | border: 2px solid #777; 351 | border-top: none; 352 | line-height: 1.1; 353 | padding: 2px 5px 1px; 354 | font-size: 11px; 355 | white-space: nowrap; 356 | overflow: hidden; 357 | -moz-box-sizing: content-box; 358 | box-sizing: content-box; 359 | 360 | background: #fff; 361 | background: rgba(255, 255, 255, 0.5); 362 | } 363 | .leaflet-control-scale-line:not(:first-child) { 364 | border-top: 2px solid #777; 365 | border-bottom: none; 366 | margin-top: -2px; 367 | } 368 | .leaflet-control-scale-line:not(:first-child):not(:last-child) { 369 | border-bottom: 2px solid #777; 370 | } 371 | 372 | .leaflet-touch .leaflet-control-attribution, 373 | .leaflet-touch .leaflet-control-layers, 374 | .leaflet-touch .leaflet-bar { 375 | box-shadow: none; 376 | } 377 | .leaflet-touch .leaflet-control-layers, 378 | .leaflet-touch .leaflet-bar { 379 | border: 2px solid rgba(0,0,0,0.2); 380 | background-clip: padding-box; 381 | } 382 | 383 | 384 | /* popup */ 385 | 386 | .leaflet-popup { 387 | position: absolute; 388 | text-align: center; 389 | } 390 | .leaflet-popup-content-wrapper { 391 | padding: 1px; 392 | text-align: left; 393 | border-radius: 12px; 394 | } 395 | .leaflet-popup-content { 396 | margin: 13px 19px; 397 | line-height: 1.4; 398 | } 399 | .leaflet-popup-content p { 400 | margin: 18px 0; 401 | } 402 | .leaflet-popup-tip-container { 403 | margin: 0 auto; 404 | width: 40px; 405 | height: 20px; 406 | position: relative; 407 | overflow: hidden; 408 | } 409 | .leaflet-popup-tip { 410 | width: 17px; 411 | height: 17px; 412 | padding: 1px; 413 | 414 | margin: -10px auto 0; 415 | 416 | -webkit-transform: rotate(45deg); 417 | -moz-transform: rotate(45deg); 418 | -ms-transform: rotate(45deg); 419 | -o-transform: rotate(45deg); 420 | transform: rotate(45deg); 421 | } 422 | .leaflet-popup-content-wrapper, 423 | .leaflet-popup-tip { 424 | background: white; 425 | 426 | box-shadow: 0 3px 14px rgba(0,0,0,0.4); 427 | } 428 | .leaflet-container a.leaflet-popup-close-button { 429 | position: absolute; 430 | top: 0; 431 | right: 0; 432 | padding: 4px 4px 0 0; 433 | text-align: center; 434 | width: 18px; 435 | height: 14px; 436 | font: 16px/14px Tahoma, Verdana, sans-serif; 437 | color: #c3c3c3; 438 | text-decoration: none; 439 | font-weight: bold; 440 | background: transparent; 441 | } 442 | .leaflet-container a.leaflet-popup-close-button:hover { 443 | color: #999; 444 | } 445 | .leaflet-popup-scrolled { 446 | overflow: auto; 447 | border-bottom: 1px solid #ddd; 448 | border-top: 1px solid #ddd; 449 | } 450 | 451 | .leaflet-oldie .leaflet-popup-content-wrapper { 452 | zoom: 1; 453 | } 454 | .leaflet-oldie .leaflet-popup-tip { 455 | width: 24px; 456 | margin: 0 auto; 457 | 458 | -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)"; 459 | filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678); 460 | } 461 | .leaflet-oldie .leaflet-popup-tip-container { 462 | margin-top: -1px; 463 | } 464 | 465 | .leaflet-oldie .leaflet-control-zoom, 466 | .leaflet-oldie .leaflet-control-layers, 467 | .leaflet-oldie .leaflet-popup-content-wrapper, 468 | .leaflet-oldie .leaflet-popup-tip { 469 | border: 1px solid #999; 470 | } 471 | 472 | 473 | /* div icon */ 474 | 475 | .leaflet-div-icon { 476 | background: #fff; 477 | border: 1px solid #666; 478 | } -------------------------------------------------------------------------------- /landing_page/css/leaflet.css: -------------------------------------------------------------------------------- 1 | /* required styles */ 2 | 3 | .leaflet-map-pane, 4 | .leaflet-tile, 5 | .leaflet-marker-icon, 6 | .leaflet-marker-shadow, 7 | .leaflet-tile-pane, 8 | .leaflet-tile-container, 9 | .leaflet-overlay-pane, 10 | .leaflet-shadow-pane, 11 | .leaflet-marker-pane, 12 | .leaflet-popup-pane, 13 | .leaflet-overlay-pane svg, 14 | .leaflet-zoom-box, 15 | .leaflet-image-layer, 16 | .leaflet-layer { 17 | position: absolute; 18 | left: 0; 19 | top: 0; 20 | } 21 | .leaflet-container { 22 | overflow: hidden; 23 | -ms-touch-action: none; 24 | } 25 | .leaflet-tile, 26 | .leaflet-marker-icon, 27 | .leaflet-marker-shadow { 28 | -webkit-user-select: none; 29 | -moz-user-select: none; 30 | user-select: none; 31 | -webkit-user-drag: none; 32 | } 33 | .leaflet-marker-icon, 34 | .leaflet-marker-shadow { 35 | display: block; 36 | } 37 | /* map is broken in FF if you have max-width: 100% on tiles */ 38 | .leaflet-container img { 39 | max-width: none !important; 40 | } 41 | /* stupid Android 2 doesn't understand "max-width: none" properly */ 42 | .leaflet-container img.leaflet-image-layer { 43 | max-width: 15000px !important; 44 | } 45 | .leaflet-tile { 46 | filter: inherit; 47 | visibility: hidden; 48 | } 49 | .leaflet-tile-loaded { 50 | visibility: inherit; 51 | } 52 | .leaflet-zoom-box { 53 | width: 0; 54 | height: 0; 55 | } 56 | /* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */ 57 | .leaflet-overlay-pane svg { 58 | -moz-user-select: none; 59 | } 60 | 61 | .leaflet-tile-pane { z-index: 2; } 62 | .leaflet-objects-pane { z-index: 3; } 63 | .leaflet-overlay-pane { z-index: 4; } 64 | .leaflet-shadow-pane { z-index: 5; } 65 | .leaflet-marker-pane { z-index: 6; } 66 | .leaflet-popup-pane { z-index: 7; } 67 | 68 | .leaflet-vml-shape { 69 | width: 1px; 70 | height: 1px; 71 | } 72 | .lvml { 73 | behavior: url(#default#VML); 74 | display: inline-block; 75 | position: absolute; 76 | } 77 | 78 | 79 | /* control positioning */ 80 | 81 | .leaflet-control { 82 | position: relative; 83 | z-index: 7; 84 | pointer-events: auto; 85 | } 86 | .leaflet-top, 87 | .leaflet-bottom { 88 | position: absolute; 89 | z-index: 1000; 90 | pointer-events: none; 91 | } 92 | .leaflet-top { 93 | top: 0; 94 | } 95 | .leaflet-right { 96 | right: 0; 97 | } 98 | .leaflet-bottom { 99 | bottom: 0; 100 | } 101 | .leaflet-left { 102 | left: 0; 103 | } 104 | .leaflet-control { 105 | float: left; 106 | clear: both; 107 | } 108 | .leaflet-right .leaflet-control { 109 | float: right; 110 | } 111 | .leaflet-top .leaflet-control { 112 | margin-top: 10px; 113 | } 114 | .leaflet-bottom .leaflet-control { 115 | margin-bottom: 10px; 116 | } 117 | .leaflet-left .leaflet-control { 118 | margin-left: 10px; 119 | } 120 | .leaflet-right .leaflet-control { 121 | margin-right: 10px; 122 | } 123 | 124 | 125 | /* zoom and fade animations */ 126 | 127 | .leaflet-fade-anim .leaflet-tile, 128 | .leaflet-fade-anim .leaflet-popup { 129 | opacity: 0; 130 | -webkit-transition: opacity 0.2s linear; 131 | -moz-transition: opacity 0.2s linear; 132 | -o-transition: opacity 0.2s linear; 133 | transition: opacity 0.2s linear; 134 | } 135 | .leaflet-fade-anim .leaflet-tile-loaded, 136 | .leaflet-fade-anim .leaflet-map-pane .leaflet-popup { 137 | opacity: 1; 138 | } 139 | 140 | .leaflet-zoom-anim .leaflet-zoom-animated { 141 | -webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1); 142 | -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1); 143 | -o-transition: -o-transform 0.25s cubic-bezier(0,0,0.25,1); 144 | transition: transform 0.25s cubic-bezier(0,0,0.25,1); 145 | } 146 | .leaflet-zoom-anim .leaflet-tile, 147 | .leaflet-pan-anim .leaflet-tile, 148 | .leaflet-touching .leaflet-zoom-animated { 149 | -webkit-transition: none; 150 | -moz-transition: none; 151 | -o-transition: none; 152 | transition: none; 153 | } 154 | 155 | .leaflet-zoom-anim .leaflet-zoom-hide { 156 | visibility: hidden; 157 | } 158 | 159 | 160 | /* cursors */ 161 | 162 | .leaflet-clickable { 163 | cursor: pointer; 164 | } 165 | .leaflet-container { 166 | cursor: -webkit-grab; 167 | cursor: -moz-grab; 168 | } 169 | .leaflet-popup-pane, 170 | .leaflet-control { 171 | cursor: auto; 172 | } 173 | .leaflet-dragging .leaflet-container, 174 | .leaflet-dragging .leaflet-clickable { 175 | cursor: move; 176 | cursor: -webkit-grabbing; 177 | cursor: -moz-grabbing; 178 | } 179 | 180 | 181 | /* visual tweaks */ 182 | 183 | .leaflet-container { 184 | background: #ddd; 185 | outline: 0; 186 | } 187 | .leaflet-container a { 188 | color: #0078A8; 189 | } 190 | .leaflet-container a.leaflet-active { 191 | outline: 2px solid orange; 192 | } 193 | .leaflet-zoom-box { 194 | border: 2px dotted #38f; 195 | background: rgba(255,255,255,0.5); 196 | } 197 | 198 | 199 | /* general typography */ 200 | .leaflet-container { 201 | font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif; 202 | } 203 | 204 | 205 | /* general toolbar styles */ 206 | 207 | .leaflet-bar { 208 | box-shadow: 0 1px 5px rgba(0,0,0,0.65); 209 | border-radius: 4px; 210 | } 211 | .leaflet-bar a, 212 | .leaflet-bar a:hover { 213 | background-color: #fff; 214 | border-bottom: 1px solid #ccc; 215 | width: 26px; 216 | height: 26px; 217 | line-height: 26px; 218 | display: block; 219 | text-align: center; 220 | text-decoration: none; 221 | color: black; 222 | } 223 | .leaflet-bar a, 224 | .leaflet-control-layers-toggle { 225 | background-position: 50% 50%; 226 | background-repeat: no-repeat; 227 | display: block; 228 | } 229 | .leaflet-bar a:hover { 230 | background-color: #f4f4f4; 231 | } 232 | .leaflet-bar a:first-child { 233 | border-top-left-radius: 4px; 234 | border-top-right-radius: 4px; 235 | } 236 | .leaflet-bar a:last-child { 237 | border-bottom-left-radius: 4px; 238 | border-bottom-right-radius: 4px; 239 | border-bottom: none; 240 | } 241 | .leaflet-bar a.leaflet-disabled { 242 | cursor: default; 243 | background-color: #f4f4f4; 244 | color: #bbb; 245 | } 246 | 247 | .leaflet-touch .leaflet-bar a { 248 | width: 30px; 249 | height: 30px; 250 | line-height: 30px; 251 | } 252 | 253 | 254 | /* zoom control */ 255 | 256 | .leaflet-control-zoom-in, 257 | .leaflet-control-zoom-out { 258 | font: bold 18px 'Lucida Console', Monaco, monospace; 259 | text-indent: 1px; 260 | } 261 | .leaflet-control-zoom-out { 262 | font-size: 20px; 263 | } 264 | 265 | .leaflet-touch .leaflet-control-zoom-in { 266 | font-size: 22px; 267 | } 268 | .leaflet-touch .leaflet-control-zoom-out { 269 | font-size: 24px; 270 | } 271 | 272 | 273 | /* layers control */ 274 | 275 | .leaflet-control-layers { 276 | box-shadow: 0 1px 5px rgba(0,0,0,0.4); 277 | background: #fff; 278 | border-radius: 5px; 279 | } 280 | .leaflet-control-layers-toggle { 281 | background-image: url(images/layers.png); 282 | width: 36px; 283 | height: 36px; 284 | } 285 | .leaflet-retina .leaflet-control-layers-toggle { 286 | background-image: url(images/layers-2x.png); 287 | background-size: 26px 26px; 288 | } 289 | .leaflet-touch .leaflet-control-layers-toggle { 290 | width: 44px; 291 | height: 44px; 292 | } 293 | .leaflet-control-layers .leaflet-control-layers-list, 294 | .leaflet-control-layers-expanded .leaflet-control-layers-toggle { 295 | display: none; 296 | } 297 | .leaflet-control-layers-expanded .leaflet-control-layers-list { 298 | display: block; 299 | position: relative; 300 | } 301 | .leaflet-control-layers-expanded { 302 | padding: 6px 10px 6px 6px; 303 | color: #333; 304 | background: #fff; 305 | } 306 | .leaflet-control-layers-selector { 307 | margin-top: 2px; 308 | position: relative; 309 | top: 1px; 310 | } 311 | .leaflet-control-layers label { 312 | display: block; 313 | } 314 | .leaflet-control-layers-separator { 315 | height: 0; 316 | border-top: 1px solid #ddd; 317 | margin: 5px -10px 5px -6px; 318 | } 319 | 320 | 321 | /* attribution and scale controls */ 322 | 323 | .leaflet-container .leaflet-control-attribution { 324 | background: #fff; 325 | background: rgba(255, 255, 255, 0.7); 326 | margin: 0; 327 | } 328 | .leaflet-control-attribution, 329 | .leaflet-control-scale-line { 330 | padding: 0 5px; 331 | color: #333; 332 | } 333 | .leaflet-control-attribution a { 334 | text-decoration: none; 335 | } 336 | .leaflet-control-attribution a:hover { 337 | text-decoration: underline; 338 | } 339 | .leaflet-container .leaflet-control-attribution, 340 | .leaflet-container .leaflet-control-scale { 341 | font-size: 11px; 342 | } 343 | .leaflet-left .leaflet-control-scale { 344 | margin-left: 5px; 345 | } 346 | .leaflet-bottom .leaflet-control-scale { 347 | margin-bottom: 5px; 348 | } 349 | .leaflet-control-scale-line { 350 | border: 2px solid #777; 351 | border-top: none; 352 | line-height: 1.1; 353 | padding: 2px 5px 1px; 354 | font-size: 11px; 355 | white-space: nowrap; 356 | overflow: hidden; 357 | -moz-box-sizing: content-box; 358 | box-sizing: content-box; 359 | 360 | background: #fff; 361 | background: rgba(255, 255, 255, 0.5); 362 | } 363 | .leaflet-control-scale-line:not(:first-child) { 364 | border-top: 2px solid #777; 365 | border-bottom: none; 366 | margin-top: -2px; 367 | } 368 | .leaflet-control-scale-line:not(:first-child):not(:last-child) { 369 | border-bottom: 2px solid #777; 370 | } 371 | 372 | .leaflet-touch .leaflet-control-attribution, 373 | .leaflet-touch .leaflet-control-layers, 374 | .leaflet-touch .leaflet-bar { 375 | box-shadow: none; 376 | } 377 | .leaflet-touch .leaflet-control-layers, 378 | .leaflet-touch .leaflet-bar { 379 | border: 2px solid rgba(0,0,0,0.2); 380 | background-clip: padding-box; 381 | } 382 | 383 | 384 | /* popup */ 385 | 386 | .leaflet-popup { 387 | position: absolute; 388 | text-align: center; 389 | } 390 | .leaflet-popup-content-wrapper { 391 | padding: 1px; 392 | text-align: left; 393 | border-radius: 12px; 394 | } 395 | .leaflet-popup-content { 396 | margin: 13px 19px; 397 | line-height: 1.4; 398 | } 399 | .leaflet-popup-content p { 400 | margin: 18px 0; 401 | } 402 | .leaflet-popup-tip-container { 403 | margin: 0 auto; 404 | width: 40px; 405 | height: 20px; 406 | position: relative; 407 | overflow: hidden; 408 | } 409 | .leaflet-popup-tip { 410 | width: 17px; 411 | height: 17px; 412 | padding: 1px; 413 | 414 | margin: -10px auto 0; 415 | 416 | -webkit-transform: rotate(45deg); 417 | -moz-transform: rotate(45deg); 418 | -ms-transform: rotate(45deg); 419 | -o-transform: rotate(45deg); 420 | transform: rotate(45deg); 421 | } 422 | .leaflet-popup-content-wrapper, 423 | .leaflet-popup-tip { 424 | background: white; 425 | 426 | box-shadow: 0 3px 14px rgba(0,0,0,0.4); 427 | } 428 | .leaflet-container a.leaflet-popup-close-button { 429 | position: absolute; 430 | top: 0; 431 | right: 0; 432 | padding: 4px 4px 0 0; 433 | text-align: center; 434 | width: 18px; 435 | height: 14px; 436 | font: 16px/14px Tahoma, Verdana, sans-serif; 437 | color: #c3c3c3; 438 | text-decoration: none; 439 | font-weight: bold; 440 | background: transparent; 441 | } 442 | .leaflet-container a.leaflet-popup-close-button:hover { 443 | color: #999; 444 | } 445 | .leaflet-popup-scrolled { 446 | overflow: auto; 447 | border-bottom: 1px solid #ddd; 448 | border-top: 1px solid #ddd; 449 | } 450 | 451 | .leaflet-oldie .leaflet-popup-content-wrapper { 452 | zoom: 1; 453 | } 454 | .leaflet-oldie .leaflet-popup-tip { 455 | width: 24px; 456 | margin: 0 auto; 457 | 458 | -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)"; 459 | filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678); 460 | } 461 | .leaflet-oldie .leaflet-popup-tip-container { 462 | margin-top: -1px; 463 | } 464 | 465 | .leaflet-oldie .leaflet-control-zoom, 466 | .leaflet-oldie .leaflet-control-layers, 467 | .leaflet-oldie .leaflet-popup-content-wrapper, 468 | .leaflet-oldie .leaflet-popup-tip { 469 | border: 1px solid #999; 470 | } 471 | 472 | 473 | /* div icon */ 474 | 475 | .leaflet-div-icon { 476 | background: #fff; 477 | border: 1px solid #666; 478 | } -------------------------------------------------------------------------------- /explore_map_demo/js/plot2.js: -------------------------------------------------------------------------------- 1 | const NOW = Date.now(); 2 | const MINUTE = 1000 * 60; 3 | const HALF_HOUR = MINUTE * 30; 4 | const HOUR = MINUTE * 60; 5 | const DAY = HOUR * 24; 6 | const COUNT = 100; 7 | 8 | const width = 1024; 9 | const height = 120; 10 | 11 | const chartExtent = [ 12 | [0, 0], 13 | [width, height] 14 | ]; 15 | 16 | d3.tsv('data/data_diary_jittering.tsv').then(function(data){ 17 | let dataDiary = []; 18 | data.forEach(function(d){ 19 | let date = d['diary_date(DD/MM/YYYY)'].split('/'); 20 | d['diary_date(DD/MM/YYYY)'] = new Date(date[2], date[1]-1, date[0]); 21 | dataDiary.push(d); 22 | }); 23 | dataDiary = dataDiary.sort(function(a, b){ 24 | return b['diary_date(DD/MM/YYYY)'] - a['diary_date(DD/MM/YYYY)']; 25 | }); 26 | // dataDiary = jitter_coords(dataDiary); 27 | markerData = dataDiary; 28 | console.log(dataDiary) 29 | render_plot(dataDiary, markerData); 30 | }); 31 | 32 | function jitter_coords(dataDiary){ 33 | function randomize_coord(coord){ 34 | coord = getRandom(coord-5, coord+5); 35 | } 36 | function iterate_coord(coord_array){ 37 | let pass = true; 38 | for (var i = 0; i <= coord_array.length-1; i++) { 39 | if (coord_array[i] == coord_array[i+1]){ 40 | coord_array[i] = randomize_coord(coord_array[i]); 41 | pass = false; 42 | } 43 | } 44 | return coord_array, pass 45 | } 46 | 47 | let latindex = []; 48 | let lonindex = []; 49 | dataDiary.forEach(function(d,i){ 50 | latindex.push(d['lat']); 51 | lonindex.push(d['lon']); 52 | }); 53 | 54 | const latindex_old = Array.from(latindex.keys()) 55 | .sort((a, b) => latindex[a].localeCompare(latindex[b])); 56 | const lonindex_old = Array.from(lonindex.keys()) 57 | .sort((a, b) => lonindex[a].localeCompare(lonindex[b])); 58 | 59 | latindex = latindex.sort() 60 | lonindex = lonindex.sort() 61 | 62 | while(true){ 63 | latindex, pass1 = iterate_coord(latindex); 64 | lonindex, pass2 = iterate_coord(lonindex); 65 | if(pass1==true & pass2==true){ 66 | break; 67 | } 68 | } 69 | 70 | 71 | 72 | return dataDiary; 73 | } 74 | 75 | function render_plot(dataDiary, markerData){ 76 | 77 | const data = new Array(dataDiary.length) 78 | .fill(true) 79 | .map((_, i) => { 80 | const dateInMs = NOW - i * HOUR; 81 | return { 82 | count: 1, 83 | // start: new Date(dateInMs),//dataDiary[i]['diary_date(DD/MM/YYYY)'], //new Date(dateInMs), 84 | // mid: new Date(dateInMs),//dataDiary[i]['diary_date(DD/MM/YYYY)'], //new Date(dateInMs), 85 | // end: new Date(dateInMs + HOUR),//new Date(dataDiary[i]['diary_date(DD/MM/YYYY)'].getTime() + (DAY*30)) 86 | start: dataDiary[i]['diary_date(DD/MM/YYYY)'], //new Date(dateInMs), 87 | mid: dataDiary[i]['diary_date(DD/MM/YYYY)'], //new Date(dateInMs), 88 | end: new Date(dataDiary[i]['diary_date(DD/MM/YYYY)'].getTime() + (DAY*30)) 89 | }; 90 | }) 91 | .reverse(); 92 | 93 | const origExtent = [data[0].start, data.at(-1).end]; 94 | console.log(origExtent) 95 | 96 | let selectionExtent = [...origExtent]; 97 | let oldSelectionExtent = [...origExtent]; 98 | 99 | const xScale = new d3.scaleTime().domain(origExtent).range([0, width]); 100 | let _xScale = xScale.copy(); 101 | 102 | const yScale = new d3.scaleLinear() 103 | .domain([0, d3.max(data, (d) => d.count)]) 104 | .range([height, 0]); 105 | 106 | const xAxis = d3.axisBottom(xScale), 107 | yAxis = d3.axisLeft(yScale); 108 | 109 | d3.select('#timeline__container').append("g") 110 | .attr("class", "axis axis--x") 111 | .attr("transform", "translate(0," + height + ")") 112 | .call(xAxis); 113 | 114 | // d3.select('#timeline__container').append("g") 115 | // .attr("class", "axis axis--y") 116 | // .call(yAxis); 117 | 118 | const isWithingSelection = (datum) => { 119 | const [begin, end] = selectionExtent; 120 | return datum.mid >= begin && datum.mid <= end; 121 | }; 122 | 123 | // Brushing 124 | const brush = d3.brushX() 125 | .on('brush end', () => { 126 | if (d3.event.type === 'zoom') { 127 | return; 128 | } 129 | if (d3.event.selection === null) { 130 | selectionExtent = origExtent; 131 | return renderBars(); 132 | } 133 | // get x coordinates 134 | const [x0, x1] = d3.event.selection; 135 | // convert to dates 136 | const startDate = _xScale.invert(x0); 137 | const endDate = _xScale.invert(x1); 138 | selectionExtent = [startDate, endDate]; 139 | renderBars(); 140 | }) 141 | .on('end', function(){ 142 | // get x coordinates 143 | if (d3.event.type === 'zoom' | d3.event.selection === null) { 144 | return; 145 | } 146 | const [x0, x1] = d3.event.selection; 147 | const startDate = _xScale.invert(x0); 148 | const endDate = _xScale.invert(x1); 149 | 150 | if (checkDate(startDate, oldSelectionExtent[0]) && checkDate(endDate, oldSelectionExtent[1])) { 151 | return; 152 | } else { 153 | oldSelectionExtent = [startDate, endDate]; 154 | markerData = getDataMarker(oldSelectionExtent); 155 | 156 | check_selector_ramdomizeMarkers(markerData); 157 | // ramdomizeMarkers(markerData); 158 | } 159 | 160 | }); 161 | 162 | d3.select('g.brush').call(brush); 163 | 164 | // Zooming 165 | d3.select('#timeline__container').call( 166 | d3.zoom() 167 | .scaleExtent([1, 10]) 168 | .translateExtent(chartExtent) 169 | .extent(chartExtent) 170 | .on('zoom', () => { 171 | const t = d3.event.transform; 172 | 173 | // Update the x scale 174 | _xScale = t.rescaleX(xScale); 175 | 176 | // Apply new range to the bars 177 | d3.selectAll('g.bars rect') 178 | .attr('x', (d) => _xScale(d.start)) 179 | .attr('width', (d) => _xScale(d.end) - _xScale(d.start) - .01); 180 | 181 | d3.select('#timeline__container') 182 | .select(".axis--x") 183 | .call(d3.axisBottom(_xScale)); 184 | 185 | // Apply new scale to selection if needed 186 | if ( 187 | selectionExtent[0] !== data[0].start && 188 | selectionExtent[1] !== data.at(-1).end 189 | ) { 190 | // get the brush's x0/x1 191 | const [x0, x1] = selectionExtent.map(xScale); 192 | // rescale the coordinates to the new scale 193 | const _x0 = x0 * t.k + t.x; 194 | const _x1 = x1 * t.k + t.x; 195 | // move the brush 196 | brush.move(d3.select('.brush'), [_x0, _x1]); 197 | } 198 | }) 199 | ); 200 | 201 | // Render bars 202 | function renderBars() { 203 | d3.select('g.bars') 204 | .selectAll('rect') 205 | .data(data) 206 | .join( 207 | (enter) => { 208 | return enter 209 | .append('rect') 210 | .attr('y', (d) => yScale(d.count)) 211 | .attr('height', (d) => yScale(0) - yScale(d.count)) 212 | .attr('x', (d) => xScale(d.start)) 213 | .attr('width', (d) => xScale(d.end) - xScale(d.start) - .01) 214 | .attr('fill', (d) => (isWithingSelection(d) ? 'steelblue' : 'grey')); 215 | }, 216 | (update) => { 217 | return update.attr('fill', (d) => 218 | isWithingSelection(d) ? 'steelblue' : 'grey' 219 | ); 220 | } 221 | ); 222 | } 223 | 224 | function getDataMarker(oldSelectionExtent){ 225 | return dataDiary.filter(function(d){ 226 | return d['diary_date(DD/MM/YYYY)'] >= oldSelectionExtent[0] && d['diary_date(DD/MM/YYYY)'] <= oldSelectionExtent[1]; 227 | }); 228 | } 229 | 230 | function ramdomizeMarkers(markerData){ 231 | console.log('ramdomizeMarkers') 232 | // map.removeLayer(markers); 233 | markers.clearLayers(); 234 | // var markers = L.markerClusterGroup(); 235 | 236 | for (let i=0; i' + 238 | '
' + 239 | 'Author name: ' + markerData[i]['author_name'] + '
' + 240 | 'Author surname: ' + markerData[i]['author_surname'] + '
' + 241 | 'Gender: ' + markerData[i]['gender'] + '
' + 242 | 'Nationality: ' + markerData[i]['nationality'] + '
' + 243 | 'Diary date: ' + markerData[i]['diary_date(DD/MM/YYYY)'].toLocaleDateString('en-US') + '
' + 244 | 'Writing place: ' + markerData[i]['writing_place'] + '
' + 245 | 'Topic: ' + markerData[i]['topic'] + '
';// + 246 | // 'Wiki link author: ' + markerData[i]['wiki_link_author'] + '
' + 247 | // 'Url for purchase: ' + markerData[i]['url_for_purchase'] + '
'; 248 | 249 | popup += '
'+'' 250 | popup += ' '+'' 251 | 252 | const marker = L.marker([ 253 | markerData[i]['lat'],// getRandom(30, 70), 254 | markerData[i]['lon']// getRandom(-70, 70) 255 | ], {icon: bookIcon}) 256 | .bindPopup(popup) 257 | .on('click', markerClicked); 258 | 259 | // marker.getPopup().on('remove', function(e) { 260 | 261 | // }); 262 | 263 | marker.diary_n = i 264 | markers.addLayer(marker); 265 | } 266 | map.addLayer(markers); 267 | function markerClicked(e){ 268 | const num_dataDiary = e.target.diary_n 269 | $('.button_show_diary').on('click', function(d){ 270 | // diary number 1 or 2 271 | let diary_id = String(this.id); 272 | diary_id = diary_id[diary_id.length-1]; 273 | let first_text = markerData[num_dataDiary]['diary_quote'].slice(0, markerData[num_dataDiary]['emotion_span_start']); 274 | let middle_text = markerData[num_dataDiary]['diary_quote'].slice(markerData[num_dataDiary]['emotion_span_start'], markerData[num_dataDiary]['emotion_span_end']); 275 | let end_text = markerData[num_dataDiary]['diary_quote'].slice(markerData[num_dataDiary]['emotion_span_end']); 276 | 277 | let quote = '

Diary quote: ' + first_text + ' ' + middle_text + ' ' + end_text +'

'; 278 | 279 | let emotion = '

Highlighted emotion: ' + markerData[num_dataDiary]['emotions'] + '

'; 280 | $('#contentDiary'+diary_id).html(emotion+quote); 281 | $('#collapsible'+diary_id).html('Diary '+ diary_id +', '+markerData[num_dataDiary]['author_surname']); 282 | }); 283 | } 284 | } 285 | 286 | function checkDate(date1, date2){ 287 | function getDateFormat(date){ 288 | let month = date.getUTCMonth() + 1; //months from 1-12 289 | let day = date.getUTCDate(); 290 | let year = date.getUTCFullYear(); 291 | return day+'/'+month+'/'+year 292 | } 293 | if (getDateFormat(date1)==getDateFormat(date2)){ 294 | return true 295 | } else { 296 | return false 297 | } 298 | } 299 | function check_selector_ramdomizeMarkers(markerData){ 300 | let selector_mapping = { 301 | 'topic': $('#topic').find(":selected").text(), 302 | 'emotions': $('#emotions').find(":selected").text(), 303 | 'age_range': $('#age_range').find(":selected").text(), 304 | 'gender': $('#gender').find(":selected").text() 305 | } 306 | let temp = markerData; 307 | for (key in selector_mapping){ 308 | if (selector_mapping[key] != 'All'){ 309 | temp = temp.filter(function(el){return el[key]==selector_mapping[key]}); 310 | } 311 | } 312 | ramdomizeMarkers(temp); 313 | } 314 | renderBars(); 315 | ramdomizeMarkers(dataDiary); 316 | 317 | $(document).ready(function() { 318 | // $('.filterSelector').on('change', function() { 319 | // check_selector_ramdomizeMarkers(markerData); 320 | // }); 321 | $('#apply_filter').on('click', function(){ 322 | check_selector_ramdomizeMarkers(markerData); 323 | }); 324 | 325 | $('#reset_filter').on('click', function(){ 326 | $('#topic').val('All').change(); 327 | $('#emotions').val('All').change(); 328 | $('#age_range').val('All').change(); 329 | $('#gender').val('All').change(); 330 | check_selector_ramdomizeMarkers(markerData); 331 | }); 332 | 333 | $('#reset_brush').on('click', function(){ 334 | d3.select('g.brush').call(brush.move, null); 335 | ramdomizeMarkers(dataDiary); 336 | }); 337 | }); 338 | } 339 | 340 | // a = [{'id': 4, 'value': 9},{'id': 4, 'value': 7},{'id': 2, 'value': 6},{'id': 1, 'value': 2}] 341 | 342 | // let mapper = { 343 | // 'id': 4, 344 | // 'value':9 345 | // } 346 | // a.filter(function(el){ 347 | // return mapper 348 | // }) 349 | // temp = a 350 | // for (key in mapper){ 351 | // temp = temp.filter(function(el){return el[key]==mapper[key]}) 352 | // console.log(key) 353 | // } 354 | // temp 355 | 356 | a = "Non ti ho ancora detto, Mimmy, che ben presto farai il giro del mondo. Ti pubblicheranno all'estero. Ho dato il mio permesso, così che il mondo sappia le stesse cose che ho scritto a te. Ti ho parlato della guerra, di me e di Sarajevo durante la guerra, e il mondo vuole sapere tutte queste cose. Ti ho scritto ciò che sentivo, vedevo e udivo, e adesso ne saranno informate le persone che non abitano a Sarajevo. Vuon viaggio intorno al mondo, Mimmy! La tua Zlata"; 357 | 358 | s = 297 359 | e = 412 -------------------------------------------------------------------------------- /License CC BY 4.0 (Attribution 4.0 International).txt: -------------------------------------------------------------------------------- 1 | Attribution 4.0 International 2 | 3 | ======================================================================= 4 | 5 | Creative Commons Corporation ("Creative Commons") is not a law firm and 6 | does not provide legal services or legal advice. Distribution of 7 | Creative Commons public licenses does not create a lawyer-client or 8 | other relationship. Creative Commons makes its licenses and related 9 | information available on an "as-is" basis. Creative Commons gives no 10 | warranties regarding its licenses, any material licensed under their 11 | terms and conditions, or any related information. Creative Commons 12 | disclaims all liability for damages resulting from their use to the 13 | fullest extent possible. 14 | 15 | Using Creative Commons Public Licenses 16 | 17 | Creative Commons public licenses provide a standard set of terms and 18 | conditions that creators and other rights holders may use to share 19 | original works of authorship and other material subject to copyright 20 | and certain other rights specified in the public license below. The 21 | following considerations are for informational purposes only, are not 22 | exhaustive, and do not form part of our licenses. 23 | 24 | Considerations for licensors: Our public licenses are 25 | intended for use by those authorized to give the public 26 | permission to use material in ways otherwise restricted by 27 | copyright and certain other rights. Our licenses are 28 | irrevocable. Licensors should read and understand the terms 29 | and conditions of the license they choose before applying it. 30 | Licensors should also secure all rights necessary before 31 | applying our licenses so that the public can reuse the 32 | material as expected. Licensors should clearly mark any 33 | material not subject to the license. This includes other CC- 34 | licensed material, or material used under an exception or 35 | limitation to copyright. More considerations for licensors: 36 | wiki.creativecommons.org/Considerations_for_licensors 37 | 38 | Considerations for the public: By using one of our public 39 | licenses, a licensor grants the public permission to use the 40 | licensed material under specified terms and conditions. If 41 | the licensor's permission is not necessary for any reason--for 42 | example, because of any applicable exception or limitation to 43 | copyright--then that use is not regulated by the license. Our 44 | licenses grant only permissions under copyright and certain 45 | other rights that a licensor has authority to grant. Use of 46 | the licensed material may still be restricted for other 47 | reasons, including because others have copyright or other 48 | rights in the material. A licensor may make special requests, 49 | such as asking that all changes be marked or described. 50 | Although not required by our licenses, you are encouraged to 51 | respect those requests where reasonable. More considerations 52 | for the public: 53 | wiki.creativecommons.org/Considerations_for_licensees 54 | 55 | ======================================================================= 56 | 57 | Creative Commons Attribution 4.0 International Public License 58 | 59 | By exercising the Licensed Rights (defined below), You accept and agree 60 | to be bound by the terms and conditions of this Creative Commons 61 | Attribution 4.0 International Public License ("Public License"). To the 62 | extent this Public License may be interpreted as a contract, You are 63 | granted the Licensed Rights in consideration of Your acceptance of 64 | these terms and conditions, and the Licensor grants You such rights in 65 | consideration of benefits the Licensor receives from making the 66 | Licensed Material available under these terms and conditions. 67 | 68 | 69 | Section 1 -- Definitions. 70 | 71 | a. Adapted Material means material subject to Copyright and Similar 72 | Rights that is derived from or based upon the Licensed Material 73 | and in which the Licensed Material is translated, altered, 74 | arranged, transformed, or otherwise modified in a manner requiring 75 | permission under the Copyright and Similar Rights held by the 76 | Licensor. For purposes of this Public License, where the Licensed 77 | Material is a musical work, performance, or sound recording, 78 | Adapted Material is always produced where the Licensed Material is 79 | synched in timed relation with a moving image. 80 | 81 | b. Adapter's License means the license You apply to Your Copyright 82 | and Similar Rights in Your contributions to Adapted Material in 83 | accordance with the terms and conditions of this Public License. 84 | 85 | c. Copyright and Similar Rights means copyright and/or similar rights 86 | closely related to copyright including, without limitation, 87 | performance, broadcast, sound recording, and Sui Generis Database 88 | Rights, without regard to how the rights are labeled or 89 | categorized. For purposes of this Public License, the rights 90 | specified in Section 2(b)(1)-(2) are not Copyright and Similar 91 | Rights. 92 | 93 | d. Effective Technological Measures means those measures that, in the 94 | absence of proper authority, may not be circumvented under laws 95 | fulfilling obligations under Article 11 of the WIPO Copyright 96 | Treaty adopted on December 20, 1996, and/or similar international 97 | agreements. 98 | 99 | e. Exceptions and Limitations means fair use, fair dealing, and/or 100 | any other exception or limitation to Copyright and Similar Rights 101 | that applies to Your use of the Licensed Material. 102 | 103 | f. Licensed Material means the artistic or literary work, database, 104 | or other material to which the Licensor applied this Public 105 | License. 106 | 107 | g. Licensed Rights means the rights granted to You subject to the 108 | terms and conditions of this Public License, which are limited to 109 | all Copyright and Similar Rights that apply to Your use of the 110 | Licensed Material and that the Licensor has authority to license. 111 | 112 | h. Licensor means the individual(s) or entity(ies) granting rights 113 | under this Public License. 114 | 115 | i. Share means to provide material to the public by any means or 116 | process that requires permission under the Licensed Rights, such 117 | as reproduction, public display, public performance, distribution, 118 | dissemination, communication, or importation, and to make material 119 | available to the public including in ways that members of the 120 | public may access the material from a place and at a time 121 | individually chosen by them. 122 | 123 | j. Sui Generis Database Rights means rights other than copyright 124 | resulting from Directive 96/9/EC of the European Parliament and of 125 | the Council of 11 March 1996 on the legal protection of databases, 126 | as amended and/or succeeded, as well as other essentially 127 | equivalent rights anywhere in the world. 128 | 129 | k. You means the individual or entity exercising the Licensed Rights 130 | under this Public License. Your has a corresponding meaning. 131 | 132 | 133 | Section 2 -- Scope. 134 | 135 | a. License grant. 136 | 137 | 1. Subject to the terms and conditions of this Public License, 138 | the Licensor hereby grants You a worldwide, royalty-free, 139 | non-sublicensable, non-exclusive, irrevocable license to 140 | exercise the Licensed Rights in the Licensed Material to: 141 | 142 | a. reproduce and Share the Licensed Material, in whole or 143 | in part; and 144 | 145 | b. produce, reproduce, and Share Adapted Material. 146 | 147 | 2. Exceptions and Limitations. For the avoidance of doubt, where 148 | Exceptions and Limitations apply to Your use, this Public 149 | License does not apply, and You do not need to comply with 150 | its terms and conditions. 151 | 152 | 3. Term. The term of this Public License is specified in Section 153 | 6(a). 154 | 155 | 4. Media and formats; technical modifications allowed. The 156 | Licensor authorizes You to exercise the Licensed Rights in 157 | all media and formats whether now known or hereafter created, 158 | and to make technical modifications necessary to do so. The 159 | Licensor waives and/or agrees not to assert any right or 160 | authority to forbid You from making technical modifications 161 | necessary to exercise the Licensed Rights, including 162 | technical modifications necessary to circumvent Effective 163 | Technological Measures. For purposes of this Public License, 164 | simply making modifications authorized by this Section 2(a) 165 | (4) never produces Adapted Material. 166 | 167 | 5. Downstream recipients. 168 | 169 | a. Offer from the Licensor -- Licensed Material. Every 170 | recipient of the Licensed Material automatically 171 | receives an offer from the Licensor to exercise the 172 | Licensed Rights under the terms and conditions of this 173 | Public License. 174 | 175 | b. No downstream restrictions. You may not offer or impose 176 | any additional or different terms or conditions on, or 177 | apply any Effective Technological Measures to, the 178 | Licensed Material if doing so restricts exercise of the 179 | Licensed Rights by any recipient of the Licensed 180 | Material. 181 | 182 | 6. No endorsement. Nothing in this Public License constitutes or 183 | may be construed as permission to assert or imply that You 184 | are, or that Your use of the Licensed Material is, connected 185 | with, or sponsored, endorsed, or granted official status by, 186 | the Licensor or others designated to receive attribution as 187 | provided in Section 3(a)(1)(A)(i). 188 | 189 | b. Other rights. 190 | 191 | 1. Moral rights, such as the right of integrity, are not 192 | licensed under this Public License, nor are publicity, 193 | privacy, and/or other similar personality rights; however, to 194 | the extent possible, the Licensor waives and/or agrees not to 195 | assert any such rights held by the Licensor to the limited 196 | extent necessary to allow You to exercise the Licensed 197 | Rights, but not otherwise. 198 | 199 | 2. Patent and trademark rights are not licensed under this 200 | Public License. 201 | 202 | 3. To the extent possible, the Licensor waives any right to 203 | collect royalties from You for the exercise of the Licensed 204 | Rights, whether directly or through a collecting society 205 | under any voluntary or waivable statutory or compulsory 206 | licensing scheme. In all other cases the Licensor expressly 207 | reserves any right to collect such royalties. 208 | 209 | 210 | Section 3 -- License Conditions. 211 | 212 | Your exercise of the Licensed Rights is expressly made subject to the 213 | following conditions. 214 | 215 | a. Attribution. 216 | 217 | 1. If You Share the Licensed Material (including in modified 218 | form), You must: 219 | 220 | a. retain the following if it is supplied by the Licensor 221 | with the Licensed Material: 222 | 223 | i. identification of the creator(s) of the Licensed 224 | Material and any others designated to receive 225 | attribution, in any reasonable manner requested by 226 | the Licensor (including by pseudonym if 227 | designated); 228 | 229 | ii. a copyright notice; 230 | 231 | iii. a notice that refers to this Public License; 232 | 233 | iv. a notice that refers to the disclaimer of 234 | warranties; 235 | 236 | v. a URI or hyperlink to the Licensed Material to the 237 | extent reasonably practicable; 238 | 239 | b. indicate if You modified the Licensed Material and 240 | retain an indication of any previous modifications; and 241 | 242 | c. indicate the Licensed Material is licensed under this 243 | Public License, and include the text of, or the URI or 244 | hyperlink to, this Public License. 245 | 246 | 2. You may satisfy the conditions in Section 3(a)(1) in any 247 | reasonable manner based on the medium, means, and context in 248 | which You Share the Licensed Material. For example, it may be 249 | reasonable to satisfy the conditions by providing a URI or 250 | hyperlink to a resource that includes the required 251 | information. 252 | 253 | 3. If requested by the Licensor, You must remove any of the 254 | information required by Section 3(a)(1)(A) to the extent 255 | reasonably practicable. 256 | 257 | 4. If You Share Adapted Material You produce, the Adapter's 258 | License You apply must not prevent recipients of the Adapted 259 | Material from complying with this Public License. 260 | 261 | 262 | Section 4 -- Sui Generis Database Rights. 263 | 264 | Where the Licensed Rights include Sui Generis Database Rights that 265 | apply to Your use of the Licensed Material: 266 | 267 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right 268 | to extract, reuse, reproduce, and Share all or a substantial 269 | portion of the contents of the database; 270 | 271 | b. if You include all or a substantial portion of the database 272 | contents in a database in which You have Sui Generis Database 273 | Rights, then the database in which You have Sui Generis Database 274 | Rights (but not its individual contents) is Adapted Material; and 275 | 276 | c. You must comply with the conditions in Section 3(a) if You Share 277 | all or a substantial portion of the contents of the database. 278 | 279 | For the avoidance of doubt, this Section 4 supplements and does not 280 | replace Your obligations under this Public License where the Licensed 281 | Rights include other Copyright and Similar Rights. 282 | 283 | 284 | Section 5 -- Disclaimer of Warranties and Limitation of Liability. 285 | 286 | a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE 287 | EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS 288 | AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF 289 | ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, 290 | IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, 291 | WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR 292 | PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, 293 | ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT 294 | KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT 295 | ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. 296 | 297 | b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE 298 | TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, 299 | NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, 300 | INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, 301 | COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR 302 | USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN 303 | ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR 304 | DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR 305 | IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. 306 | 307 | c. The disclaimer of warranties and limitation of liability provided 308 | above shall be interpreted in a manner that, to the extent 309 | possible, most closely approximates an absolute disclaimer and 310 | waiver of all liability. 311 | 312 | 313 | Section 6 -- Term and Termination. 314 | 315 | a. This Public License applies for the term of the Copyright and 316 | Similar Rights licensed here. However, if You fail to comply with 317 | this Public License, then Your rights under this Public License 318 | terminate automatically. 319 | 320 | b. Where Your right to use the Licensed Material has terminated under 321 | Section 6(a), it reinstates: 322 | 323 | 1. automatically as of the date the violation is cured, provided 324 | it is cured within 30 days of Your discovery of the 325 | violation; or 326 | 327 | 2. upon express reinstatement by the Licensor. 328 | 329 | For the avoidance of doubt, this Section 6(b) does not affect any 330 | right the Licensor may have to seek remedies for Your violations 331 | of this Public License. 332 | 333 | c. For the avoidance of doubt, the Licensor may also offer the 334 | Licensed Material under separate terms or conditions or stop 335 | distributing the Licensed Material at any time; however, doing so 336 | will not terminate this Public License. 337 | 338 | d. Sections 1, 5, 6, 7, and 8 survive termination of this Public 339 | License. 340 | 341 | 342 | Section 7 -- Other Terms and Conditions. 343 | 344 | a. The Licensor shall not be bound by any additional or different 345 | terms or conditions communicated by You unless expressly agreed. 346 | 347 | b. Any arrangements, understandings, or agreements regarding the 348 | Licensed Material not stated herein are separate from and 349 | independent of the terms and conditions of this Public License. 350 | 351 | 352 | Section 8 -- Interpretation. 353 | 354 | a. For the avoidance of doubt, this Public License does not, and 355 | shall not be interpreted to, reduce, limit, restrict, or impose 356 | conditions on any use of the Licensed Material that could lawfully 357 | be made without permission under this Public License. 358 | 359 | b. To the extent possible, if any provision of this Public License is 360 | deemed unenforceable, it shall be automatically reformed to the 361 | minimum extent necessary to make it enforceable. If the provision 362 | cannot be reformed, it shall be severed from this Public License 363 | without affecting the enforceability of the remaining terms and 364 | conditions. 365 | 366 | c. No term or condition of this Public License will be waived and no 367 | failure to comply consented to unless expressly agreed to by the 368 | Licensor. 369 | 370 | d. Nothing in this Public License constitutes or may be interpreted 371 | as a limitation upon, or waiver of, any privileges and immunities 372 | that apply to the Licensor or You, including from the legal 373 | processes of any jurisdiction or authority. 374 | 375 | 376 | ======================================================================= 377 | 378 | Creative Commons is not a party to its public 379 | licenses. Notwithstanding, Creative Commons may elect to apply one of 380 | its public licenses to material it publishes and in those instances 381 | will be considered the “Licensor.” The text of the Creative Commons 382 | public licenses is dedicated to the public domain under the CC0 Public 383 | Domain Dedication. Except for the limited purpose of indicating that 384 | material is shared under a Creative Commons public license or as 385 | otherwise permitted by the Creative Commons policies published at 386 | creativecommons.org/policies, Creative Commons does not authorize the 387 | use of the trademark "Creative Commons" or any other trademark or logo 388 | of Creative Commons without its prior written consent including, 389 | without limitation, in connection with any unauthorized modifications 390 | to any of its public licenses or any other arrangements, 391 | understandings, or agreements concerning use of licensed material. For 392 | the avoidance of doubt, this paragraph does not form part of the 393 | public licenses. 394 | 395 | Creative Commons may be contacted at creativecommons.org. 396 | -------------------------------------------------------------------------------- /explore_map_demo/js/markercluster.js: -------------------------------------------------------------------------------- 1 | /* 2 | Leaflet.markercluster, Provides Beautiful Animated Marker Clustering functionality for Leaflet, a JS library for interactive maps. 3 | https://github.com/Leaflet/Leaflet.markercluster 4 | (c) 2012-2013, Dave Leaver, smartrak 5 | */ 6 | !function(t,e){L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animateAddingMarkers:!1,spiderfyDistanceMultiplier:1,polygonOptions:{}},initialize:function(t){L.Util.setOptions(this,t),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this._featureGroup=L.featureGroup(),this._featureGroup.on(L.FeatureGroup.EVENTS,this._propagateEvent,this),this._nonPointGroup=L.featureGroup(),this._nonPointGroup.on(L.FeatureGroup.EVENTS,this._propagateEvent,this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null,this._queue=[]},addLayer:function(t){if(t instanceof L.LayerGroup){var e=[];for(var i in t._layers)e.push(t._layers[i]);return this.addLayers(e)}if(!t.getLatLng)return this._nonPointGroup.addLayer(t),this;if(!this._map)return this._needsClustering.push(t),this;if(this.hasLayer(t))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(t,this._maxZoom);var n=t,s=this._map.getZoom();if(t.__parent)for(;n.__parent._zoom>=s;)n=n.__parent;return this._currentShownBounds.contains(n.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(t,n):this._animationAddLayerNonAnimated(t,n)),this},removeLayer:function(t){if(t instanceof L.LayerGroup){var e=[];for(var i in t._layers)e.push(t._layers[i]);return this.removeLayers(e)}return t.getLatLng?this._map?t.__parent?(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(t)),this._removeLayer(t,!0),this._featureGroup.hasLayer(t)&&(this._featureGroup.removeLayer(t),t.setOpacity&&t.setOpacity(1)),this):this:(!this._arraySplice(this._needsClustering,t)&&this.hasLayer(t)&&this._needsRemoving.push(t),this):(this._nonPointGroup.removeLayer(t),this)},addLayers:function(t){var e,i,n,s=this._map,r=this._featureGroup,o=this._nonPointGroup;for(e=0,i=t.length;i>e;e++)if(n=t[e],n.getLatLng){if(!this.hasLayer(n))if(s){if(this._addLayer(n,this._maxZoom),n.__parent&&2===n.__parent.getChildCount()){var a=n.__parent.getAllChildMarkers(),h=a[0]===n?a[1]:a[0];r.removeLayer(h)}}else this._needsClustering.push(n)}else o.addLayer(n);return s&&(r.eachLayer(function(t){t instanceof L.MarkerCluster&&t._iconNeedsUpdate&&t._updateIcon()}),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)),this},removeLayers:function(t){var e,i,n,s=this._featureGroup,r=this._nonPointGroup;if(!this._map){for(e=0,i=t.length;i>e;e++)n=t[e],this._arraySplice(this._needsClustering,n),r.removeLayer(n);return this}for(e=0,i=t.length;i>e;e++)n=t[e],n.__parent?(this._removeLayer(n,!0,!0),s.hasLayer(n)&&(s.removeLayer(n),n.setOpacity&&n.setOpacity(1))):r.removeLayer(n);return this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),s.eachLayer(function(t){t instanceof L.MarkerCluster&&t._updateIcon()}),this},clearLayers:function(){return this._map||(this._needsClustering=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._featureGroup.clearLayers(),this._nonPointGroup.clearLayers(),this.eachLayer(function(t){delete t.__parent}),this._map&&this._generateInitialClusters(),this},getBounds:function(){var t=new L.LatLngBounds;if(this._topClusterLevel)t.extend(this._topClusterLevel._bounds);else for(var e=this._needsClustering.length-1;e>=0;e--)t.extend(this._needsClustering[e].getLatLng());return t.extend(this._nonPointGroup.getBounds()),t},eachLayer:function(t,e){var i,n=this._needsClustering.slice();for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(n),i=n.length-1;i>=0;i--)t.call(e,n[i]);this._nonPointGroup.eachLayer(t,e)},getLayers:function(){var t=[];return this.eachLayer(function(e){t.push(e)}),t},getLayer:function(t){var e=null;return this.eachLayer(function(i){L.stamp(i)===t&&(e=i)}),e},hasLayer:function(t){if(!t)return!1;var e,i=this._needsClustering;for(e=i.length-1;e>=0;e--)if(i[e]===t)return!0;for(i=this._needsRemoving,e=i.length-1;e>=0;e--)if(i[e]===t)return!1;return!(!t.__parent||t.__parent._group!==this)||this._nonPointGroup.hasLayer(t)},zoomToShowLayer:function(t,e){var i=function(){if((t._icon||t.__parent._icon)&&!this._inZoomAnimation)if(this._map.off("moveend",i,this),this.off("animationend",i,this),t._icon)e();else if(t.__parent._icon){var n=function(){this.off("spiderfied",n,this),e()};this.on("spiderfied",n,this),t.__parent.spiderfy()}};t._icon&&this._map.getBounds().contains(t.getLatLng())?e():t.__parent._zoome;e++)n=this._needsRemoving[e],this._removeLayer(n,!0);for(this._needsRemoving=[],e=0,i=this._needsClustering.length;i>e;e++)n=this._needsClustering[e],n.getLatLng?n.__parent||this._addLayer(n,this._maxZoom):this._featureGroup.addLayer(n);this._needsClustering=[],this._map.on("zoomend",this._zoomEnd,this),this._map.on("moveend",this._moveEnd,this),this._spiderfierOnAdd&&this._spiderfierOnAdd(),this._bindEvents(),this._zoom=this._map.getZoom(),this._currentShownBounds=this._getExpandedVisibleBounds(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)},onRemove:function(t){t.off("zoomend",this._zoomEnd,this),t.off("moveend",this._moveEnd,this),this._unbindEvents(),this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim",""),this._spiderfierOnRemove&&this._spiderfierOnRemove(),this._hideCoverage(),this._featureGroup.onRemove(t),this._nonPointGroup.onRemove(t),this._featureGroup.clearLayers(),this._map=null},getVisibleParent:function(t){for(var e=t;e&&!e._icon;)e=e.__parent;return e||null},_arraySplice:function(t,e){for(var i=t.length-1;i>=0;i--)if(t[i]===e)return t.splice(i,1),!0},_removeLayer:function(t,e,i){var n=this._gridClusters,s=this._gridUnclustered,r=this._featureGroup,o=this._map;if(e)for(var a=this._maxZoom;a>=0&&s[a].removeObject(t,o.project(t.getLatLng(),a));a--);var h,_=t.__parent,u=_._markers;for(this._arraySplice(u,t);_&&(_._childCount--,!(_._zoom<0));)e&&_._childCount<=1?(h=_._markers[0]===t?_._markers[1]:_._markers[0],n[_._zoom].removeObject(_,o.project(_._cLatLng,_._zoom)),s[_._zoom].addObject(h,o.project(h.getLatLng(),_._zoom)),this._arraySplice(_.__parent._childClusters,_),_.__parent._markers.push(h),h.__parent=_.__parent,_._icon&&(r.removeLayer(_),i||r.addLayer(h))):(_._recalculateBounds(),i&&_._icon||_._updateIcon()),_=_.__parent;delete t.__parent},_isOrIsParent:function(t,e){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},_propagateEvent:function(t){if(t.layer instanceof L.MarkerCluster){if(t.originalEvent&&this._isOrIsParent(t.layer._icon,t.originalEvent.relatedTarget))return;t.type="cluster"+t.type}this.fire(t.type,t)},_defaultIconCreateFunction:function(t){var e=t.getChildCount(),i=" marker-cluster-";return i+=10>e?"small":100>e?"medium":"large",new L.DivIcon({html:"
"+e+"
",className:"marker-cluster"+i,iconSize:new L.Point(40,40)})},_bindEvents:function(){var t=this._map,e=this.options.spiderfyOnMaxZoom,i=this.options.showCoverageOnHover,n=this.options.zoomToBoundsOnClick;(e||n)&&this.on("clusterclick",this._zoomOrSpiderfy,this),i&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),t.on("zoomend",this._hideCoverage,this))},_zoomOrSpiderfy:function(t){var e=this._map;e.getMaxZoom()===e.getZoom()?this.options.spiderfyOnMaxZoom&&t.layer.spiderfy():this.options.zoomToBoundsOnClick&&t.layer.zoomToBounds(),t.originalEvent&&13===t.originalEvent.keyCode&&e._container.focus()},_showCoverage:function(t){var e=this._map;this._inZoomAnimation||(this._shownPolygon&&e.removeLayer(this._shownPolygon),t.layer.getChildCount()>2&&t.layer!==this._spiderfied&&(this._shownPolygon=new L.Polygon(t.layer.getConvexHull(),this.options.polygonOptions),e.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){var t=this.options.spiderfyOnMaxZoom,e=this.options.showCoverageOnHover,i=this.options.zoomToBoundsOnClick,n=this._map;(t||i)&&this.off("clusterclick",this._zoomOrSpiderfy,this),e&&(this.off("clustermouseover",this._showCoverage,this),this.off("clustermouseout",this._hideCoverage,this),n.off("zoomend",this._hideCoverage,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=this._map._zoom,this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var t=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,this._zoom,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._map._zoom,t),this._currentShownBounds=t}},_generateInitialClusters:function(){var t=this._map.getMaxZoom(),e=this.options.maxClusterRadius;this.options.disableClusteringAtZoom&&(t=this.options.disableClusteringAtZoom-1),this._maxZoom=t,this._gridClusters={},this._gridUnclustered={};for(var i=t;i>=0;i--)this._gridClusters[i]=new L.DistanceGrid(e),this._gridUnclustered[i]=new L.DistanceGrid(e);this._topClusterLevel=new L.MarkerCluster(this,-1)},_addLayer:function(t,e){var i,n,s=this._gridClusters,r=this._gridUnclustered;for(this.options.singleMarkerMode&&(t.options.icon=this.options.iconCreateFunction({getChildCount:function(){return 1},getAllChildMarkers:function(){return[t]}}));e>=0;e--){i=this._map.project(t.getLatLng(),e);var o=s[e].getNearObject(i);if(o)return o._addChild(t),t.__parent=o,void 0;if(o=r[e].getNearObject(i)){var a=o.__parent;a&&this._removeLayer(o,!1);var h=new L.MarkerCluster(this,e,o,t);s[e].addObject(h,this._map.project(h._cLatLng,e)),o.__parent=h,t.__parent=h;var _=h;for(n=e-1;n>a._zoom;n--)_=new L.MarkerCluster(this,n,_),s[n].addObject(_,this._map.project(o.getLatLng(),n));for(a._addChild(_),n=e;n>=0&&r[n].removeObject(o,this._map.project(o.getLatLng(),n));n--);return}r[e].addObject(t,i)}this._topClusterLevel._addChild(t),t.__parent=this._topClusterLevel},_enqueue:function(t){this._queue.push(t),this._queueTimeout||(this._queueTimeout=setTimeout(L.bind(this._processQueue,this),300))},_processQueue:function(){for(var t=0;tthis._map._zoom?(this._animationStart(),this._animationZoomOut(this._zoom,this._map._zoom)):this._moveEnd()},_getExpandedVisibleBounds:function(){if(!this.options.removeOutsideVisibleBounds)return this.getBounds();var t=this._map,e=t.getBounds(),i=e._southWest,n=e._northEast,s=L.Browser.mobile?0:Math.abs(i.lat-n.lat),r=L.Browser.mobile?0:Math.abs(i.lng-n.lng);return new L.LatLngBounds(new L.LatLng(i.lat-s,i.lng-r,!0),new L.LatLng(n.lat+s,n.lng+r,!0))},_animationAddLayerNonAnimated:function(t,e){if(e===t)this._featureGroup.addLayer(t);else if(2===e._childCount){e._addToMap();var i=e.getAllChildMarkers();this._featureGroup.removeLayer(i[0]),this._featureGroup.removeLayer(i[1])}else e._updateIcon()}}),L.MarkerClusterGroup.include(L.DomUtil.TRANSITION?{_animationStart:function(){this._map._mapPane.className+=" leaflet-cluster-anim",this._inZoomAnimation++},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},_animationZoomIn:function(t,e){var i,n=this._getExpandedVisibleBounds(),s=this._featureGroup;this._topClusterLevel._recursively(n,t,0,function(r){var o,a=r._latlng,h=r._markers;for(n.contains(a)||(a=null),r._isSingleParent()&&t+1===e?(s.removeLayer(r),r._recursivelyAddChildrenToMap(null,e,n)):(r.setOpacity(0),r._recursivelyAddChildrenToMap(a,e,n)),i=h.length-1;i>=0;i--)o=h[i],n.contains(o._latlng)||s.removeLayer(o)}),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(n,e),s.eachLayer(function(t){t instanceof L.MarkerCluster||!t._icon||t.setOpacity(1)}),this._topClusterLevel._recursively(n,t,e,function(t){t._recursivelyRestoreChildPositions(e)}),this._enqueue(function(){this._topClusterLevel._recursively(n,t,0,function(t){s.removeLayer(t),t.setOpacity(1)}),this._animationEnd()})},_animationZoomOut:function(t,e){this._animationZoomOutSingle(this._topClusterLevel,t-1,e),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,t,this._getExpandedVisibleBounds())},_animationZoomOutSingle:function(t,e,i){var n=this._getExpandedVisibleBounds();t._recursivelyAnimateChildrenInAndAddSelfToMap(n,e+1,i);var s=this;this._forceLayout(),t._recursivelyBecomeVisible(n,i),this._enqueue(function(){if(1===t._childCount){var r=t._markers[0];r.setLatLng(r.getLatLng()),r.setOpacity(1)}else t._recursively(n,i,0,function(t){t._recursivelyRemoveChildrenFromMap(n,e+1)});s._animationEnd()})},_animationAddLayer:function(t,e){var i=this,n=this._featureGroup;n.addLayer(t),e!==t&&(e._childCount>2?(e._updateIcon(),this._forceLayout(),this._animationStart(),t._setPos(this._map.latLngToLayerPoint(e.getLatLng())),t.setOpacity(0),this._enqueue(function(){n.removeLayer(t),t.setOpacity(1),i._animationEnd()})):(this._forceLayout(),i._animationStart(),i._animationZoomOutSingle(e,this._map.getMaxZoom(),this._map.getZoom())))},_forceLayout:function(){L.Util.falseFn(e.body.offsetWidth)}}:{_animationStart:function(){},_animationZoomIn:function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds())},_animationZoomOut:function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds())},_animationAddLayer:function(t,e){this._animationAddLayerNonAnimated(t,e)}}),L.markerClusterGroup=function(t){return new L.MarkerClusterGroup(t)},L.MarkerCluster=L.Marker.extend({initialize:function(t,e,i,n){L.Marker.prototype.initialize.call(this,i?i._cLatLng||i.getLatLng():new L.LatLng(0,0),{icon:this}),this._group=t,this._zoom=e,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._bounds=new L.LatLngBounds,i&&this._addChild(i),n&&this._addChild(n)},getAllChildMarkers:function(t){t=t||[];for(var e=this._childClusters.length-1;e>=0;e--)this._childClusters[e].getAllChildMarkers(t);for(var i=this._markers.length-1;i>=0;i--)t.push(this._markers[i]);return t},getChildCount:function(){return this._childCount},zoomToBounds:function(){for(var t,e=this._childClusters.slice(),i=this._group._map,n=i.getBoundsZoom(this._bounds),s=this._zoom+1,r=i.getZoom();e.length>0&&n>s;){s++;var o=[];for(t=0;ts?this._group._map.setView(this._latlng,s):r>=n?this._group._map.setView(this._latlng,r+1):this._group._map.fitBounds(this._bounds)},getBounds:function(){var t=new L.LatLngBounds;return t.extend(this._bounds),t},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(t,e){this._iconNeedsUpdate=!0,this._expandBounds(t),t instanceof L.MarkerCluster?(e||(this._childClusters.push(t),t.__parent=this),this._childCount+=t._childCount):(e||this._markers.push(t),this._childCount++),this.__parent&&this.__parent._addChild(t,!0)},_expandBounds:function(t){var e,i=t._wLatLng||t._latlng;t instanceof L.MarkerCluster?(this._bounds.extend(t._bounds),e=t._childCount):(this._bounds.extend(i),e=1),this._cLatLng||(this._cLatLng=t._cLatLng||i);var n=this._childCount+e;this._wLatLng?(this._wLatLng.lat=(i.lat*e+this._wLatLng.lat*this._childCount)/n,this._wLatLng.lng=(i.lng*e+this._wLatLng.lng*this._childCount)/n):this._latlng=this._wLatLng=new L.LatLng(i.lat,i.lng)},_addToMap:function(t){t&&(this._backupLatlng=this._latlng,this.setLatLng(t)),this._group._featureGroup.addLayer(this)},_recursivelyAnimateChildrenIn:function(t,e,i){this._recursively(t,0,i-1,function(t){var i,n,s=t._markers;for(i=s.length-1;i>=0;i--)n=s[i],n._icon&&(n._setPos(e),n.setOpacity(0))},function(t){var i,n,s=t._childClusters;for(i=s.length-1;i>=0;i--)n=s[i],n._icon&&(n._setPos(e),n.setOpacity(0))})},_recursivelyAnimateChildrenInAndAddSelfToMap:function(t,e,i){this._recursively(t,i,0,function(n){n._recursivelyAnimateChildrenIn(t,n._group._map.latLngToLayerPoint(n.getLatLng()).round(),e),n._isSingleParent()&&e-1===i?(n.setOpacity(1),n._recursivelyRemoveChildrenFromMap(t,e)):n.setOpacity(0),n._addToMap()})},_recursivelyBecomeVisible:function(t,e){this._recursively(t,0,e,null,function(t){t.setOpacity(1)})},_recursivelyAddChildrenToMap:function(t,e,i){this._recursively(i,-1,e,function(n){if(e!==n._zoom)for(var s=n._markers.length-1;s>=0;s--){var r=n._markers[s];i.contains(r._latlng)&&(t&&(r._backupLatlng=r.getLatLng(),r.setLatLng(t),r.setOpacity&&r.setOpacity(0)),n._group._featureGroup.addLayer(r))}},function(e){e._addToMap(t)})},_recursivelyRestoreChildPositions:function(t){for(var e=this._markers.length-1;e>=0;e--){var i=this._markers[e];i._backupLatlng&&(i.setLatLng(i._backupLatlng),delete i._backupLatlng)}if(t-1===this._zoom)for(var n=this._childClusters.length-1;n>=0;n--)this._childClusters[n]._restorePosition();else for(var s=this._childClusters.length-1;s>=0;s--)this._childClusters[s]._recursivelyRestoreChildPositions(t)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(t,e,i){var n,s;this._recursively(t,-1,e-1,function(t){for(s=t._markers.length-1;s>=0;s--)n=t._markers[s],i&&i.contains(n._latlng)||(t._group._featureGroup.removeLayer(n),n.setOpacity&&n.setOpacity(1))},function(t){for(s=t._childClusters.length-1;s>=0;s--)n=t._childClusters[s],i&&i.contains(n._latlng)||(t._group._featureGroup.removeLayer(n),n.setOpacity&&n.setOpacity(1))})},_recursively:function(t,e,i,n,s){var r,o,a=this._childClusters,h=this._zoom;if(e>h)for(r=a.length-1;r>=0;r--)o=a[r],t.intersects(o._bounds)&&o._recursively(t,e,i,n,s);else if(n&&n(this),s&&this._zoom===i&&s(this),i>h)for(r=a.length-1;r>=0;r--)o=a[r],t.intersects(o._bounds)&&o._recursively(t,e,i,n,s)},_recalculateBounds:function(){var t,e=this._markers,i=this._childClusters;for(this._bounds=new L.LatLngBounds,delete this._wLatLng,t=e.length-1;t>=0;t--)this._expandBounds(e[t]);for(t=i.length-1;t>=0;t--)this._expandBounds(i[t])},_isSingleParent:function(){return this._childClusters.length>0&&this._childClusters[0]._childCount===this._childCount}}),L.DistanceGrid=function(t){this._cellSize=t,this._sqCellSize=t*t,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:function(t,e){var i=this._getCoord(e.x),n=this._getCoord(e.y),s=this._grid,r=s[n]=s[n]||{},o=r[i]=r[i]||[],a=L.Util.stamp(t);this._objectPoint[a]=e,o.push(t)},updateObject:function(t,e){this.removeObject(t),this.addObject(t,e)},removeObject:function(t,e){var i,n,s=this._getCoord(e.x),r=this._getCoord(e.y),o=this._grid,a=o[r]=o[r]||{},h=a[s]=a[s]||[];for(delete this._objectPoint[L.Util.stamp(t)],i=0,n=h.length;n>i;i++)if(h[i]===t)return h.splice(i,1),1===n&&delete a[s],!0},eachObject:function(t,e){var i,n,s,r,o,a,h,_=this._grid;for(i in _){o=_[i];for(n in o)for(a=o[n],s=0,r=a.length;r>s;s++)h=t.call(e,a[s]),h&&(s--,r--)}},getNearObject:function(t){var e,i,n,s,r,o,a,h,_=this._getCoord(t.x),u=this._getCoord(t.y),l=this._objectPoint,d=this._sqCellSize,p=null;for(e=u-1;u+1>=e;e++)if(s=this._grid[e])for(i=_-1;_+1>=i;i++)if(r=s[i])for(n=0,o=r.length;o>n;n++)a=r[n],h=this._sqDist(l[L.Util.stamp(a)],t),d>h&&(d=h,p=a);return p},_getCoord:function(t){return Math.floor(t/this._cellSize)},_sqDist:function(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n}},function(){L.QuickHull={getDistant:function(t,e){var i=e[1].lat-e[0].lat,n=e[0].lng-e[1].lng;return n*(t.lat-e[0].lat)+i*(t.lng-e[0].lng)},findMostDistantPointFromBaseLine:function(t,e){var i,n,s,r=0,o=null,a=[];for(i=e.length-1;i>=0;i--)n=e[i],s=this.getDistant(n,t),s>0&&(a.push(n),s>r&&(r=s,o=n));return{maxPoint:o,newPoints:a}},buildConvexHull:function(t,e){var i=[],n=this.findMostDistantPointFromBaseLine(t,e);return n.maxPoint?(i=i.concat(this.buildConvexHull([t[0],n.maxPoint],n.newPoints)),i=i.concat(this.buildConvexHull([n.maxPoint,t[1]],n.newPoints))):[t[0]]},getConvexHull:function(t){var e,i=!1,n=!1,s=null,r=null;for(e=t.length-1;e>=0;e--){var o=t[e];(i===!1||o.lat>i)&&(s=o,i=o.lat),(n===!1||o.lat=0;e--)t=i[e].getLatLng(),n.push(t);return L.QuickHull.getConvexHull(n)}}),L.MarkerCluster.include({_2PI:2*Math.PI,_circleFootSeparation:25,_circleStartAngle:Math.PI/6,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(this._group._spiderfied!==this&&!this._group._inZoomAnimation){var t,e=this.getAllChildMarkers(),i=this._group,n=i._map,s=n.latLngToLayerPoint(this._latlng);this._group._unspiderfy(),this._group._spiderfied=this,e.length>=this._circleSpiralSwitchover?t=this._generatePointsSpiral(e.length,s):(s.y+=10,t=this._generatePointsCircle(e.length,s)),this._animationSpiderfy(e,t)}},unspiderfy:function(t){this._group._inZoomAnimation||(this._animationUnspiderfy(t),this._group._spiderfied=null)},_generatePointsCircle:function(t,e){var i,n,s=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+t),r=s/this._2PI,o=this._2PI/t,a=[];for(a.length=t,i=t-1;i>=0;i--)n=this._circleStartAngle+i*o,a[i]=new L.Point(e.x+r*Math.cos(n),e.y+r*Math.sin(n))._round();return a},_generatePointsSpiral:function(t,e){var i,n=this._group.options.spiderfyDistanceMultiplier*this._spiralLengthStart,s=this._group.options.spiderfyDistanceMultiplier*this._spiralFootSeparation,r=this._group.options.spiderfyDistanceMultiplier*this._spiralLengthFactor,o=0,a=[];for(a.length=t,i=t-1;i>=0;i--)o+=s/n+5e-4*i,a[i]=new L.Point(e.x+n*Math.cos(o),e.y+n*Math.sin(o))._round(),n+=this._2PI*r/o;return a},_noanimationUnspiderfy:function(){var t,e,i=this._group,n=i._map,s=i._featureGroup,r=this.getAllChildMarkers();for(this.setOpacity(1),e=r.length-1;e>=0;e--)t=r[e],s.removeLayer(t),t._preSpiderfyLatlng&&(t.setLatLng(t._preSpiderfyLatlng),delete t._preSpiderfyLatlng),t.setZIndexOffset&&t.setZIndexOffset(0),t._spiderLeg&&(n.removeLayer(t._spiderLeg),delete t._spiderLeg);i._spiderfied=null}}),L.MarkerCluster.include(L.DomUtil.TRANSITION?{SVG_ANIMATION:function(){return e.createElementNS("http://www.w3.org/2000/svg","animate").toString().indexOf("SVGAnimate")>-1}(),_animationSpiderfy:function(t,i){var n,s,r,o,a=this,h=this._group,_=h._map,u=h._featureGroup,l=_.latLngToLayerPoint(this._latlng);for(n=t.length-1;n>=0;n--)s=t[n],s.setOpacity?(s.setZIndexOffset(1e6),s.setOpacity(0),u.addLayer(s),s._setPos(l)):u.addLayer(s);h._forceLayout(),h._animationStart();var d=L.Path.SVG?0:.3,p=L.Path.SVG_NS;for(n=t.length-1;n>=0;n--)if(o=_.layerPointToLatLng(i[n]),s=t[n],s._preSpiderfyLatlng=s._latlng,s.setLatLng(o),s.setOpacity&&s.setOpacity(1),r=new L.Polyline([a._latlng,o],{weight:1.5,color:"#222",opacity:d}),_.addLayer(r),s._spiderLeg=r,L.Path.SVG&&this.SVG_ANIMATION){var c=r._path.getTotalLength();r._path.setAttribute("stroke-dasharray",c+","+c);var m=e.createElementNS(p,"animate");m.setAttribute("attributeName","stroke-dashoffset"),m.setAttribute("begin","indefinite"),m.setAttribute("from",c),m.setAttribute("to",0),m.setAttribute("dur",.25),r._path.appendChild(m),m.beginElement(),m=e.createElementNS(p,"animate"),m.setAttribute("attributeName","stroke-opacity"),m.setAttribute("attributeName","stroke-opacity"),m.setAttribute("begin","indefinite"),m.setAttribute("from",0),m.setAttribute("to",.5),m.setAttribute("dur",.25),r._path.appendChild(m),m.beginElement()}if(a.setOpacity(.3),L.Path.SVG)for(this._group._forceLayout(),n=t.length-1;n>=0;n--)s=t[n]._spiderLeg,s.options.opacity=.5,s._path.setAttribute("stroke-opacity",.5);setTimeout(function(){h._animationEnd(),h.fire("spiderfied")},200)},_animationUnspiderfy:function(t){var e,i,n,s=this._group,r=s._map,o=s._featureGroup,a=t?r._latLngToNewLayerPoint(this._latlng,t.zoom,t.center):r.latLngToLayerPoint(this._latlng),h=this.getAllChildMarkers(),_=L.Path.SVG&&this.SVG_ANIMATION;for(s._animationStart(),this.setOpacity(1),i=h.length-1;i>=0;i--)e=h[i],e._preSpiderfyLatlng&&(e.setLatLng(e._preSpiderfyLatlng),delete e._preSpiderfyLatlng,e.setOpacity?(e._setPos(a),e.setOpacity(0)):o.removeLayer(e),_&&(n=e._spiderLeg._path.childNodes[0],n.setAttribute("to",n.getAttribute("from")),n.setAttribute("from",0),n.beginElement(),n=e._spiderLeg._path.childNodes[1],n.setAttribute("from",.5),n.setAttribute("to",0),n.setAttribute("stroke-opacity",0),n.beginElement(),e._spiderLeg._path.setAttribute("stroke-opacity",0)));setTimeout(function(){var t=0;for(i=h.length-1;i>=0;i--)e=h[i],e._spiderLeg&&t++;for(i=h.length-1;i>=0;i--)e=h[i],e._spiderLeg&&(e.setOpacity&&(e.setOpacity(1),e.setZIndexOffset(0)),t>1&&o.removeLayer(e),r.removeLayer(e._spiderLeg),delete e._spiderLeg);s._animationEnd()},200)}}:{_animationSpiderfy:function(t,e){var i,n,s,r,o=this._group,a=o._map,h=o._featureGroup;for(i=t.length-1;i>=0;i--)r=a.layerPointToLatLng(e[i]),n=t[i],n._preSpiderfyLatlng=n._latlng,n.setLatLng(r),n.setZIndexOffset&&n.setZIndexOffset(1e6),h.addLayer(n),s=new L.Polyline([this._latlng,r],{weight:1.5,color:"#222"}),a.addLayer(s),n._spiderLeg=s;this.setOpacity(.3),o.fire("spiderfied")},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}}),L.MarkerClusterGroup.include({_spiderfied:null,_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on("zoomstart",this._unspiderfyZoomStart,this),this._map.on("zoomend",this._noanimationUnspiderfy,this),L.Path.SVG&&!L.Browser.touch&&this._map._initPathRoot()},_spiderfierOnRemove:function(){this._map.off("click",this._unspiderfyWrapper,this),this._map.off("zoomstart",this._unspiderfyZoomStart,this),this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy()},_unspiderfyZoomStart:function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(t){L.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(t))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(t){this._spiderfied&&this._spiderfied.unspiderfy(t)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(t){t._spiderLeg&&(this._featureGroup.removeLayer(t),t.setOpacity(1),t.setZIndexOffset(0),this._map.removeLayer(t._spiderLeg),delete t._spiderLeg)}})}(window,document); -------------------------------------------------------------------------------- /landing_page/slick/slick.min.js: -------------------------------------------------------------------------------- 1 | !function(i){"use strict";"function"==typeof define&&define.amd?define(["jquery"],i):"undefined"!=typeof exports?module.exports=i(require("jquery")):i(jQuery)}(function(i){"use strict";var e=window.Slick||{};(e=function(){var e=0;return function(t,o){var s,n=this;n.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:i(t),appendDots:i(t),arrows:!0,asNavFor:null,prevArrow:'',nextArrow:'',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(e,t){return i('