Skip to content

Commit dfd02e2

Browse files
minor interface tweaks
1 parent 06fcd7b commit dfd02e2

4 files changed

Lines changed: 19 additions & 6 deletions

File tree

css/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -976,7 +976,7 @@ vertical-align: top;
976976
.marker-cluster-warn span {
977977
line-height: 30px;
978978
}
979-
979+
.date_field {position: relative; z-index:10000;}
980980
/*
981981
.marker-cluster-medium {
982982
background-color: rgba(241, 211, 87, 0.6);

index.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="utf-8">
55
<meta name="viewport" content="width=device-width, initial-scale=1">
66

7-
<title>Cattle Flu</title>
7+
<title>Bird Flu Cattle</title>
88

99

1010
<script type="text/javascript" src='https://unpkg.com/leaflet@1.9.4/dist/leaflet.js'></script>
@@ -70,7 +70,13 @@
7070
<div class="container">
7171

7272

73+
<div class="row">
74+
<div class="col d-flex justify-content-between">
75+
<span class="header_text">Bird Flu Cattle</span> Data File:<span id="data_file"></span> Map File:<span id="map_file"></span>
76+
<div id="git_but" ><a class="btn btn-default" href="https://github.com/GeospatialCentroid/bird_flu_cattle" target="git" data-toggle="tooltip" title="Go to Git Repo" data-original-title="Go to git Repo"><i class="bi bi-github"></i></a></div>
7377

78+
</div>
79+
</div>
7480

7581
<div class="row mb-2">
7682

js/index.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ check_requirements=function(_file,_data){
7676
// initialize_interface(required_files[".csv"].data,true)
7777

7878
record_manager.process_csv(required_files[".csv"].data,record_manager)
79+
$("#data_file").html(required_files[".csv"].file_name)
7980
layer_manager.create_geojson(JSON.parse(required_files[".geojson"].data))
81+
$("#map_file").html(required_files[".geojson"].file_name)
8082
}
8183
}
8284
load_data = function(url,type,call_back){
@@ -112,7 +114,6 @@ function store_svg(_data){
112114
html+="<tr><td class='marker_sick shadow'>"+svg+" </td><td>Clinical</td></tr>"
113115
html+="<tr><td class='marker_well shadow'>"+svg+" </td><td>Recovered</td></tr>"
114116
html+="</table>"
115-
console.log("Hello")
116117
$("#legend").html(html)
117118
}
118119

@@ -132,6 +133,8 @@ function initialize_interface(_data,wait){
132133
setup_map();
133134

134135
load_data(config[0]["data"],"geojson",layer_manager.create_geojson)
136+
$("#map_file").html(config[0]["data"])
137+
135138
setup_records(config[1])
136139

137140
}
@@ -202,7 +205,11 @@ function after_filter(){
202205

203206
record_manager.join_data()
204207
var start_date = moment.unix($("#filter_date .filter_slider_box").slider("values")[0]).utc()
205-
var end_date = moment.unix($("#filter_date .filter_slider_box").slider("values")[1]).utc()
208+
//var end_date = moment.unix($("#filter_date .filter_slider_box").slider("values")[1]).utc()
209+
// dial the end date forward one day to account for view showing data up to but excluding the end date
210+
console.log(end_date)
211+
var end_date = moment.unix($("#filter_date .filter_slider_box").slider("values")[1]).add(1, 'day')
212+
console.log(end_date)
206213
record_manager. complete_end_data(end_date)
207214
console.log(start_date.format('YYYY-MM-DD' ))
208215
record_manager.complete_start_data(start_date)

js/record_manager.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class Record_Manager {
4444

4545
}, 100);
4646
//
47-
47+
$("#data_file").html(this.csv)
4848
this.load_csv(this.csv,this.process_csv)
4949
//
5050
// $("#search").focus();
@@ -285,7 +285,7 @@ class Record_Manager {
285285
}
286286

287287
populate_days(_array,_event_start,_event_end,_end_date){
288-
// caled with sick_data,"FLU",end_date,true)
288+
// called with sick_data,"FLU",end_date,true)
289289
//any record that has an EVENT labeled "FLU" should have a record
290290

291291
for(var i=0;i<this.json_data.length;i++){

0 commit comments

Comments
 (0)