Vote up to Idea ACS XML Vote down to Idea ACS XML

Rank52

Idea#32

This idea is active.
Feature Requests »

ACS XML

I have used an XML reader to put the ACS variables into a tree structure. However, because the variables in the XML file are not in order (after the first level), it is not particularly easy to find the variable you want--particularly when there are over 60,000. Am I missing something?

Comment

Submitted by gio 1 year ago

Vote Activity

  1. Approved
    1 year ago
  2. Approved
    1 year ago

Events

  1. The idea was posted
    1 year ago

Comments (4)

  1. Yes, they are not in order nor is the list complete. You might refer to the ACS 5 year summary file documentation available www.census.gov/acs. The list in the tech docn and related xls table shells are not sorted either.

    1 year ago
  2. I'm a novice at working with xml, but can't you use an XSLT transformation? There's a sort feature in it, e.g (adapted from WROX "Professional XSL", pg 07):

    [xsl:template match="yadda"]

    [xsl:sort select="Sort_on_field_1"/]

    [xsl:sort select="Sort_on_field_2"/]

    [/xsl:template]

    //Note: I'm substituting brackets for the carets because posting using HTML tags is not allowed

    If you're using Java or C# you can serialize your xml dataset and your xslt transformation. Once there, I don't know how you apply the serialized xslt to the xml datasource, but that might be an avenue for you to pursue. This should make it easier to find the hard-to-find variable.

    But I wouldn't even go this route. How are you transforming the dataset to XML? Why not sort the dataset before transforming to XML? Because you're going have a performance hit with so much data to do the xslt transforamtion?

    1 year ago
  3. gio Idea Submitter

    Thanks everyone for the good suggestions....now that I know that the ACS variables are not limited to those in the XML file, and now that I have figured out the coding scheme I am using the table shells for the ACS data and constructing my variable tree from them...

    1 year ago
  4. Moderator

    The xml file has been updated.

    1 year ago