Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merging GeoJSON with Statistics returns an empty array #353

Open
dumitruPuggle opened this issue Jul 3, 2023 · 3 comments
Open

Merging GeoJSON with Statistics returns an empty array #353

dumitruPuggle opened this issue Jul 3, 2023 · 3 comments

Comments

@dumitruPuggle
Copy link

Hello!
I've started to search for an way to receive the statistics encoded using GeoJSON for my google maps feature.

I tried to follow the official documentation provided in your Readme file, specifically this code:
https://github.com/uscensusbureau/citysdk#all-counties

When I run the request, I receive the following output:
Screenshot 2023-07-03 at 23 02 31

Thanks

@loganpowell
Copy link
Member

loganpowell commented Jul 3, 2023 via email

@dumitruPuggle
Copy link
Author

import census from "citysdk";

interface ICensusCartographicData {}

//* Gets the raw census data
export const getCartographicData = async ({}: ICensusCartographicData) => {
  return new Promise((resolve) => {
    census(
      {
        vintage: "2017",
        geoHierarchy: {
          county: "*",
        },
        sourcePath: ["acs", "acs5"],
        values: ["B19083_001E"], // GINI index
        statsKey: "...",
        geoResolution: "500k",
      },
      async (err: any, res: any) => {
        resolve(res);
      },
    );
  });
};

@loganpowell
Copy link
Member

Sorry, this got buried under other work. I am really busy this week, but I will get to this by the end of the week. In the meantime, if you have a reproduction repo I can see, that would help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants