Dear Visitors:

Please scroll down the page to see present and archive blogs.

Thank you very much: Tramway Null(0)

Webrings - Maps - Trolleys and More

Navigation by WebRing.

Tuesday, July 17, 2018

Brooklyn New York Journey to Work by Streetcar or Trolley: ACS 2012 -2016


  From Census Reporter:

Table universe: Workers 16 Years and Over







Columns in this table

  • Total:
  • Car, truck, or van:
  • Drove alone
  • Carpooled:
  • In 2-person carpool
  • In 3-person carpool
  • In 4-or-more-person carpool
  • Public transportation (excluding taxicab):
  • Bus or trolley bus
  • Streetcar or trolley car (carro publico in Puerto Rico)
  • Subway or elevated
  • Railroad
  • Ferryboat
  • Bicycle
  • Walked
  • Taxicab, motorcycle, or other means
  • Worked at home
Subtable 10 just deals with trolley trips (number of workers above 16 for a census tract)

Resultant File that can be exported into EXCEL then geocoded into ARCGIS.  The field that that is analyzed is called "estimate".

  GEOID                                      NAME   variable estimate moe                       geometry
756 36047028800  Census Tract 288, Kings County, New York B08006_010        0  11 MULTIPOLYGON (((-73.998254 ...
757 36047041300  Census Tract 413, Kings County, New York B08006_010       18  29 MULTIPOLYGON (((-73.913946 ...
758 36047035400  Census Tract 354, Kings County, New York B08006_010        0  16 MULTIPOLYGON (((-73.976549 ...
759 36047036300  Census Tract 363, Kings County, New York B08006_010        0  11 MULTIPOLYGON (((-73.9223 40...
760 36047119000 Census Tract 1190, Kings County, New York B08006_010        0  11 MULTIPOLYGON (((-73.877339 ...
761 36047018200  Census Tract 182, Kings County, New York B08006_010        0  11 MULTIPOLYGON (((-74.005521 ...
> write.csv(tarr, file = "Streetcar_Bklyn2.csv")

R Code:


library(tidycensus)

> library(tidyverse)
> library(viridis)
> census_api_key("Use your own key"), install = TRUE)
Error: A CENSUS_API_KEY already exists. You can overwrite it with the argument overwrite=TRUE
> tarr <- get_acs(geography = "tract", variables = "B08006_010",
+                 state = "NY", county = "Kings", geometry = TRUE)
Getting data from the 2012-2016 5-year ACS
Downloading feature geometry from the Census website.  To cache shapefiles for use in future sessions, set `options(tigris_use_cache = TRUE)`.
Using FIPS code '36' for state 'NY'
Using FIPS code '047' for 'Kings County'


Hi Folks:

    I came across a procedure for extracting data from the census using "R".  Interestingly, there is census data dealing with the journey to work.    There are table codes for this case and I used table prefix 08:  Journey to Work:  Worker's Characteristics: Commuting.  The code given in R by "RBloggers"  is able to extract a vast amount of statistics using the County variable.  Yes, Brooklyn has not had streetcars or trolleys since 1956 but look at the results in the map.   Are these Brooklynites  working in Jersey City or Newark New Jersey where there are streetcars?   Do they work or Phildadelphia or elsewhere?  Or did they missunderstand the question?  I am not sure.



The code for NY state is:
ny %>%
+ mutate(NAME = gsub(" County, ny", "", NAME)) %>%
+  ggplot(aes(x = estimate, y = reorder(NAME, estimate))) +
+   geom_errorbarh(aes(xmin = estimate - moe, xmax = estimate + moe)) +
+   geom_point(color = "red", size = 3) +
+   labs(title = "Journey to Work by Streetcar in New York State ACS",
+        subtitle = "2012-2016 American Community Survey",
+        y = "",
+        x = "ACS estimate (bars represent margin of error)")



> ## End(Not run)

And when run, see the  counties in NYS that  have streetcar ACP statistics: Lines are MOE's Margins of Error.







  GEOID                                      NAME   

No comments:

Post a Comment