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
add USA with territories represented in US Congress #6
Comments
will start working on this. would be cool if another contributor with more knowledge were to get it working first 😄 |
it looks like it should be possible to create this by forking the https://github.com/rveciana/d3-composite-projections/blob/master/src/albersUsa-proj.js |
(small) progress! just rendered a map with the I think that I need to use a topojson file that contains the small island territories I want to show. Since the topojson file link to the line of code where I change the topojson file I already notice that the names of features vary from one topojson file to another. It also looks like the way that people represent boundaries like states also varies. In one case the topojson is nested, in the other it is more flat with features like the state loaded on as properties. hhhhmmm. Next, I will try to show the boundaries on the individual congressional districts on the map. Then, I will add the positions for one of the islands (probably |
took a closer look at the two geographies, before compositing. I want to make sure that the islands I want to are indeed in the geography I'm using (that is, the topojson file I created from the shapefile I downloaded). here's some screenshot prototypes that I marked up with GIMP first then |
so I searched this and found a similar listing for American Samoa progress! |
found the docs for
|
a first effort at adding American Samoa got the path that shows the boundaries between the composite projections to render. that's something! so many parameters to tune... |
the current best effort, as an anonymous block on blockbuilder |
I'll take your topojson example to see all the lands. When I have an example, I'll send it! |
@rveciana that would be delightful 😄 |
latest conversation, for anyone following along at home https://twitter.com/rveciana/status/772118057649074176 |
I'll put some information here: |
The code:
|
@rveciana thanks for putting the information here 😄 using the other projection and the |
First working version: http://bl.ocks.org/rveciana/ce5936de720ebb83aafecb35dfd9531a |
👍 will take a closer look |
by the way, thanks for introducing me to |
got the first working version running locally for my closer look. some first impressions: it makes sense to use one view (and one blue composition border) for the islands that are near to each other, like one solution to make individual territories distinct in an example like this is to draw a path between the different territories inside of a shared composition boundary. another possible solution is a If I remember correctly, the way to find the specific place under the mouse cursor in here are the d3.geo v4 docs for working on figuring this part out now 😄 |
one other step I'd like to do for this example, that I've overlooked so far:
from @mbostock's StackOverflow answer about creating a congressional district map in d3 (without territories) |
I've changed the block so an alert showing the district appears when a region is clicked. |
Good question. A US congressional district is a political district within a US state (and occasionally contains an entire state). The congressional districts have no formal relationship with US counties. |
creating a new topojson file will be a good learning exercise for me 😄 |
ah, the way we do the data binding is the difference here. before we had one path. now we have many paths, with one for each district. now this makes sense 👌 |
this might be useful https://github.com/bradoyler/atlas-make/tree/master/us-congress |
Oh, this is much better! Some territories are not present, but I'll try to add them from the world-50m file. The examples will improve a lot, thank you. |
Finally, I'm more or less satisfied with this dataset & projection: |
very nice! will post here when I finish the original project that inspired this feature request :-) |
Thank you! If people uses it, I'll be really happy. |
so I'm following these instructions for generating topojson for US Congressional districts
from this shapefile data for 114th Congress from US census available at
ftp://ftp2.census.gov/geo/tiger/TIGER2016/CD/
and I realize, whoa, there are several distant lands of the US beyond Alaska and Hawaii
it would be cool to add a
d3-composite-projection
that includes the territories represented by the non-voting members of the U.S. House of RepresentativesAmerican Samoa
Guam
Northern Mariana Islands
Puerto Rico
U.S. Virgin Islands
The text was updated successfully, but these errors were encountered: