Adam T. Bradley

Posts in tag “rhode island”

Friday Readings

  • Providence Journal: R.I. rethinking pedestrian bridge plan on 195 land after bids come in high
  • WPRI: Study: Low infrastructure spending makes RI an ‘outlier state’
  • The Economist: America’s growing temporary workforce
    America's temporary help industry first emerged after the second world war, when companies like Manpower and Kelly Girl Service began “renting out” office workers on a short-term basis. In those early years, temps numbered in the hundreds of thousands. Today, the industry employs some 2.9m people, over 2% of America’s total workforce.
  • The Economist: What if Germany had not Reunified
    Joining East and West together within NATO and the European Union was the worst option, except for all the others
  • Lars P. Syll: Why Economists Can't Reason Neoclassical economics has since long given up on the real world and contents itself with proving things about thought up worlds. Empirical evidence only plays a minor role in economic theory, where models largely function as a substitute for empirical evidence. The one-sided, almost religious, insistence on axiomatic-deductivist modeling as the only scientific activity worthy of pursuing in economics, is a scientific cul-de-sac.
  • Chasing Truth. Catching Hell.: Dear Norm: How Do You Defend Those People? (Part 3,223)
    No, I don’t mean “how can you live with yourself ensuring due process for people who have done really really bad things” or anything like that. I mean, how do you actually do it? When you have a client accused of something awful, and he/she has next to nothing by way of a defense, how do you defend them anyway?
  • USA Today: Hardwired for happy hour: Primates choose booze
    Scientists discovered that the aye-aye and the slow loris species both have a taste for booze, a finding that indirectly bolsters one theory for how humans came to appreciate a stiff drink. The aye-ayes in particular were such enthusiastic tipplers that after draining their cups, they searched for more…
  • #fridayreads: Thinking in systems: a primer by Donella H. Meadows

RI Unemployment by County, 2012

I’m taking a break from maps to figure out some of the options for basic plots.

Below, I’m taking Rhode Island employment figures I lifted from the state Department of Labor and Training’s site and plotting unemployment by county for 2012.

library(RColorBrewer)
riemp <- read.csv('../ri-unemployment2012.csv')
riemp$pct.unemp <-
round((1 - (riemp$employed
/riemp$labor.force)) * 100, 2)
month <- as.Date(
paste(riemp$month, '01', sep="/"))
riemp$month <- NULL
riemp$monthnum <- format.Date(month, '%m')
riemp$monthname <- format.Date(month, '%B')
ri = riemp[riemp$region=='RHODE ISLAND',]
ri
##          region labor.force employed pct.unemp monthnum monthname
## 1  RHODE ISLAND      556461   491097     11.75       01   January
## 2  RHODE ISLAND      556081   488879     12.08       02  February
## 3  RHODE ISLAND      553837   488551     11.79       03     March
## 4  RHODE ISLAND      549176   488371     11.07       04     April
## 5  RHODE ISLAND      552331   494690     10.44       05       May
## 6  RHODE ISLAND      555397   497872     10.36       06      June
## 7  RHODE ISLAND      562854   499845     11.19       07      July
## 8  RHODE ISLAND      561453   502163     10.56       08    August
## 9  RHODE ISLAND      562846   507689      9.80       09 September
## 10 RHODE ISLAND      569150   512693      9.92       10   October
## 11 RHODE ISLAND      566423   510040      9.95       11  November

riemp.by.county <- riemp[grep('COUNTY', riemp$region),]
riemp.by.county$region <- sub(' COUNTY', '', riemp.by.county$region)
riemp.by.county
##         region labor.force employed pct.unemp monthnum monthname
## 474    BRISTOL       26600    23949      9.97       01   January
## 475    BRISTOL       26549    23846     10.18       02  February
## 476    BRISTOL       26509    23833     10.09       03     March
## 477    BRISTOL       26245    23825      9.22       04     April
## 478    BRISTOL       26415    24117      8.70       05       May
## 479    BRISTOL       26438    24242      8.31       06      June
## 480    BRISTOL       26817    24308      9.36       07      July
## 481    BRISTOL       26830    24425      8.96       08    August
## 482    BRISTOL       26972    24725      8.33       09 September
## 483    BRISTOL       27390    24997      8.74       10   October
## 484    BRISTOL       27337    24880      8.99       11  November
## 485       KENT       93686    83388     10.99       01   January
## 486       KENT       93712    83031     11.40       02  February
## 487       KENT       93293    82981     11.05       03     March
## 488       KENT       92792    82957     10.60       04     April
## 489       KENT       93310    83972     10.01       05       May
## 490       KENT       93531    84406      9.76       06      June
## 491       KENT       94677    84640     10.60       07      July
## 492       KENT       94612    85044     10.11       08    August
## 493       KENT       95099    86091      9.47       09 September
## 494       KENT       96069    87037      9.40       10   October
## 495       KENT       95544    86631      9.33       11  November
## 496    NEWPORT       45260    39530     12.66       01   January
## 497    NEWPORT       44985    39361     12.50       02  February
## 498    NEWPORT       44470    39337     11.54       03     March
## 499    NEWPORT       43636    39324      9.88       04     April
## 500    NEWPORT       43444    39807      8.37       05       May
## 501    NEWPORT       43511    40013      8.04       06      June
## 502    NEWPORT       44056    40123      8.93       07      July
## 503    NEWPORT       44157    40314      8.70       08    August
## 504    NEWPORT       44228    40811      7.73       09 September
## 505    NEWPORT       44970    41260      8.25       10   October
## 506    NEWPORT       45123    41067      8.99       11  November
## 507 PROVIDENCE      319215   280259     12.20       01   January
## 508 PROVIDENCE      319290   279056     12.60       02  February
## 509 PROVIDENCE      318438   278889     12.42       03     March
## 510 PROVIDENCE      316306   278808     11.85       04     April
## 511 PROVIDENCE      318573   282224     11.41       05       May
## 512 PROVIDENCE      320507   283684     11.49       06      June
## 513 PROVIDENCE      324426   284463     12.32       07      July
## 514 PROVIDENCE      323062   285822     11.53       08    August
## 515 PROVIDENCE      324362   289340     10.80       09 September
## 516 PROVIDENCE      327944   292521     10.80       10   October
## 517 PROVIDENCE      325984   291155     10.68       11  November
## 518 WASHINGTON       71702    63972     10.78       01   January
## 519 WASHINGTON       71549    63588     11.13       02  February
## 520 WASHINGTON       71127    63511     10.71       03     March
## 521 WASHINGTON       70198    63457      9.60       04     April
## 522 WASHINGTON       70590    64570      8.53       05       May
## 523 WASHINGTON       71408    65526      8.24       06      June
## 524 WASHINGTON       72880    66311      9.01       07      July
## 525 WASHINGTON       72792    66558      8.56       08    August
## 526 WASHINGTON       72187    66725      7.57       09 September
## 527 WASHINGTON       72781    66876      8.11       10   October
## 528 WASHINGTON       72435    66309      8.46       11  November

counties = as.character(unique(riemp.by.county$region))
counties
## [1] "BRISTOL"    "KENT"       "NEWPORT"    "PROVIDENCE" "WASHINGTON"
cols = brewer.pal(length(counties), 'Set1')
cols
## [1] "#E41A1C" "#377EB8" "#4DAF4A" "#984EA3" "#FF7F00"

cnt = riemp.by.county[riemp.by.county$region==counties[1],]
plot(ri$monthnum, ri$pct.unemp, type='l',
main="Rhode Island Unemployment, 2012, by County",
xlab="Month", xaxt="n", ylab="% Unemployed",
ylim=c(6,15), col='black', lwd=2)
axis(1, at=1:11, labels=cnt$monthname, las=2)
for ( i in 1:length(counties) ){
cnt = riemp.by.county[riemp.by.county$region==counties[i],]
lines(cnt$monthnum, cnt$pct.unemp, col=cols[i])
}
legend('topright', legend=append(counties, 'RHODE ISLAND', 0),
fill=append(cols, 'black', 0))