GithubHelp home page GithubHelp logo

Comments (9)

dfarrow0 avatar dfarrow0 commented on June 23, 2024

Hey fellow character!

This API surfaces the same data that's shown by that visualization. For geo_type=county, geo_value is a FIPS 6-4 county code, which is distinct from zip code.

See https://www2.census.gov/geo/docs/reference/codes/files/national_county.txt for a list of county codes. Find more info on the census website.

From the file above:

CO,08,031,Denver County,H6

Denver county has FIPS 6-4 code 08031. So you could use the following link to get data in that county:

https://delphi.cmu.edu/epidata/api.php?source=covidcast&data_source=fb-survey&signal=cli&time_type=day&geo_type=county&time_values=20200401-20200420&geo_value=08031

from delphi-epidata.

berniefu avatar berniefu commented on June 23, 2024

lol. Thanks David!

To confirm another detail, is the unit of the 'value' field percentage?
"value":1.83148395307
^
|
a.k.a. is this 1.83%?

from delphi-epidata.

dfarrow0 avatar dfarrow0 commented on June 23, 2024

For this particular data_source=fb-survey, yes, the value is a percentage. In general, the unit depends on the data source.

from delphi-epidata.

berniefu avatar berniefu commented on June 23, 2024

Reopen this again to confirm more details: I calculated the county level data from 4/1 to 4/20 (getting a mean from value and sample_size), and generated a tableau graph on my side. However, the data doesn't not quite look at the FB map (https://covid-survey.dataforgood.fb.com/):

Screen Shot 2020-04-21 at 1 37 30 PM

Could you please share more details about how the FB data is generated?

Specifically as an example, for FIPS 27137 (St Louis MN), there is only one data point in the time range:
https://delphi.cmu.edu/epidata/api.php?source=covidcast&data_source=fb-survey&signal=cli&time_type=day&geo_type=county&time_values=20200401-20200420&geo_value=27137

The value is 0.145, which is different from the FB data (0.77% at this moment).

Thanks!!

from delphi-epidata.

dfarrow0 avatar dfarrow0 commented on June 23, 2024

I'm most familiar with the technical aspects of the API. I'm not as comfortable with questions on how this particular signal is generated.

@lcbrooks would you be able to answer this question?

from delphi-epidata.

brookslogan avatar brookslogan commented on June 23, 2024

Facebook's visualizer's county-level data is based on weekly estimates using the weighted version of the estimator. It should be most similar to the smoothed_wcli & smoothed_wili signals.

from delphi-epidata.

berniefu avatar berniefu commented on June 23, 2024

Thanks Brooks! There is a wili signal types for FB survey data:
https://github.com/cmu-delphi/delphi-epidata/blob/master/docs/api/covidcast.md
Is that what you meant? I also didn't find anything talking about the 'smoothed'.

from delphi-epidata.

dfarrow0 avatar dfarrow0 commented on June 23, 2024

The docs were stale. I just updated them with current signal names, including "smoothed" versions.

Relatedly, the covidcast_meta endpoint will return the current set of signal names for each data source (along with other info).

from delphi-epidata.

berniefu avatar berniefu commented on June 23, 2024

Thanks both! This is very helpful. I'm now able to get something that's not very far from the fb dashboard (using smoothed_wcli, last 7 day data):
Screen Shot 2020-04-23 at 12 38 48 PM

from delphi-epidata.

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.