census

R post-merge ggplot/qmap plots zipcode polygons incorrectly (jagged)

旧街凉风 提交于 2019-12-11 09:05:59
问题 I have spent days searching this site and others for a solution, and haven't found it yet. If there is another page with my solution, and I missed it, I apologize. I found this but reloading ggplot2 and rgdal (after detaching) didn't fix it. I am using demographic data at the ZCTA (zip code tabulation area) to overlay polygons on a Google terrain map. I am able to get the polygons plotted correctly using qmap, but after I merge in the demographic data, the plots are all wrong. I've tried

Parsing an XML response to a query

£可爱£侵袭症+ 提交于 2019-12-11 00:08:20
问题 I am trying to extract the County fips number for a large number of lines of longitude and latitude. I can get the data from an FCC API, but am having a hard time reading it into R. For example, when I run the following code in R: library(httr) fips <- GET("http://data.fcc.gov/api/block/find", query = list(latitude = 48.9905, longitude = -122.2733, showall="false")) result <- content(fips, as = "parsed") result the object "result" is displayed as follows {xml_document} <Response> [1] <Block

How do I convert from Census FIPS to Lat Lon?

本小妞迷上赌 提交于 2019-12-10 09:43:45
问题 I'm trying to learn some skills in programming (python) by plotting out/manipulating public data sets. Currently, I'm trying to make an interactive population map of the Arctic. I downloaded Alaskan census data from the Alaskan State Department of Labor which gave me population divided by census tract in FIPS (i.e. 0201301090 is Akutan City in the Aleutians East Borough). Is there a way to convert FIPS to Lat Lon or plot by FIPS in python? 回答1: The FIPS code for places in your example (the

Retrieve Census tract from Coordinates [closed]

只谈情不闲聊 提交于 2019-12-06 06:09:49
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . I have a dataset with longitude and latitude coordinates. I want to retrieve the corresponding census tract. Is there a dataset or api that would allow me to do this? My dataset looks like this: lat lon 1 40.61847 -74.02123 2 40.71348 -73.96551 3 40.69948 -73.96104 4 40.70377 -73.93116 5 40.67859 -73.99049 6 40

How to use http://www.census.gov API to pull data

倖福魔咒の 提交于 2019-12-06 02:49:37
问题 Am trying to query data from http://www.census.gov, using their API I want to get the population of a particular city in the US, by using the city name and the US state code. Given that I already have the key, what other parameters do I add in the URL below, so that I can get the population. http://api.census.gov/data/2010/sf1?key=<my key> any assistance will be greatly appreciated 回答1: Judging from your query URI, you wish to access population data from the 2010 Census Summary File. You

How do I convert from Census FIPS to Lat Lon?

主宰稳场 提交于 2019-12-06 00:40:13
I'm trying to learn some skills in programming (python) by plotting out/manipulating public data sets. Currently, I'm trying to make an interactive population map of the Arctic. I downloaded Alaskan census data from the Alaskan State Department of Labor which gave me population divided by census tract in FIPS (i.e. 0201301090 is Akutan City in the Aleutians East Borough). Is there a way to convert FIPS to Lat Lon or plot by FIPS in python? The FIPS code for places in your example (the 01090 part) is in a style (FIPS 55.3) that was retired long ago by the Census Bureau, so finding a good data

r tidycensus download all block groups

喜夏-厌秋 提交于 2019-12-04 11:56:54
I am looking to automate the process of downloading Census data from all block groups from the US using the tidycensus package. There is instructions from the developer to download all tracts within the US , however, block groups cannot be accessed using the same method . Here is my current code that does not work library(tidyverse) library(tidycensus) census_api_key("key here") # create lists of state and county codes data("fips_codes") temp <- data.frame(state = as.character(fips_codes$state_code), county = fips_codes$county_code, stringsAsFactors = F) temp <- aggregate(county~state, temp, c

How to use http://www.census.gov API to pull data

无人久伴 提交于 2019-12-04 07:19:22
Am trying to query data from http://www.census.gov , using their API I want to get the population of a particular city in the US, by using the city name and the US state code. Given that I already have the key, what other parameters do I add in the URL below, so that I can get the population. http://api.census.gov/data/2010/sf1?key=<my key> any assistance will be greatly appreciated Judging from your query URI, you wish to access population data from the 2010 Census Summary File. You would add GET paramaters of get and for to your query. Example: http://api.census.gov/data/2010/sf1?key

Creating Population Pyramid with D3.js

徘徊边缘 提交于 2019-12-03 07:54:49
问题 I need to make a classic looking population pyramid with D3.js. Something similar to this image: I have found a few examples that look really good (this and this) but they are more complex than I'm looking for. Does anyone know of a good SIMPLE example that I can look at? Any advice for starting this? Should I just be making two bar graphs next to each other, one for each sex group? 回答1: The key to making a visualization like this is to spend a good amount of time setting up the layout in

How to combine state-level shapefiles from the united states census bureau into a nationwide shape

╄→尐↘猪︶ㄣ 提交于 2019-12-03 07:40:53
The census bureau doesn't provide a nationwide shapefile of public use microdata areas (the smallest geography available on the American Community Survey). I tried combining them all with a few different methods, but even the one that de-dupes identifiers breaks once it hits California. Am I doing something silly or does this require a difficult workaround? Here's code to reproduce up to the point where things break. library(taRifx.geo) library(maptools) td <- tempdir() ; tf <- tempfile() setInternet2( TRUE ) download.file( "ftp://ftp2.census.gov/geo/tiger/TIGER2014/PUMA/" , tf ) al <-