Skip to content

Commit

Permalink
fixed sc_dict bug with dev friendly names
Browse files Browse the repository at this point in the history
  • Loading branch information
btskinner committed May 18, 2016
1 parent ac4a96d commit 95c3a71
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 216 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: rscorecard
Title: A Method to Download Department of Education College Scorecard Data
Version: 0.2.4
Version: 0.2.5
Authors@R: person("Benjamin", "Skinner", email = "[email protected]",
role = c("aut", "cre"))
Author: Benjamin Skinner [aut, cre]
Expand Down
7 changes: 7 additions & 0 deletions News.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# rscorecard 0.2.5

* fixed `sc_dict()` bug that wouldn't allow for search by developer friendly names

# rscorecard 0.2.4

* initial release
3 changes: 2 additions & 1 deletion R/dictionary.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
utils::globalVariables(c('hash'))
#' Search data dictionary.
#'
#' This function is used to search the College Scorecard
Expand Down Expand Up @@ -68,7 +69,7 @@ sc_dict <- function(search_string,
cat('category: ' %+% d[['dev_category']][1])
cat('\n' %+% paste(rep('', 70), collapse = '-') %+% '\n')
cat('DEVELOPER FRIENDLY NAME:\n\n')
cat(d[['developer_friendly_name']][1] %+% '\n\n')
cat(d[['dev_friendly_name']][1] %+% '\n\n')
cat('DESCRIPTION:\n\n')
cat(strwrap(d[['description']][1], 70) %+% '\n')
cat('\n')
Expand Down
Binary file modified R/sysdata.rda
Binary file not shown.
75 changes: 0 additions & 75 deletions README.md

This file was deleted.

130 changes: 0 additions & 130 deletions vignettes/introduction.Rmd

This file was deleted.

63 changes: 54 additions & 9 deletions vignettes/introduction.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@

<meta name="author" content="Benjamin Skinner" />

<meta name="date" content="2016-03-25" />

<title>Downloading Department of Education College Scorecard Data</title>

<meta name="date" content="2016-03-27" />

<title>Downloading Department of Education College Scorecard Data with rscorecard</title>

<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
Expand Down Expand Up @@ -69,9 +67,9 @@
<div class="fluid-row" id="header">


<h1 class="title">Downloading Department of Education College Scorecard Data</h1>
<h1 class="title">Downloading Department of Education College Scorecard Data with rscorecard</h1>
<h4 class="author"><em>Benjamin Skinner</em></h4>
<h4 class="date"><em>2016-03-25</em></h4>
<h4 class="date"><em>2016-03-27</em></h4>

</div>

Expand All @@ -82,7 +80,20 @@ <h4 class="date"><em>2016-03-25</em></h4>
<span class="st"> </span><span class="kw">sc_select</span>(unitid, instnm, stabbr) %&gt;%<span class="st"> </span>
<span class="st"> </span><span class="kw">sc_year</span>(<span class="dv">2013</span>) %&gt;%<span class="st"> </span>
<span class="st"> </span><span class="kw">sc_get</span>()
df</code></pre></div>
df
<span class="co">#&gt; Source: local data frame [8 x 4]</span>
<span class="co">#&gt; </span>
<span class="co">#&gt; unitid instnm stabbr</span>
<span class="co">#&gt; (int) (chr) (chr)</span>
<span class="co">#&gt; 1 194392 Paul Smiths College of Arts and Science NY</span>
<span class="co">#&gt; 2 191676 Houghton College NY</span>
<span class="co">#&gt; 3 196051 Morrisville State College NY</span>
<span class="co">#&gt; 4 197230 Wells College NY</span>
<span class="co">#&gt; 5 191515 Hamilton College NY</span>
<span class="co">#&gt; 6 214643 Pennsylvania State University-Penn State Wilkes-Barre PA</span>
<span class="co">#&gt; 7 214759 Pennsylvania State University-Penn State Fayette- Eberly PA</span>
<span class="co">#&gt; 8 214625 Pennsylvania State University-Penn State New Kensington PA</span>
<span class="co">#&gt; Variables not shown: year (dbl)</span></code></pre></div>
<div id="bookend-commands" class="section level2">
<h2>Bookend commands</h2>
<div id="sc_init" class="section level3">
Expand Down Expand Up @@ -187,7 +198,22 @@ <h3>Using area within zip code</h3>
<span class="st"> </span><span class="kw">sc_year</span>(<span class="dv">2013</span>) %&gt;%<span class="st"> </span>
<span class="st"> </span><span class="kw">sc_zip</span>(<span class="dv">37203</span>, <span class="dv">50</span>) %&gt;%
<span class="st"> </span><span class="kw">sc_get</span>()
df</code></pre></div>
df
<span class="co">#&gt; Source: local data frame [10 x 4]</span>
<span class="co">#&gt; </span>
<span class="co">#&gt; unitid instnm stabbr</span>
<span class="co">#&gt; (int) (chr) (chr)</span>
<span class="co">#&gt; 1 221102 Tennessee College of Applied Technology-Murfreesboro TN</span>
<span class="co">#&gt; 2 221184 Nashville State Community College TN</span>
<span class="co">#&gt; 3 219888 Columbia State Community College TN</span>
<span class="co">#&gt; 4 219602 Austin Peay State University TN</span>
<span class="co">#&gt; 5 220978 Middle Tennessee State University TN</span>
<span class="co">#&gt; 6 219994 Tennessee College of Applied Technology-Dickson TN</span>
<span class="co">#&gt; 7 222053 Volunteer State Community College TN</span>
<span class="co">#&gt; 8 221838 Tennessee State University TN</span>
<span class="co">#&gt; 9 220279 Tennessee College of Applied Technology-Hartsville TN</span>
<span class="co">#&gt; 10 248925 Tennessee College of Applied Technology-Nashville TN</span>
<span class="co">#&gt; Variables not shown: year (dbl)</span></code></pre></div>
</div>
<div id="large-pull" class="section level3">
<h3>Large pull</h3>
Expand All @@ -198,7 +224,26 @@ <h3>Large pull</h3>
<span class="st"> </span><span class="kw">sc_select</span>(unitid, instnm, md_earn_wne_p10) %&gt;%<span class="st"> </span>
<span class="st"> </span><span class="kw">sc_year</span>(<span class="dv">2009</span>) %&gt;%
<span class="st"> </span><span class="kw">sc_get</span>()
df</code></pre></div>
<span class="co">#&gt; Large request will require: 3 additional pulls.</span>
<span class="co">#&gt; Request chunk 1</span>
<span class="co">#&gt; Request chunk 2</span>
<span class="co">#&gt; Request chunk 3</span>
df
<span class="co">#&gt; Source: local data frame [283 x 4]</span>
<span class="co">#&gt; </span>
<span class="co">#&gt; unitid instnm md_earn_wne_p10 year</span>
<span class="co">#&gt; (int) (chr) (int) (dbl)</span>
<span class="co">#&gt; 1 191083 Erie Community College 26600 2009</span>
<span class="co">#&gt; 2 128780 Charter Oak State College 0 2009</span>
<span class="co">#&gt; 3 366395 Suffolk County Community College 38200 2009</span>
<span class="co">#&gt; 4 434672 The Community College of Baltimore County 36200 2009</span>
<span class="co">#&gt; 5 436836 University of Connecticut-Stamford 54500 2009</span>
<span class="co">#&gt; 6 436818 University of Connecticut-Tri-Campus 54500 2009</span>
<span class="co">#&gt; 7 436827 University of Connecticut-Avery Point 54500 2009</span>
<span class="co">#&gt; 8 166513 University of Massachusetts-Lowell 50800 2009</span>
<span class="co">#&gt; 9 166638 University of Massachusetts-Boston 46000 2009</span>
<span class="co">#&gt; 10 166647 Massachusetts Bay Community College 40100 2009</span>
<span class="co">#&gt; .. ... ... ... ...</span></code></pre></div>
</div>
</div>

Expand Down

0 comments on commit 95c3a71

Please sign in to comment.