Gitea 6 лет назад
Родитель
Сommit
091c8d6f19
6 измененных файлов: 18 добавлений и 15 удалений
  1. +8
    -7
      map/static/map/index.css
  2. +5
    -5
      map/templates/map/index.html
  3. +2
    -2
      mobile/predict.py
  4. +1
    -1
      mobile/templates/mobile/base.html
  5. +2
    -0
      mobile/templates/mobile/scan.html
  6. Двоичные данные
      static/spring_logo.png

+ 8
- 7
map/static/map/index.css Просмотреть файл

@@ -10,12 +10,13 @@


#p_date { #p_date {
position: absolute; position: absolute;
bottom: 20px;
left: 25px;
bottom: 60px;
} }


#logo_side { #logo_side {
width: 60%;
margin-left: 20%;
width: 90%;
margin-left: 5%;
margin-top: 10%; margin-top: 10%;
} }


@@ -59,13 +60,13 @@ div.yearno {
} }


#div19 { #div19 {
top: 30px;
left: 30px;
top: 4%;
left: 2%;
} }


#div29 { #div29 {
top: 330px;
left: 30px;
top: 50%;
left: 2%;
} }


.slider { .slider {


+ 5
- 5
map/templates/map/index.html Просмотреть файл

@@ -27,6 +27,7 @@


<div id="div19" class="yearno">2019</div> <div id="div19" class="yearno">2019</div>
<div id="div29" class="yearno">2029</div> <div id="div29" class="yearno">2029</div>
<div id="p_date" class="yearno"></div>


<div class="slidecontainer"> <div class="slidecontainer">
<input type="range" min="1" max="365" value="180" class="slider" id="myRange" <input type="range" min="1" max="365" value="180" class="slider" id="myRange"
@@ -35,16 +36,13 @@
</div> </div>


<div id="right"> <div id="right">
<img id="logo_side" src="{% static 'favicon.ico' %}"/>
<img id="logo_side" src="{% static 'spring_logo.png' %}"/>
<center> <center>
<p><b>Watch how the bloom periods change over time.</b></p>
<p>You want to win awesome awards?</p>
<p><a href="{% url 'mobile:index' %}">Take part</a> in a global movement <p><a href="{% url 'mobile:index' %}">Take part</a> in a global movement
monitoring effects of climate change.</p> monitoring effects of climate change.</p>
</center> </center>
<center> <center>
<p id="p_date" ></p>
</center> </center>
</div> </div>


@@ -189,7 +187,7 @@ function updateMap(value) {
for (var i = 0; i < trees_2.length; i++) { for (var i = 0; i < trees_2.length; i++) {
trees_2[i].update(value); trees_2[i].update(value);
} }
p_date.innerHTML = "Date: " + dateFromDay(value);
p_date.innerHTML = dateFromDay(value);
} }


function dateFromDay(dayno) { function dateFromDay(dayno) {
@@ -203,6 +201,8 @@ var cities2 = L.layerGroup(trees_2.map(t => t.marker));
cities1.addTo(map1); cities1.addTo(map1);
cities2.addTo(map2); cities2.addTo(map2);


p_date.innerHTML = dateFromDay(180);

</script> </script>


</body> </body>


+ 2
- 2
mobile/predict.py Просмотреть файл

@@ -12,7 +12,7 @@ def normalize(x):




def get_gdd_until(date): def get_gdd_until(date):
temp=pd.read_csv('/tmp/temp', sep=',')
temp=pd.read_csv('~/tmp/temp', sep=',')
y=int(temp[temp.Datum==date].index.values) y=int(temp[temp.Datum==date].index.values)
GDD_date=0 GDD_date=0
for x in range(y+1): for x in range(y+1):
@@ -21,7 +21,7 @@ def get_gdd_until(date):
return GDD_date return GDD_date




def predict_blooming(date,gdd_infile='/tmp/wachstumsgradtag.csv',climate_infile='/tmp/climate_heidelberg_tima_and_date.csv'):
def predict_blooming(date,gdd_infile='~/tmp/wachstumsgradtag.csv',climate_infile='~/tmp/climate_heidelberg_tima_and_date.csv'):
gdd_date = get_gdd_until(date) gdd_date = get_gdd_until(date)
gdd_trees = pd.read_csv(gdd_infile, sep=',', encoding='utf-8') gdd_trees = pd.read_csv(gdd_infile, sep=',', encoding='utf-8')
monthly_temp = pd.read_csv(climate_infile,sep='\t') monthly_temp = pd.read_csv(climate_infile,sep='\t')


+ 1
- 1
mobile/templates/mobile/base.html Просмотреть файл

@@ -22,7 +22,7 @@
<div id='heading'> <div id='heading'>
<div class='inner'> <div class='inner'>
<img src='{% static 'favicon.ico' %}' /> <img src='{% static 'favicon.ico' %}' />
<h1 id='title'>Bloom up your region</h1>
<h1 id='title'>Spring Up Your Region</h1>


</div> </div>
</div> </div>


+ 2
- 0
mobile/templates/mobile/scan.html Просмотреть файл

@@ -36,6 +36,8 @@ function identify() {


<input id="image_in" type="file" accept="image/*" capture="camera" /> <input id="image_in" type="file" accept="image/*" capture="camera" />


<br>

<button id="btn_identify" class="btn btn-default" onclick="identify()">Identify the tree</button> <button id="btn_identify" class="btn btn-default" onclick="identify()">Identify the tree</button>


<div id="loader" class="loader hidden"></div> <div id="loader" class="loader hidden"></div>


Двоичные данные
static/spring_logo.png Просмотреть файл

До После
Ширина: 338  |  Высота: 137  |  Размер: 11KB

Загрузка…
Отмена
Сохранить