Giter Site home page Giter Site logo

CDC County Mapping about usmap HOT 4 CLOSED

USMortality avatar USMortality commented on August 20, 2024
CDC County Mapping

from usmap.

Comments (4)

USMortality avatar USMortality commented on August 20, 2024 1

Cool.

I managed to resolve most of it, except Alaska pre 2003, where I some counties were not just split/merged:

# Resolve mapping issues
df |>
    split_row("02261", "02063", "02066") |>
    split_row("02232", "02105", "02230") |>
    split_row("02280", "02275", "02195")
df$fips[df$fips == "02270"] <- "02158"
df$fips[df$fips == "46113"] <- "46102"

split_row is a custom function which simply splices a row into two...

from usmap.

pdil avatar pdil commented on August 20, 2024

I can't seem to access that CDC data but based on your code it seems like they are also using FIPS codes but they're just lacking some of them? I think you should be able to plot the data on the map but the counties that correspond to the missing FIPS codes will appear blank (whatever the default color of the map is). Is this what is happening or are you trying to do something other than coloring a map with the data?

from usmap.

USMortality avatar USMortality commented on August 20, 2024

Simple example:

The current, CDC dataset linked above, still uses Alaska's 02270 fips, instead of the reassigned 022158.
The fix is to run: df$fips[df$fips == "02270"] <- "02158" on the cdc dataset, there's a handful more of these cases.
Screenshot 2023-11-24 at 7 40 12 AM
I was just wondering, if anyone has already mapped these out ;)
If not, just disregard this, and please close. thx :)

from usmap.

pdil avatar pdil commented on August 20, 2024

Unfortunately I'm not aware of anyone that's already done that mapping 🙁

from usmap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.