Skip to content

Commit

Permalink
Merge pull request sensiblecodeio#692 from scraperwiki/tidy-help
Browse files Browse the repository at this point in the history
Improve help
  • Loading branch information
frabcus committed Jul 1, 2014
2 parents 6b7f789 + cf6d222 commit b5fc254
Show file tree
Hide file tree
Showing 11 changed files with 107 additions and 268 deletions.
4 changes: 4 additions & 0 deletions client/code/view/docs.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ class Cu.View.Help extends Backbone.View
@el.innerHTML = JST[@options.template]
user: window.user.effective
setTimeout @makePrettyLike, 100

# redirect old URL to new page
if window.location.pathname == "/help/twitter-search/" and window.location.hash == "#faq"
app.navigate "/help/twitter-faq", trigger: true
@

navClick: (e) ->
Expand Down
2 changes: 1 addition & 1 deletion client/code/view/profile/reset-password.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Cu.View.ResetPassword extends Backbone.View
_gaq.push ['_trackEvent', 'set-password', 'success', query]
error: (jqxhr, textStatus, errorThrown) =>
if jqxhr.status == 404
msg = """<div class="alert"><strong>Hmmm. That username could not be found.</strong> Maybe you&rsquo;re trying to <a href="https://classic.scraperwiki.com/accounts/password/reset/">reset a ScraperWiki Classic password?</a></div>"""
msg = """<div class="alert"><strong>Hmmm. That username could not be found.</strong></div>"""
else
msg = """<div class="alert alert-error"><strong>Hmmm. Something went wrong.</strong> Email <a href="mailto:[email protected]">[email protected]</a> and we&rsquo;ll email you a password reset link manually.</div>"""
$('form', @$el).prepend msg
Expand Down
42 changes: 19 additions & 23 deletions client/template/help-home.eco
Original file line number Diff line number Diff line change
@@ -1,53 +1,49 @@
<h2>General help</h2>
<h2>Quick start guides</h2>

<div class="row">

<a class="swcol help-tile" href="/contact/" data-nonpushstate style="background: #F10F0F">
<h3>Help! How do I contact&nbsp;you?</h3>
<a class="swcol help-tile" href="/help/twitter-search/" style="background: #3498db">
<h3>Scrape Tweets and download as a spreadsheet</h3>
</a>

<a class="swcol help-tile" href="/help/whats-new/" style="background: #f1c40f">
<h3>What&rsquo;s ScraperWiki all about?</h3>
<a class="swcol help-tile" href="/help/twitter-faq/" style="background: #27ae60">
<h3>Twitter FAQs</h3>
</a>

<a class="swcol help-tile" href="/help/scraperwiki-classic/" style="background: #73B3D6">
<h3>ScraperWiki Classic retirement guide</h3>
<a class="swcol help-tile" href="/help/code-in-your-browser/" style="background: #f39c12">
<h3>Code a scraper in your browser</h3>
</a>

</div>

<h2>Quick start guides</h2>
<h2>General help</h2>

<div class="row">

<a class="swcol help-tile" href="/help/twitter-search/" style="background: #3498db">
<h3>Scrape Tweets and download as a spreadsheet</h3>
<a class="swcol help-tile" href="/help/whats-new/" style="background: #f1c40f">
<h3>What&rsquo;s ScraperWiki all about?</h3>
</a>

<!-- <a class="swcol help-tile" href="/help/upload-and-summarise/" style="background: #27ae60">
<h3>Upload and summarise a spreadsheet of data</h3>
</a> -->

<a class="swcol help-tile" href="/help/code-in-your-browser/" style="background: #f39c12">
<h3>Code a scraper in your browser</h3>
<a class="swcol help-tile" href="/contact/" data-nonpushstate style="background: #F10F0F">
<h3>Help! How do I contact&nbsp;you?</h3>
</a>

<a class="swcol help-tile" href="/help/make-your-own-tool/" style="background: #559920">
<h3>Make your own tool with HTML, JavaScript &amp; Python</h3>
<a class="swcol help-tile corporate" href="/help/corporate/" style="background: #1F5DA2">
<h3>Corporate FAQs</h3>
</a>

</div>

<h2>Reference documentation</h2>
<h2>Developers</h2>

<div class="row">

<a class="swcol help-tile developer" href="/help/developer/" style="background: #9b59b6">
<h3>Developer docs</h3>
<a class="swcol help-tile" href="/help/make-your-own-tool/" style="background: #559920">
<h3>Make your own tool with HTML, JavaScript &amp; Python</h3>
</a>

<a class="swcol help-tile corporate" href="/help/corporate/" style="background: #1F5DA2">
<h3>Corporate FAQs</h3>
<a class="swcol help-tile developer" href="/help/developer/" style="background: #9b59b6">
<h3>Developer docs</h3>
</a>

<a class="swcol help-tile zig" href="/help/zig/">
Expand Down
95 changes: 0 additions & 95 deletions client/template/help-scraperwiki-classic.eco

This file was deleted.

66 changes: 66 additions & 0 deletions client/template/help-twitter-faq.eco
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<nav class="well optional">
<ul class="nav nav-list">
<li class="nav-header">These FAQs:</li>
<li><a data-nonpushstate href="#historical">How do I search for historical Tweets?</a></li>
<li><a data-nonpushstate href="#updated">How often is the Twitter data updated?</a></li>
<li><a data-nonpushstate href="#slowdown">&ldquo;Twitter has asked us to slow down&rdquo;</a></li>
<li><a data-nonpushstate href="#timezone">What's the time zone of dates?</a></li>
<li class="nav-header">Related guides:</li>
<li><a href="/help/twitter-search">Scrape Tweets and download as a spreadsheet</a></li>
</ul>
</nav>

<div class="wrapper">

<h2 id="faq">Twitter FAQs</h3>

<div class="full-width">
<h3 id="historical">How do I search for historical Tweets?</h3>
<p>Unfortunately, Twitter only allows its API to reach roughly a week into
the past. </p>
<p>If you need really old data, you&rsquo;ll have to use
someone like DataSift or Gnip, who re-sell access to the Twitter firehose.
It's quite expensive.</p>

<p>If you know in advance that you'll need the data, then
set up the dataset and choose &ldquo;Monitor future Tweets&rdquo;.
It'll then be available later when you need it.
</p>

<h3 id="updated">How often is the Twitter data updated?</h3>
<p>Assuming you have the &ldquo;Monitor future Tweets&rdquo; checkbox selected, about once an hour.</p>
<p>In this mode, the <strong>&ldquo;Search for tweets&rdquo;</strong>
tool will request tweets newer than the last tweet ID it stored in its previous
run (so there is no overlap, and no wasted API calls).</p>

<h3 id="slowdown">What does &ldquo;Twitter has asked us to slow down&rdquo; error &ndash; mean?</h3>
<p>Twitter allows us to request 18000 tweets or 75000 followers in total, on a user&rsquo;s
behalf, in any given 15 minute period. This is called &ldquo;rate limiting&rdquo;.</p>

<p>You don't need to worry too much if you're hitting the limit, the tools will
carry on trying and get more data over time. If it is all going too slowly, there
are several things you can do.</p>

<ol>
<li>The limit is shared across all
ScraperWiki Twitter tools you might have running at the same time.
Turn off monitoring or delete ones that you're not using.
</li>
<li>The rate limit is <i>also</i> shared with any other apps that are
calling Twitter using your Twitter login details. You can <a
href="https://twitter.com/settings/applications">see all the apps that are
accessing your account</a>, and disable ones you don't use.</li>
<li>Use multiple Twitter accounts. Each time you make a new dataset,
you can authenticate against a different Twitter account. This is useful
if, for example, you are doing work for several clients.</li>
</ol>
<p>Choose the <strong>&ldquo;Diagnostics&rdquo;</strong> link to get
detailed technical information about the rate limits and status.
</p>

<h3 id="timezone">What's the time zone of dates?</h3>
<p>The <code>created_at</code> column is in UTC (more commonly called GMT).</p>

</div>

</div>
55 changes: 1 addition & 54 deletions client/template/help-twitter-search.eco
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
<li><a data-nonpushstate href="#step3">3. Authorise with Twitter</a></li>
<li><a data-nonpushstate href="#step4">4. Keep your results up to date</a></li>
<li><a data-nonpushstate href="#step5">5. View &amp; download your data</a></li>
<li><a data-nonpushstate href="#faq">FAQs</a></li>
<li class="nav-header">Related guides:</li>
<li><a href="/help/twitter-faq">Twitter FAQs</a></li>
<li><a href="/help/code-in-your-browser">Code a scraper in your browser</a></li>
</ul>
</nav>
Expand Down Expand Up @@ -74,57 +74,4 @@
<p>Once they&rsquo;re generated, you can download your data as CSV or XLS files. Both will open fine in Excel.</p>
</div>

<h2 id="faq">FAQs</h2>

<div class="step full-width">
<div style="width: 47%; float: left">
<h4>How do I search for historical data?</h4>
<p>Unfortunately, Twitter only allows its API to reach roughly a week into
the past. </p>
<p>If you need really old data, you&rsquo;ll have to use
someone like DataSift or Gnip, who re-sell access to the Twitter firehose.
It's quite expensive.</p>

<p>If you know in advance that you'll need the data, then
set up the dataset and choose &ldquo;Monitor future Tweets&rdquo;.
It'll then be available later when you need it.
</p>

<h4>How often is the Twitter data updated?</h4>
<p>Assuming you have the &ldquo;Monitor future Tweets&rdquo; checkbox selected, about once an hour.</p>
<p>In this mode, the <strong>&ldquo;Search for tweets&rdquo;</strong>
tool will request tweets newer than the last tweet ID it stored in its previous
run (so there is no overlap, and no wasted API calls).</p>

<h4>What's the time zone of the data in the created_at column?</h4>
<p>This is UTC.</p>
</div>
<div style="width: 47%; float: right">
<h4>I am seeing a &ldquo;Twitter has asked us to slow down&rdquo; error &ndash; what is the problem?</h4>
<p>Twitter allows us to request 18000 tweets in total, on a user&rsquo;s
behalf, in any given 15 minute period. This is called &ldquo;rate limiting&rdquo;.</p>

<p>You don't need to worry too much if you're hitting the limit, the tools will
carry on trying and get more data over time. If it is all going too slowly, there
are several things you can do.</p>

<ol>
<li>The limit is shared across all
ScraperWiki Twitter search tools you might have running at the same time.
Turn off monitoring or delete ones that you're not using.
</li>
<li>The rate limit is <i>also</i> shared with any other apps that are
calling Twitter using your Twitter login details. You can <a
href="https://twitter.com/settings/applications">see all the apps that are
accessing your account</a>, and disable ones you don't use.</li>
<li>Use multiple Twitter accounts. Each time you make a new dataset,
you can authenticate against a different Twitter account. This is useful
if, for example, you are doing work for several clients.</li>
</ol>
<p>Choose the <strong>&ldquo;Diagnostics&rdquo;</strong> link to get
detailed technical information about the rate limits and status.
</p>
</div>
</div>

</div>
Loading

0 comments on commit b5fc254

Please sign in to comment.