pdil / usmap

🗺 Create US maps including Alaska and Hawaii in R
https://usmap.dev/
GNU General Public License v3.0
73 stars 16 forks source link

Have a parameter for the year needed #110

Open CIOData opened 3 months ago

CIOData commented 3 months ago

I was mapping county-level data today using usmap and realized that my values for Connecticut were being rejected. I am using data from 2016-2020, so it still has the older Connecticut counties in it, but apparently plot_usmap() only recognizes the new counties (which have different FIPS codes than the previous one). Would it be possible to allow a year argument so that the appropriate geometries get included for older data? I imagine this may come in useful in other circumstances as well (such as the ever evolving city/county issue in Virginia).

Thanks.

pdil commented 3 months ago

Yes this is a good idea, I will have to do an analysis of the file sizes involved since adding too many yearly map data sets may increase the package size beyond the limit that CRAN recommends (I think 5 MB for data). Currently the usmapdata files that usmap uses take up about 3 MB uncompressed (~1 MB compressed) so there is probably room to add a few more years but either way I will investigate further.

CIOData commented 3 months ago

Thanks. The Connecticut one is the most pressing. Changes in Virginia can be worked around in the data, but there is no direct translation of data between old and new Connecticut counties.

Sent via the Samsung Galaxy S22 Ultra 5G, an AT&T 5G smartphone Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Paolo Di Lorenzo @.> Sent: Friday, May 17, 2024 3:15:22 PM To: pdil/usmap @.> Cc: CIO Data @.>; Author @.> Subject: Re: [pdil/usmap] Have a parameter for the year needed (Issue #110)

You don't often get email from @.*** Learn why this is importanthttps://aka.ms/LearnAboutSenderIdentification CAUTION: External Sender

Yes this is a good idea, I will have to do an analysis of the file sizes involved since adding too many yearly map data sets may increase the package size beyond the limit that CRAN recommends (I think 5 MB for data). Currently the usmapdata files that usmap uses take up about 3 MB uncompressed (~1 MB compressed) so there is probably room to add a few more years but either way I will investigate further.

— Reply to this email directly, view it on GitHubhttps://github.com/pdil/usmap/issues/110#issuecomment-2118230825, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AV63IT7CEUF4HSFU2YRLLVDZCZJMVAVCNFSM6AAAAABH4S5PK2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJYGIZTAOBSGU. You are receiving this because you authored the thread.Message ID: @.***>