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

Feature request: zoom (date range select) #10

Open
Jskobos opened this issue Dec 1, 2020 · 4 comments
Open

Feature request: zoom (date range select) #10

Jskobos opened this issue Dec 1, 2020 · 4 comments

Comments

@Jskobos
Copy link

Jskobos commented Dec 1, 2020

2 requests:

  • The ability to zoom in on a portion of the map would be helpful.
  • The state comparisons should have an option to view per capita.

I'm happy to take a stab at either or both of these if it would be helpful.

@sid-kap
Copy link
Owner

sid-kap commented Dec 4, 2020

For zooming in, what kind of interface did you have in mind? Like, using the scroll bar or a slider or something? And would the zoom only be for the x axis, or both axes?

I could see zooming both x and y axis as being useful, but the tricky thing is that if you have both axes turned on for zooming, then you can't also zoom one or the other by itself with the scroll wheel/two finger trackpad scroll (see https://vega.github.io/vega-lite/docs/zoom.html for an example).

@sid-kap
Copy link
Owner

sid-kap commented Dec 4, 2020

I definitely want to add per capita numbers for states! To get the per capita numbers for each year, I think we would want to divide the housing units in year X by the population in that year—does that makes sense? This means we would need an intercensal estimate of each state's population for each year between 1980 and 2020.

Looks like 1980-1990 estimates are here: https://www.census.gov/data/tables/time-series/demo/popest/pre-1980-state.html
1990-2000 are here: https://www.census.gov/data/tables/time-series/demo/popest/intercensal-1990-2000-state-and-county-totals.html
2000-2010 are here: https://www.census.gov/data/tables/time-series/demo/popest/intercensal-2000-2010-state.html
2010-2019 are here: https://www.census.gov/data/tables/time-series/demo/popest/2010s-state-total.html

If you're interested in taking a stab, a good first step would be writing a python script to parse each of these data series into a pandas DataFrame containing the columns: year, state name, and population.

@Jskobos
Copy link
Author

Jskobos commented Dec 6, 2020

Yeah that makes sense. I'll give this a shot and let you know how it goes. Thanks

@sid-kap
Copy link
Owner

sid-kap commented Dec 7, 2020

Awesome, thanks! BTW I already got some of the work for the population data started in #14 (that PR also has some unrelated stuff which I'll remove, but the relevant stuff is in population.py).

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