Skip to content

Commit

Permalink
deploy: f39dd43
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorcampbell committed Sep 27, 2023
1 parent cace869 commit e667c56
Show file tree
Hide file tree
Showing 12 changed files with 704 additions and 704 deletions.
24 changes: 12 additions & 12 deletions pull264/_sources/reading.md
Original file line number Diff line number Diff line change
Expand Up @@ -1469,8 +1469,8 @@ of the nasa_data object. But you can reproduce this using the DEMO_KEY key -->
import requests

nasa_data_single = requests.get(
"https://api.nasa.gov/planetary/apod?api_key=YOUR_API_KEY&date=2023-07-13"
).json()
"https://api.nasa.gov/planetary/apod?api_key=YOUR_API_KEY&date=2023-07-13"
).json()
nasa_data_single
```

Expand All @@ -1492,8 +1492,8 @@ and there will be 74 items total, one for each day between the start and end dat

```python
nasa_data = requests.get(
"https://api.nasa.gov/planetary/apod?api_key=YOUR_API_KEY&start_date=2023-05-01&end_date=2023-07-13"
).json()
"https://api.nasa.gov/planetary/apod?api_key=YOUR_API_KEY&start_date=2023-05-01&end_date=2023-07-13"
).json()
len(nasa_data)
```

Expand All @@ -1513,17 +1513,17 @@ readers who would like to parse JSON data into a `pandas` data frame in their ow

```{code-cell} ipython3
data_dict = {
"date":[],
"title": [],
"copyright" : [],
"url": []
"date":[],
"title": [],
"copyright" : [],
"url": []
}
for item in nasa_data:
if "copyright" not in item:
item["copyright"] = None
for entry in ["url", "title", "date", "copyright"]:
data_dict[entry].append(item[entry])
if "copyright" not in item:
item["copyright"] = None
for entry in ["url", "title", "date", "copyright"]:
data_dict[entry].append(item[entry])
nasa_df = pd.DataFrame(data_dict)
nasa_df
Expand Down
204 changes: 102 additions & 102 deletions pull264/classification1.html

Large diffs are not rendered by default.

156 changes: 78 additions & 78 deletions pull264/classification2.html

Large diffs are not rendered by default.

64 changes: 32 additions & 32 deletions pull264/clustering.html

Large diffs are not rendered by default.

182 changes: 91 additions & 91 deletions pull264/inference.html

Large diffs are not rendered by default.

70 changes: 35 additions & 35 deletions pull264/intro.html

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions pull264/reading.html
Original file line number Diff line number Diff line change
Expand Up @@ -3228,8 +3228,8 @@ <h4>Accessing the NASA API<a class="headerlink" href="#accessing-the-nasa-api" t
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">requests</span>

<span class="n">nasa_data_single</span> <span class="o">=</span> <span class="n">requests</span><span class="o">.</span><span class="n">get</span><span class="p">(</span>
<span class="s2">&quot;https://api.nasa.gov/planetary/apod?api_key=YOUR_API_KEY&amp;date=2023-07-13&quot;</span>
<span class="p">)</span><span class="o">.</span><span class="n">json</span><span class="p">()</span>
<span class="s2">&quot;https://api.nasa.gov/planetary/apod?api_key=YOUR_API_KEY&amp;date=2023-07-13&quot;</span>
<span class="p">)</span><span class="o">.</span><span class="n">json</span><span class="p">()</span>
<span class="n">nasa_data_single</span>
</pre></div>
</div>
Expand All @@ -3253,8 +3253,8 @@ <h4>Accessing the NASA API<a class="headerlink" href="#accessing-the-nasa-api" t
will take the form of a Python list. Each item in the list will correspond to a single day’s record (just like the <code class="docutils literal notranslate"><span class="pre">nasa_data_single</span></code> object),
and there will be 74 items total, one for each day between the start and end dates:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">nasa_data</span> <span class="o">=</span> <span class="n">requests</span><span class="o">.</span><span class="n">get</span><span class="p">(</span>
<span class="s2">&quot;https://api.nasa.gov/planetary/apod?api_key=YOUR_API_KEY&amp;start_date=2023-05-01&amp;end_date=2023-07-13&quot;</span>
<span class="p">)</span><span class="o">.</span><span class="n">json</span><span class="p">()</span>
<span class="s2">&quot;https://api.nasa.gov/planetary/apod?api_key=YOUR_API_KEY&amp;start_date=2023-05-01&amp;end_date=2023-07-13&quot;</span>
<span class="p">)</span><span class="o">.</span><span class="n">json</span><span class="p">()</span>
<span class="nb">len</span><span class="p">(</span><span class="n">nasa_data</span><span class="p">)</span>
</pre></div>
</div>
Expand All @@ -3276,17 +3276,17 @@ <h4>Accessing the NASA API<a class="headerlink" href="#accessing-the-nasa-api" t
<div class="cell docutils container">
<div class="cell_input docutils container">
<div class="highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="n">data_dict</span> <span class="o">=</span> <span class="p">{</span>
<span class="s2">&quot;date&quot;</span><span class="p">:[],</span>
<span class="s2">&quot;title&quot;</span><span class="p">:</span> <span class="p">[],</span>
<span class="s2">&quot;copyright&quot;</span> <span class="p">:</span> <span class="p">[],</span>
<span class="s2">&quot;url&quot;</span><span class="p">:</span> <span class="p">[]</span>
<span class="s2">&quot;date&quot;</span><span class="p">:[],</span>
<span class="s2">&quot;title&quot;</span><span class="p">:</span> <span class="p">[],</span>
<span class="s2">&quot;copyright&quot;</span> <span class="p">:</span> <span class="p">[],</span>
<span class="s2">&quot;url&quot;</span><span class="p">:</span> <span class="p">[]</span>
<span class="p">}</span>

<span class="k">for</span> <span class="n">item</span> <span class="ow">in</span> <span class="n">nasa_data</span><span class="p">:</span>
<span class="k">if</span> <span class="s2">&quot;copyright&quot;</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">item</span><span class="p">:</span>
<span class="n">item</span><span class="p">[</span><span class="s2">&quot;copyright&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span>
<span class="k">for</span> <span class="n">entry</span> <span class="ow">in</span> <span class="p">[</span><span class="s2">&quot;url&quot;</span><span class="p">,</span> <span class="s2">&quot;title&quot;</span><span class="p">,</span> <span class="s2">&quot;date&quot;</span><span class="p">,</span> <span class="s2">&quot;copyright&quot;</span><span class="p">]:</span>
<span class="n">data_dict</span><span class="p">[</span><span class="n">entry</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">item</span><span class="p">[</span><span class="n">entry</span><span class="p">])</span>
<span class="k">if</span> <span class="s2">&quot;copyright&quot;</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">item</span><span class="p">:</span>
<span class="n">item</span><span class="p">[</span><span class="s2">&quot;copyright&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span>
<span class="k">for</span> <span class="n">entry</span> <span class="ow">in</span> <span class="p">[</span><span class="s2">&quot;url&quot;</span><span class="p">,</span> <span class="s2">&quot;title&quot;</span><span class="p">,</span> <span class="s2">&quot;date&quot;</span><span class="p">,</span> <span class="s2">&quot;copyright&quot;</span><span class="p">]:</span>
<span class="n">data_dict</span><span class="p">[</span><span class="n">entry</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">item</span><span class="p">[</span><span class="n">entry</span><span class="p">])</span>

<span class="n">nasa_df</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">(</span><span class="n">data_dict</span><span class="p">)</span>
<span class="n">nasa_df</span>
Expand Down
130 changes: 65 additions & 65 deletions pull264/regression1.html

Large diffs are not rendered by default.

158 changes: 79 additions & 79 deletions pull264/regression2.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pull264/searchindex.js

Large diffs are not rendered by default.

392 changes: 196 additions & 196 deletions pull264/viz.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pull264/wrangling.html
Original file line number Diff line number Diff line change
Expand Up @@ -5055,7 +5055,7 @@ <h2><span class="section-number">3.9. </span>Performing operations on groups of
</div>
</div>
<div class="cell_output docutils container">
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>&lt;pandas.core.groupby.generic.DataFrameGroupBy object at 0x7f9599f445d0&gt;
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>&lt;pandas.core.groupby.generic.DataFrameGroupBy object at 0x7f69a4c08650&gt;
</pre></div>
</div>
</div>
Expand Down

0 comments on commit e667c56

Please sign in to comment.