Aggregate FIPS data to State and Census divisions

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Aggregate FIPS data to State and Census divisions

Miluji Sb
Dear all,

I have the following data by US FIPS code. Is there a package to aggregate
the data by State and Census divisions?

temp <- dput(head(pop1,5))
structure(list(FIPS = c("01001", "01003", "01005", "01007", "01009"
), death_2050A1 = c(18.19158, 101.63088, 13.18896, 10.30068,
131.91798), death_2050A2 = c(22.16349, 116.58387, 15.85324, 12.78564,
155.20506), death_2050B1 = c(21.38906, 76.23018, 21.38218, 17.14269,
151.64466), death_2050B2 = c(23.43543, 81.39378, 22.96802, 18.76926,
161.86404), death_2050BC = c(21.89947, 93.88002, 18.60352, 15.1032,
152.43414)), .Names = c("FIPS", "death_2050A1", "death_2050A2",
"death_2050B1", "death_2050B2", "death_2050BC"), row.names = c(NA,
5L), class = "data.frame")

Thank you!

Sincerely,

Milu

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: Aggregate FIPS data to State and Census divisions

Roman Luštrik
Is `aggregate` doing anything for you? You can specify, with a formula
interface, which column in a data.frame is the variable to summarise and
which are used as factors by which to "cut" the data.

Cheers,
Roman

On Sun, May 1, 2016 at 5:30 PM, Miluji Sb <[hidden email]> wrote:

> Dear all,
>
> I have the following data by US FIPS code. Is there a package to aggregate
> the data by State and Census divisions?
>
> temp <- dput(head(pop1,5))
> structure(list(FIPS = c("01001", "01003", "01005", "01007", "01009"
> ), death_2050A1 = c(18.19158, 101.63088, 13.18896, 10.30068,
> 131.91798), death_2050A2 = c(22.16349, 116.58387, 15.85324, 12.78564,
> 155.20506), death_2050B1 = c(21.38906, 76.23018, 21.38218, 17.14269,
> 151.64466), death_2050B2 = c(23.43543, 81.39378, 22.96802, 18.76926,
> 161.86404), death_2050BC = c(21.89947, 93.88002, 18.60352, 15.1032,
> 152.43414)), .Names = c("FIPS", "death_2050A1", "death_2050A2",
> "death_2050B1", "death_2050B2", "death_2050BC"), row.names = c(NA,
> 5L), class = "data.frame")
>
> Thank you!
>
> Sincerely,
>
> Milu
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> [hidden email]
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>



--
In God we trust, all others bring data.

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: Aggregate FIPS data to State and Census divisions

Miluji Sb
Dear Roman,

Thank you for your reply. I can use the aggregate function but its the
matching FIPS codes to their states that I am having trouble. Thanks again.

Sincerely,

Milu

On Sun, May 1, 2016 at 5:49 PM, Roman Luštrik <[hidden email]>
wrote:

> Is `aggregate` doing anything for you? You can specify, with a formula
> interface, which column in a data.frame is the variable to summarise and
> which are used as factors by which to "cut" the data.
>
> Cheers,
> Roman
>
> On Sun, May 1, 2016 at 5:30 PM, Miluji Sb <[hidden email]> wrote:
>
>> Dear all,
>>
>> I have the following data by US FIPS code. Is there a package to aggregate
>> the data by State and Census divisions?
>>
>> temp <- dput(head(pop1,5))
>> structure(list(FIPS = c("01001", "01003", "01005", "01007", "01009"
>> ), death_2050A1 = c(18.19158, 101.63088, 13.18896, 10.30068,
>> 131.91798), death_2050A2 = c(22.16349, 116.58387, 15.85324, 12.78564,
>> 155.20506), death_2050B1 = c(21.38906, 76.23018, 21.38218, 17.14269,
>> 151.64466), death_2050B2 = c(23.43543, 81.39378, 22.96802, 18.76926,
>> 161.86404), death_2050BC = c(21.89947, 93.88002, 18.60352, 15.1032,
>> 152.43414)), .Names = c("FIPS", "death_2050A1", "death_2050A2",
>> "death_2050B1", "death_2050B2", "death_2050BC"), row.names = c(NA,
>> 5L), class = "data.frame")
>>
>> Thank you!
>>
>> Sincerely,
>>
>> Milu
>>
>>         [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-sig-Geo mailing list
>> [hidden email]
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>
>
>
>
> --
> In God we trust, all others bring data.
>

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo