<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Dataset on Ye Joo Park's Blog</title><link>https://park.is/categories/dataset/</link><description>Recent content in Dataset on Ye Joo Park's Blog</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Wed, 08 Feb 2023 00:00:00 +0000</lastBuildDate><atom:link href="https://park.is/categories/dataset/index.xml" rel="self" type="application/rss+xml"/><item><title>Retrieve tweets using Twitter API</title><link>https://park.is/notebooks/retrieve-tweets/</link><pubDate>Wed, 08 Feb 2023 00:00:00 +0000</pubDate><guid>https://park.is/notebooks/retrieve-tweets/</guid><description>&lt;div class="cell border-box-sizing text_cell rendered"&gt;&lt;div class="prompt input_prompt"&gt;&#10;&lt;/div&gt;&lt;div class="inner_cell"&gt;&#10;&lt;div class="text_cell_render border-box-sizing rendered_html"&gt;&#10;&lt;p&gt;A &lt;a href="https://developer.twitter.com/"&gt;Twitter Developer account&lt;/a&gt; is required to run this script.&lt;/p&gt;&#10;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div class="cell border-box-sizing code_cell rendered"&gt;&#10;&lt;div class="input"&gt;&#10;&lt;div class="prompt input_prompt"&gt;In&amp;nbsp;[1]:&lt;/div&gt;&#10;&lt;div class="inner_cell"&gt;&#10; &lt;div class="input_area"&gt;&#10;&lt;div class=" highlight hl-ipython3"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;tweepy&lt;/span&gt;&#10;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;json&lt;/span&gt;&#10;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;pandas&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nn"&gt;pd&lt;/span&gt;&#10;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;numpy&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nn"&gt;np&lt;/span&gt;&#10;&lt;/pre&gt;&lt;/div&gt;&#10;&#10; &lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&#10;&lt;/div&gt;&#10;&lt;div class="cell border-box-sizing code_cell rendered"&gt;&#10;&lt;div class="input"&gt;&#10;&lt;div class="prompt input_prompt"&gt;In&amp;nbsp;[2]:&lt;/div&gt;&#10;&lt;div class="inner_cell"&gt;&#10; &lt;div class="input_area"&gt;&#10;&lt;div class=" highlight hl-ipython3"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;pd&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;set_option&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'display.max_colwidth'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;150&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&#10;&lt;span class="n"&gt;pd&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;set_option&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'display.max_rows'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&#10;&lt;/pre&gt;&lt;/div&gt;&#10;&#10; &lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&#10;&lt;/div&gt;&#10;&lt;div class="cell border-box-sizing text_cell rendered"&gt;&lt;div class="prompt input_prompt"&gt;&#10;&lt;/div&gt;&lt;div class="inner_cell"&gt;&#10;&lt;div class="text_cell_render border-box-sizing rendered_html"&gt;&#10;&lt;h2 id="Read-Twitter-API-credentials"&gt;Read Twitter API credentials&lt;a class="anchor-link" href="#Read-Twitter-API-credentials"&gt;&amp;#182;&lt;/a&gt;&lt;/h2&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div class="cell border-box-sizing text_cell rendered"&gt;&lt;div class="prompt input_prompt"&gt;&#10;&lt;/div&gt;&lt;div class="inner_cell"&gt;&#10;&lt;div class="text_cell_render border-box-sizing rendered_html"&gt;&#10;&lt;p&gt;Read Twitter API credentials from &lt;code&gt;twitter-credentials.json&lt;/code&gt;. The JSON file should contain the following key/values:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&#10;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;consumer_key&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;YOUR_CONSUMER_KEY&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&#10;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;consumer_secret&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;YOUR_CONSUMER_SECRET&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&#10;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;access_token&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;YOUR_ACCESS_TOKEN&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&#10;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;access_token_secret&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;YOUR_ACCESS_TOKEN_SECRET&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&#10;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;bearer_token&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;BEARER_TOKEN&amp;quot;&lt;/span&gt;&#10;&lt;span class="p"&gt;}&lt;/span&gt;&#10;&lt;/pre&gt;&lt;/div&gt;&#10;&lt;p&gt;Create the &lt;code&gt;twitter-credentials.json&lt;/code&gt; with your own keys and tokens in the same folder as this Jupyter notebook.&lt;/p&gt;</description></item><item><title>Cleaning Chicago Ridesharing Registered Vehicles Dataset</title><link>https://park.is/notebooks/cleaning-chicago-ridesharing-vehicles-dataset/</link><pubDate>Fri, 12 Mar 2021 00:00:00 +0000</pubDate><guid>https://park.is/notebooks/cleaning-chicago-ridesharing-vehicles-dataset/</guid><description>&lt;div class="cell border-box-sizing text_cell rendered"&gt;&lt;div class="prompt input_prompt"&gt;&#10;&lt;/div&gt;&lt;div class="inner_cell"&gt;&#10;&lt;div class="text_cell_render border-box-sizing rendered_html"&gt;&#10;&lt;p&gt;All vehicles 🚗 reported by Transportation Network Providers (sometimes called rideshare companies) to the City of Chicago as part of routine reporting required by ordinance. Inclusion of a vehicle in a monthly report indicates that the vehicle was eligible for trips in Chicago in that month for at least one day, regardless of whether it actually provided any rides. If a vehicle is eligible in multiple months, which is common, it will have records in each of these reporting months.&lt;/p&gt;</description></item></channel></rss>