Skip to content

Commit

Permalink
Built site for gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Quarto GHA Workflow Runner committed Dec 27, 2024
1 parent e55a33b commit 313f511
Show file tree
Hide file tree
Showing 7 changed files with 1,058 additions and 152 deletions.
2 changes: 1 addition & 1 deletion .nojekyll
Original file line number Diff line number Diff line change
@@ -1 +1 @@
bbf3d814
fced43cb
143 changes: 88 additions & 55 deletions index.html

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions listings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
{
"listing": "/index.html",
"items": [
"/posts/2024-12-27-download_caaqm_locations.html",
"/posts/2024-12-10-cpcb-download.html",
"/posts/foundation-models-for-time-series.html",
"/posts/GPT-from-scratch.html",
Expand Down
48 changes: 24 additions & 24 deletions posts/2024-12-10-cpcb-download.html
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ <h2 id="toc-title">On this page</h2>



<div id="cell-1" class="cell" data-execution_count="23">
<div id="cell-1" class="cell" data-execution_count="1">
<div class="sourceCode cell-code" id="cb1"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> os</span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> re</span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a><span class="im">from</span> glob <span class="im">import</span> glob</span>
Expand All @@ -226,7 +226,7 @@ <h2 id="toc-title">On this page</h2>
<span id="cb1-16"><a href="#cb1-16" aria-hidden="true" tabindex="-1"></a>DOWNLOAD_OLD_DATA_URL <span class="op">=</span> <span class="st">"https://airquality.cpcb.gov.in/ccr/#/caaqm-dashboard-all/caaqm-landing/caaqm-data-repository"</span></span>
<span id="cb1-17"><a href="#cb1-17" aria-hidden="true" tabindex="-1"></a>DOWNLOAD_PAGE_URL <span class="op">=</span> <span class="st">"https://airquality.cpcb.gov.in/ccr/#/caaqm-dashboard-all/caaqm-landing/data"</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div id="cell-2" class="cell" data-execution_count="24">
<div id="cell-2" class="cell" data-execution_count="2">
<div class="sourceCode cell-code" id="cb2"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="kw">def</span> click_it(driver, element):</span>
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a> driver.execute_script(<span class="st">"arguments[0].click();"</span>, element)</span>
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a> </span>
Expand Down Expand Up @@ -277,7 +277,7 @@ <h2 class="anchored" data-anchor-id="dry-run-to-get-metadata">Dry run to get met
<pre><code>Number of states: 31</code></pre>
</div>
</div>
<div id="cell-7" class="cell">
<div id="cell-7" class="cell" data-execution_count="6">
<div class="sourceCode cell-code" id="cb8"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a>metadata_df <span class="op">=</span> pd.DataFrame(columns<span class="op">=</span>[<span class="st">"State"</span>, <span class="st">"City"</span>, <span class="st">"Station"</span>, <span class="st">"site_id"</span>])</span>
<span id="cb8-2"><a href="#cb8-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb8-3"><a href="#cb8-3" aria-hidden="true" tabindex="-1"></a><span class="co"># This loop took less than a minute to run</span></span>
Expand Down Expand Up @@ -317,7 +317,7 @@ <h2 class="anchored" data-anchor-id="dry-run-to-get-metadata">Dry run to get met
<span id="cb8-37"><a href="#cb8-37" aria-hidden="true" tabindex="-1"></a> progress_bar.update(<span class="dv">1</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-display">
<script type="application/vnd.jupyter.widget-view+json">
{"model_id":"957f5ecd8a40427aa882ef39f65d90c7","version_major":2,"version_minor":0,"quarto_mimetype":"application/vnd.jupyter.widget-view+json"}
{"model_id":"07cb5e847f374f21b9fa318ded05233d","version_major":2,"version_minor":0,"quarto_mimetype":"application/vnd.jupyter.widget-view+json"}
</script>
</div>
</div>
Expand Down Expand Up @@ -443,40 +443,40 @@ <h2 class="anchored" data-anchor-id="dry-run-to-get-metadata">Dry run to get met
</div>
</div>
</div>
<div id="cell-11" class="cell" data-execution_count="33">
<div id="cell-11" class="cell" data-execution_count="10">
<div class="sourceCode cell-code" id="cb13"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a><span class="cf">for</span> site_id, more_than_1 <span class="kw">in</span> (metadata_df.site_id.value_counts() <span class="op">&gt;</span> <span class="dv">1</span>).items():</span>
<span id="cb13-2"><a href="#cb13-2" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> more_than_1:</span>
<span id="cb13-3"><a href="#cb13-3" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(metadata_df[metadata_df.site_id <span class="op">==</span> site_id])</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code> State City \
498 Uttar Pradesh Greater Noida
525 Uttar Pradesh Noida

Station site_id
498 Knowledge Park - III, Greater Noida - UPPCB site_1541
525 Knowledge Park - III, Greater Noida - UPPCB site_1541
State City Station site_id
<pre><code> State City Station site_id
25 Bihar Aurangabad MIDC Chilkalthana, Aurangabad - MPCB site_5788
254 Maharashtra Aurangabad MIDC Chilkalthana, Aurangabad - MPCB site_5788
State City Station site_id
26 Bihar Aurangabad More Chowk Waluj, Aurangabad - MPCB site_198
255 Maharashtra Aurangabad More Chowk Waluj, Aurangabad - MPCB site_198
State City Station site_id
27 Bihar Aurangabad Gurdeo Nagar, Aurangabad - BSPCB site_5544
256 Maharashtra Aurangabad Gurdeo Nagar, Aurangabad - BSPCB site_5544
State City Station site_id
28 Bihar Aurangabad Rachnakar Colony, Aurangabad - MPCB site_5789
257 Maharashtra Aurangabad Rachnakar Colony, Aurangabad - MPCB site_5789
State City Station \
499 Uttar Pradesh Greater Noida Knowledge Park - V, Greater Noida - UPPCB
526 Uttar Pradesh Noida Knowledge Park - V, Greater Noida - UPPCB

site_id
499 site_5121
526 site_5121 </code></pre>
526 site_5121
State City \
498 Uttar Pradesh Greater Noida
525 Uttar Pradesh Noida

Station site_id
498 Knowledge Park - III, Greater Noida - UPPCB site_1541
525 Knowledge Park - III, Greater Noida - UPPCB site_1541
State City Station site_id
28 Bihar Aurangabad Rachnakar Colony, Aurangabad - MPCB site_5789
257 Maharashtra Aurangabad Rachnakar Colony, Aurangabad - MPCB site_5789
State City Station site_id
27 Bihar Aurangabad Gurdeo Nagar, Aurangabad - BSPCB site_5544
256 Maharashtra Aurangabad Gurdeo Nagar, Aurangabad - BSPCB site_5544</code></pre>
</div>
</div>
<div id="cell-12" class="cell" data-execution_count="36">
<div id="cell-12" class="cell" data-execution_count="11">
<div class="sourceCode cell-code" id="cb15"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb15-1"><a href="#cb15-1" aria-hidden="true" tabindex="-1"></a><span class="co"># clean up</span></span>
<span id="cb15-2"><a href="#cb15-2" aria-hidden="true" tabindex="-1"></a>drop_items <span class="op">=</span> [metadata_df[(metadata_df.State <span class="op">==</span> <span class="st">"Bihar"</span>) <span class="op">&amp;</span> (metadata_df.Station <span class="op">==</span> <span class="st">"MIDC Chilkalthana, Aurangabad - MPCB"</span>)].index.item(),</span>
<span id="cb15-3"><a href="#cb15-3" aria-hidden="true" tabindex="-1"></a> metadata_df[(metadata_df.City <span class="op">==</span> <span class="st">"Noida"</span>) <span class="op">&amp;</span> (metadata_df.Station <span class="op">==</span> <span class="st">"Knowledge Park - III, Greater Noida - UPPCB"</span>)].index.item(),</span>
Expand All @@ -488,14 +488,14 @@ <h2 class="anchored" data-anchor-id="dry-run-to-get-metadata">Dry run to get met
<span id="cb15-9"><a href="#cb15-9" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb15-10"><a href="#cb15-10" aria-hidden="true" tabindex="-1"></a>metadata_df.drop(drop_items, inplace<span class="op">=</span><span class="va">True</span>)</span>
<span id="cb15-11"><a href="#cb15-11" aria-hidden="true" tabindex="-1"></a><span class="bu">len</span>(metadata_df)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-display" data-execution_count="36">
<div class="cell-output cell-output-display" data-execution_count="11">
<pre><code>554</code></pre>
</div>
</div>
<div id="cell-13" class="cell" data-execution_count="45">
<div id="cell-13" class="cell" data-execution_count="12">
<div class="sourceCode cell-code" id="cb17"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb17-1"><a href="#cb17-1" aria-hidden="true" tabindex="-1"></a><span class="cf">assert</span> <span class="bu">set</span>(metadata_df.site_id.value_counts()) <span class="op">==</span> {<span class="dv">1</span>}</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div id="cell-14" class="cell" data-execution_count="48">
<div id="cell-14" class="cell" data-execution_count="13">
<div class="sourceCode cell-code" id="cb18"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb18-1"><a href="#cb18-1" aria-hidden="true" tabindex="-1"></a>metadata_df.to_csv(<span class="st">"metadata.csv"</span>, index<span class="op">=</span><span class="va">False</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
</section>
Expand Down
Loading

0 comments on commit 313f511

Please sign in to comment.