Skip to content

Commit

Permalink
Merge pull request #135 from ncsu-landscape-dynamics/grammar_edits
Browse files Browse the repository at this point in the history
Grammar edits
  • Loading branch information
ChrisJones687 authored Oct 29, 2020
2 parents 4b66061 + c5564ae commit 6bb516e
Show file tree
Hide file tree
Showing 18 changed files with 609 additions and 436 deletions.
6 changes: 3 additions & 3 deletions pops/views/case_study.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,8 @@ def get_context_data(self, **kwargs):
context['user_case_studies'] = case_studies.filter(created_by = self.request.user)
return context

class PestDetailView(LoginRequiredMixin, DetailView):
login_url = 'login'
class PestDetailView(DetailView):
#login_url = 'login'
model = PestInformation
template_name = 'pops/pest_details.html'
context_object_name = 'pest_information'
Expand All @@ -459,7 +459,7 @@ class PestListView(TemplateView):
template_name = 'pops/pest_list.html'

def get_queryset(self):
return PestInformation.objects.prefetch_related('pest_set__case_study').order_by('common_name')
return PestInformation.objects.prefetch_related('pest_set__case_study').order_by('-host_type', 'common_name')

def get_context_data(self, **kwargs):
# Call the base implementation first to get the context
Expand Down
2 changes: 1 addition & 1 deletion static/images/PoPSModel/PestsDispersingFromItoJ.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/images/PoPSPlatform/OSF_OverviewOfPoPSPlatform.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion static_custom/images/PoPSModel/PestsDispersingFromItoJ.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static_custom/images/PoPSPlatform/OSF_OverviewOfPoPSPlatform.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 10 additions & 6 deletions templates/about_pages/applying-management.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ <h2>How does PoPS apply management in the model?</h2>
<p>PoPS allows two types of management:
<ol>
<li><strong>Host removal</strong> (removes hosts from the cell)</li>
<li><strong>Pesticide application</strong> (converts infected hosts to resistant hosts for a given duration)</li>
<li><strong>Pesticide application</strong> (converts infected hosts to resistant hosts for a given
duration)</li>
</ol>
The efficacy of management application can range from 0-100%. The model also permits both management
The efficacy of management application can range from 0 to 100%. The model also permits both management
types to be applied simultaneously. </p>
<p>
Below are examples of how PoPS applies management to a cell:
Expand All @@ -31,10 +32,13 @@ <h2>How does PoPS apply management in the model?</h2>
src="{% static 'images/AboutPages/management_types.svg' %}"
alt="PoPS allows two types of management: host removal and pesticide application.">
</div>
<p>Management input as polygons is converted to raster management based on percent cell coverage. The “%
removal” applied (a-e) is multiplied by the percent of the cell covered by the management as shown below
for the overall percentage applied in a cell: for example, using the 25% management cell below and the
50% management in (a, above) would result in 12.5% of the cell being managed.</p>
<p>
Management input as polygons is converted to raster management based on percent cell coverage. The “%
removal” applied (a–e, above) is multiplied by the percent of the cell covered by the management (as
shown below) to determine the overall percentage applied in a cell: for example, a cell with 50%
management applied (a, above) but only 25% management coverage (below)
would be calculated as having 12.5% of its hosts managed.
</p>
<div class="text-center pb-2">
<img class='img-fluid w-100' style="max-width:700px"
src="{% static 'images/AboutPages/management_vector_to_raster.svg' %}"
Expand Down
44 changes: 28 additions & 16 deletions templates/about_pages/host-mapping.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,33 @@ <h2>How does PoPS use host maps?</h2>
<p>Each application of PoPS uses a customized host map that provides the locations of target hosts in each
grid cell across the modeled landscape. </p>
<p>
Currently, PoPS users are responsible for loading host maps to run the model. Below are some resources for downloading host maps:
<ul>
<li>Forest data:
<ul>
<li><a class="font-light font-yellow" href="https://lemma.forestry.oregonstate.edu/data/species-maps">LEMMA (30 m resolution data for tree species on West Coast) <i class="fas fa-external-link-alt font-red"></i></a></li>
<li><a class="font-light font-yellow" href="https://www.fs.usda.gov/rds/archive/catalog/RDS-2013-0013">USDA (FIA Raster maps of live tree species basal area at 250 m resolution for entire USA) <i class="fas fa-external-link-alt font-red"></i></a></li>
</ul>
</li>
<li>Cropland data:
<ul>
<li><a class="font-light font-yellow" href="https://developers.google.com/earth-engine/datasets/catalog/USDA_NASS_CDL">Google Earth Engine <i class="fas fa-external-link-alt font-red"></i></a></li>
<li><a class="font-light font-yellow" href="https://www.nass.usda.gov/Research_and_Science/Cropland/SARS1a.php">NASS (30 m yearly map of most productive commodity in that cell) <i class="fas fa-external-link-alt font-red"></i></a></li>
</ul>
</li>
</ul>
Currently, PoPS users are responsible for loading host maps to run the model. Below are some resources
for downloading host maps:
<ul>
<li>Forest data:
<ul>
<li><a class="font-light font-yellow"
href="https://lemma.forestry.oregonstate.edu/data/species-maps">LEMMA (30m
resolution data for tree species on West Coast) <i
class="fas fa-external-link-alt font-red"></i></a></li>
<li><a class="font-light font-yellow"
href="https://www.fs.usda.gov/rds/archive/catalog/RDS-2013-0013">USDA (FIA Raster
maps of live tree species basal area at 250m resolution for entire USA) <i
class="fas fa-external-link-alt font-red"></i></a></li>
</ul>
</li>
<li>Cropland data:
<ul>
<li><a class="font-light font-yellow"
href="https://developers.google.com/earth-engine/datasets/catalog/USDA_NASS_CDL">Google
Earth Engine <i class="fas fa-external-link-alt font-red"></i></a></li>
<li><a class="font-light font-yellow"
href="https://www.nass.usda.gov/Research_and_Science/Cropland/SARS1a.php">NASS (30m
yearly map of most productive commodity in that cell) <i
class="fas fa-external-link-alt font-red"></i></a></li>
</ul>
</li>
</ul>
</p>
</div>
</div>
Expand All @@ -43,6 +55,6 @@ <h2>Future host maps in PoPS</h2>
<hr style="border-top: 1px solid rgba(256,256,256, 0.1);">
<p>We are currently developing a host mapping module to automate the creation of host maps in PoPS.
</div>
</div>
</div>
</div>
{% endblock %}
28 changes: 17 additions & 11 deletions templates/about_pages/weather-reclassification.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,39 +16,45 @@ <h1>Reclassifying Weather in PoPS</h1>
<div class="col-xl-6 col-lg-8 col-md-10 py-4">
<h2>Reclassifying weather data to use PoPS</h2>
<hr style="border-top: 1px solid rgba(256,256,256, 0.1);">
<p>Currently, PoPS users are responsible for obtaining raw weather data to calibrate PoPS. Below are some resources for weather data:</p>
<ul>
<li><a class="font-light font-yellow" href="https://daymet.ornl.gov/">DayMet <i class="fas fa-external-link-alt font-red"></i></a></li>
<li><a class="font-light font-yellow" href="https://prism.oregonstate.edu/">Prism <i class="fas fa-external-link-alt font-red"></i></a></li>
<li><a class="font-light font-yellow" href="https://developers.google.com/earth-engine/datasets/tags/climate">Google Earth Engine <i class="fas fa-external-link-alt font-red"></i></a></li>
<p>
Currently, PoPS users are responsible for obtaining raw weather data to calibrate PoPS.
Below are some resources for weather data:</p>
<ul>
<li><a class="font-light font-yellow" href="https://daymet.ornl.gov/">DayMet <i
class="fas fa-external-link-alt font-red"></i></a></li>
<li><a class="font-light font-yellow" href="https://prism.oregonstate.edu/">Prism <i
class="fas fa-external-link-alt font-red"></i></a></li>
<li><a class="font-light font-yellow"
href="https://developers.google.com/earth-engine/datasets/tags/climate">Google Earth Engine <i
class="fas fa-external-link-alt font-red"></i></a></li>
</ul>
</p>
</div>
</div>
</div>
<div id="" class="row justify-content-center section-style section-style-1">
<div class="col-xl-6 col-lg-8 col-md-10 py-4">
<h2>How does PoPS incorporate weather in the model?</h2>
<hr style="border-top: 1px solid rgba(256,256,256, 0.1);">
<p>During calibration of a case study for PoPS, all raw temperature and precipitation values are first
converted to indices ranging from 01 to describe their impact on a species’ ability to survive and
converted to indices ranging from 0 to 1 to describe their impact on a species’ ability to survive and
reproduce; the transformations, tailored for each species, are saved in the PoPS database. </p>
<div class="text-center pb-2">
<img class='img-fluid w-100' style="max-width:700px"
src="{% static 'images/AboutPages/weather_reclassification.svg' %}"
alt="The PoPS Platform organization">
</div>
<p>Due to the modular nature of PoPS, weather components can be turned on or off. For example, a case study
of Sudden Oak Death (SOD) used a polynomial function to convert daily Daymet (Thornton et al. 2017)
of Sudden Oak Death (SOD) used a polynomial function to convert daily Daymet (<a class="text-light" href="https://www.osti.gov/biblio/1148868">Thornton et al. 2017</a>)
temperature and a threshold of 2.5 mm to convert daily Daymet precipitation into weekly weather coefficients ranging from 0 to 1
(Meentemeyer et al. 2011).</p>
(<a class="text-light" href="https://esajournals.onlinelibrary.wiley.com/doi/full/10.1890/ES10-00192.1%4010.1002/%28ISSN%292150-8925%28CAT%29VirtualIssue%28VI%29ECS2">Meentemeyer et al. 2011</a>).</p>
<div class="text-center pb-2">
<img class='img-fluid w-100' style="max-width:600px"
src="{% static 'images/AboutPages/SOD_weather_reclass.svg' %}"
alt="Sudden Oak Death weather reclassification">
</div>
<p>In contrast, a case study of Spotted Lanternfly (SLF) used a step function to convert daily Daymet
temperature into a monthly coefficient ranging from 0 to 1. Because SLF spread does not have a
dependence on precipitation, that component of the model was turned off.</p>
temperature into a monthly coefficient ranging from 0 to 1. Because SLF spread does not
depend on precipitation, that component of the model was turned off.</p>
<div class="text-center pb-2">
<img class='img-fluid w-100' style="max-width:600px"
src="{% static 'images/AboutPages/SLF_weather_reclass.svg' %}"
Expand Down
2 changes: 1 addition & 1 deletion templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
</div>
</div><!-- End Grid row -->
<!-- Copyright -->
<div class="footer-copyright text-center py-3">© 2018
<div class="footer-copyright text-center py-3">© 2020
<a href="https://popsmodel.org"> popsmodel.org</a>
</div><!-- End Copyright -->
</div><!--End container-->
Expand Down
47 changes: 26 additions & 21 deletions templates/get-pops.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,31 @@ <h1>Get PoPS</h1>
<div class="col-xl-8 col-lg-10 col-md-12 py-4">
<h2>How can I use PoPS?</h2>
<hr style="border-top: 1px solid rgba(256, 256, 256, 0.1);">
<p>PoPS is open-source and freely available for anyone to use. There are two ways you can run PoPS:</p>
<p>PoPS is open source and freely available for anyone to use. There are two ways you can run PoPS:</p>
<div class="row justify-content-center">
<div class="col-md-5 bg-light text-dark m-2 py-2" style="border-style: outset;">
<h3 class="text-center">Option 1: <small>Download PoPS</small></h3>
<h3 class="text-center">Option 1:</h3>
<p class="text-center lead">Download PoPS</p>
<div class="text-center pb-2">
<img class='img-fluid w-100' style="max-width:250px"
src="{% static 'images/Computer_screen_with_coding.png' %}" alt="The PoPS Model">
</div>
<p>Users may download the PoPS model code to run on their own computer. PoPS packages are available
in the following languages:
in the following environments:
<ul>
<li>R</li>
<li>GRASS GIS</li>
<li>GRASS GIS <small>(includes desktop interface)</small></li>
<li>Python (<em>coming soon</em>)</li>
</ul>
</p>
<div class="text-center pb-2">
<a class="btn btn-alert mx-2" href="#available-packages" role="button"><i class="fas fa-sign-in-alt"></i> See available packages</a>
<a class="btn btn-alert mx-2" href="#available-packages" role="button"><i
class="fas fa-sign-in-alt"></i> See available packages</a>
</div>
</div>
<div class="col-md-5 bg-light text-dark m-2 py-2" style="border-style: outset;">
<h3 class="text-center">Option 2: <small>Use the PoPS Dashboard</small></h3>
<h3 class="text-center">Option 2:</h3>
<p class="text-center lead">Use the PoPS Dashboard</p>
<div class="text-center pb-2">
<img class='img-fluid w-100' style="max-width:250px"
src="{% static 'images/Computer_screen_with_dashboard.png' %}" alt="The PoPS Model">
Expand All @@ -64,8 +67,8 @@ <h3 class="text-center">Option 2: <small>Use the PoPS Dashboard</small></h3>
<div class="form-check">
<input type="checkbox" class="form-check-input" id="exampleCheck1" required>
<label class="form-check-label" for="exampleCheck1"><small>I want to receive PoPS
updates</small></label>
<div><small id="emailHelp"> </small></div>
updates</small></label>
<div><small id="emailHelp"> </small></div>
</div>
</form>
</div>
Expand All @@ -76,13 +79,11 @@ <h3 class="text-center">Option 2: <small>Use the PoPS Dashboard</small></h3>
<div class="col-xl-8 col-lg-10 col-md-12 py-4">
<h2>Available PoPS Packages</h2>
<hr style="border-top: 1px solid rgba(0,0,0, 0.1);">
<p>PoPS 1.0 is currently available for download in <strong>R</strong> and <strong>GRASS GIS</strong>. Both versions of PoPS are wrappers
around the <a class="font-red font-dark" href="https://github.com/ncsu-landscape-dynamics/pops-core"><i class="fab fa-github"></i> PoPS Core C++ library for the Pest or Pathogen Spread Model</a>.
<p>PoPS 1.0 is currently available for download in <strong>R</strong> and <strong>GRASS GIS</strong>. Both
versions of PoPS are wrappers
around the <a class="font-red font-dark" href="https://github.com/ncsu-landscape-dynamics/pops-core"><i
class="fab fa-github"></i> PoPS Core C++ library for the Pest or Pathogen Spread Model</a>.
</p>
<p>All versions of PoPS provides the same functionality. The version you choose
depends on your personal coding language preference.
<em>A Python version is under development and will be released soon. </em>
</p>
<div class="row justify-content-center">
<div class="col-md-5 bg-light text-dark m-2 py-2" style="border-style: outset;">
<h3 class="text-center">R version</h3>
Expand All @@ -91,11 +92,12 @@ <h3 class="text-center">R version</h3>
alt="PoPS for R">
</div>
<div class="text-center pb-2">
<a class="btn btn-action mx-2" href="https://github.com/ncsu-landscape-dynamics/rpops" role="button">
<i class="fas fa-download"></i>
<a class="btn btn-action mx-2" href="https://github.com/ncsu-landscape-dynamics/rpops"
role="button">
<i class="fas fa-download"></i>
Get PoPS on GitHub
</a>
<p><small><a class="font-yellow font-dark" href="#">Learn more about PoPS in R</a></small></p>

</div>
</div>
<div class="col-md-5 bg-light text-dark m-2 py-2" style="border-style: outset;">
Expand All @@ -105,13 +107,16 @@ <h3 class="text-center">GRASS GIS version</h3>
alt="PoPS for GRASS GIS">
</div>
<div class="text-center pb-2">
<a class="btn btn-action mx-2" href="https://github.com/ncsu-landscape-dynamics/r.pops.spread" role="button">
<i class="fas fa-download"></i>
<a class="btn btn-action mx-2" href="https://github.com/ncsu-landscape-dynamics/r.pops.spread"
role="button">
<i class="fas fa-download"></i>
Get PoPS on GitHub
</a>
<p><small><a class="font-yellow font-dark" href="#">Learn more about PoPS in GRASS GIS</a></small></p>
<p><small><a class="font-yellow font-dark" target="_blank"
href="https://mybinder.org/v2/gh/ncsu-landscape-dynamics/pops-intro-grass-notebook/master?urlpath=lab/tree/pops-intro-grass-notebook.ipynb">Try
PoPS online</a></small></p>
</div>
</div>
</div>
</div>
</div>
</div>
Expand Down
Loading

0 comments on commit 6bb516e

Please sign in to comment.