Ver código fonte

final changes

master
Gitea 6 anos atrás
pai
commit
091c8d6f19
6 arquivos alterados com 18 adições e 15 exclusões
  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. BIN
      static/spring_logo.png

+ 8
- 7
map/static/map/index.css Ver arquivo

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

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

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

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

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

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

.slider {


+ 5
- 5
map/templates/map/index.html Ver arquivo

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

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

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

<div id="right">
<img id="logo_side" src="{% static 'favicon.ico' %}"/>
<img id="logo_side" src="{% static 'spring_logo.png' %}"/>
<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
monitoring effects of climate change.</p>
</center>
<center>
<p id="p_date" ></p>
</center>
</div>

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

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

p_date.innerHTML = dateFromDay(180);

</script>

</body>


+ 2
- 2
mobile/predict.py Ver arquivo

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


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)
GDD_date=0
for x in range(y+1):
@@ -21,7 +21,7 @@ def get_gdd_until(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_trees = pd.read_csv(gdd_infile, sep=',', encoding='utf-8')
monthly_temp = pd.read_csv(climate_infile,sep='\t')


+ 1
- 1
mobile/templates/mobile/base.html Ver arquivo

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

</div>
</div>


+ 2
- 0
mobile/templates/mobile/scan.html Ver arquivo

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

<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>

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


BIN
static/spring_logo.png Ver arquivo

Antes Depois
Largura: 338  |  Altura: 137  |  Tamanho: 11KB

Carregando…
Cancelar
Salvar