This commit is contained in:
srcarter3 2022-11-15 18:44:18 +00:00
parent ddd4c00fd1
commit 25d61bcee1
2 changed files with 8 additions and 8 deletions

View file

@ -305,7 +305,7 @@ the maps database called **state**. We can take the results from that
filter and get a geographic **envelope** based on the Florida polygon filter and get a geographic **envelope** based on the Florida polygon
that was returned from the previous cell. that was returned from the previous cell.
Warning: Without such a filter you may be requesting many tens of **Warning**: Without such a filter you may be requesting many tens of
thousands of records. thousands of records.
.. code:: ipython3 .. code:: ipython3
@ -354,9 +354,9 @@ Both the METAR and Synoptic datasets should be filtered by time to avoid
requesting an unreasonable amount of data. By defining one filter now, requesting an unreasonable amount of data. By defining one filter now,
we can use it in both of their data requests to EDEX. we can use it in both of their data requests to EDEX.
Note: Here we will use the most recent hour as our default filter. **Note**: Here we will use the most recent hour as our default
Try adjusting the timerange and see the difference in the final filter. Try adjusting the timerange and see the difference in the
plots. final plots.
.. code:: ipython3 .. code:: ipython3

View file

@ -381,7 +381,7 @@ the maps database called <strong>state</strong>. We can take the results from th
filter and get a geographic <strong>envelope</strong> based on the Florida polygon filter and get a geographic <strong>envelope</strong> based on the Florida polygon
that was returned from the previous cell.</p> that was returned from the previous cell.</p>
<blockquote> <blockquote>
<div><p>Warning: Without such a filter you may be requesting many tens of <div><p><strong>Warning</strong>: Without such a filter you may be requesting many tens of
thousands of records.</p> thousands of records.</p>
</div></blockquote> </div></blockquote>
<div class="highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="c1"># Append each geometry to a numpy array</span> <div class="highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="c1"># Append each geometry to a numpy array</span>
@ -426,9 +426,9 @@ thousands of records.</p>
requesting an unreasonable amount of data. By defining one filter now, requesting an unreasonable amount of data. By defining one filter now,
we can use it in both of their data requests to EDEX.</p> we can use it in both of their data requests to EDEX.</p>
<blockquote> <blockquote>
<div><p>Note: Here we will use the most recent hour as our default filter. <div><p><strong>Note</strong>: Here we will use the most recent hour as our default
Try adjusting the timerange and see the difference in the final filter. Try adjusting the timerange and see the difference in the
plots.</p> final plots.</p>
</div></blockquote> </div></blockquote>
<div class="highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="c1"># Filter for the last hour</span> <div class="highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="c1"># Filter for the last hour</span>
<span class="n">lastHourDateTime</span> <span class="o">=</span> <span class="n">datetime</span><span class="o">.</span><span class="n">utcnow</span><span class="p">()</span> <span class="o">-</span> <span class="n">timedelta</span><span class="p">(</span><span class="n">minutes</span> <span class="o">=</span> <span class="mi">60</span><span class="p">)</span> <span class="n">lastHourDateTime</span> <span class="o">=</span> <span class="n">datetime</span><span class="o">.</span><span class="n">utcnow</span><span class="p">()</span> <span class="o">-</span> <span class="n">timedelta</span><span class="p">(</span><span class="n">minutes</span> <span class="o">=</span> <span class="mi">60</span><span class="p">)</span>