Coder Social home page Coder Social logo

us-atlas's Introduction

U.S. Atlas TopoJSON

This repository provides a convenient redistribution of the Census Bureau’s cartographic boundary shapefiles, 2017 edition as TopoJSON. For earlier editions, see past releases. Both projected and unprojected geometries are included. The projection used by these files is:

d3.geoAlbersUsa().scale(1300).translate([487.5, 305])

This is a conic equal-area Albers projection suitable for choropleth maps and designed to fit a 975×610 viewport.

Usage

In a browser, using d3-geo and SVG:
https://observablehq.com/@d3/u-s-map

In a browser, using d3-geo and Canvas:
https://observablehq.com/@d3/u-s-map-canvas

In Node, using d3-geo and node-canvas:
https://bl.ocks.org/mbostock/885fffe88d72b2a25c090e0bbbef382f

File Reference

# counties-10m.json · Download

A TopoJSON file containing the geometry collections counties, states, and nation. The geometry is quantized and simplified, but not projected. This topology is derived from the Census Bureau’s cartographic county boundaries, 2017 edition. The state boundaries are computed by merging counties, and the nation boundary is computed by merging states, ensuring a consistent topology.

# counties-albers-10m.json · Download

A TopoJSON file containing the geometry collections counties, states, and nation. The geometry is quantized, projected using d3.geoAlbersUsa to fit a 975×610 viewport, and simplified. This topology is derived from the Census Bureau’s cartographic county boundaries, 2017 edition. The state boundaries are computed by merging counties, and the nation boundary is computed by merging states, ensuring a consistent topology.

# states-10m.json · Download

A TopoJSON file containing the geometry collections states and nation. The geometry is quantized and simplified, but not projected. This topology is derived from the Census Bureau’s cartographic state boundaries, 2017 edition. The nation boundary is computed by merging states, ensuring a consistent topology.

# states-albers-10m.json · Download

A TopoJSON file containing the geometry collections states and nation. The geometry is quantized, projected using d3.geoAlbersUsa to fit a 975×610 viewport, and simplified. This topology is derived from the Census Bureau’s cartographic state boundaries, 2017 edition. The nation boundary is computed by merging states, ensuring a consistent topology.

# nation-10m.json · Download

A TopoJSON file containing the geometry collection nation. The geometry is quantized and simplified, but not projected. This topology is derived from the Census Bureau’s cartographic nation boundary, 2017 edition.

# nation-albers-10m.json · Download

A TopoJSON file containing the geometry collection nation. The geometry is quantized, projected using d3.geoAlbersUsa to fit a 975×610 viewport, and simplified. This topology is derived from the Census Bureau’s cartographic nation boundary, 2017 edition.

# us.objects.counties

Each county has two fields:

  • county.id - the five-digit FIPS county code, such as "06069"
  • county.properties.name - the county name, such as "San Benito"

The first two digits of the county FIPS code is the state FIPS code.

# us.objects.states

Each state has two fields:

  • state.id - the two-digit FIPS state code, such as "06"
  • state.properties.name - the state name, such as "California"

# us.objects.nation

The nation has two fields:

  • nation.id - the string "US"
  • nation.properties.name - the string "United States"

us-atlas's People

Contributors

awsles avatar dboze avatar mbostock avatar mourner avatar nelsonminar avatar pbogden avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

us-atlas's Issues

Preserving data?

In each step of this Makefile, the data from the original shapefiles is thrown away by not specifying -p. Is the expectation that it would be joined back in with another tool?

I'm tinkering with a version of this 'for dummies' that would have pre-built data, preserve a minimum of properties, and aim for that <1MB threshold that's web-map-friendly. Thoughts?

US-Atlas/States-10m: Alaskan arcs attributed to other state arcs

The following arcs in US-Atlas/States-10m topojson, which actually belong to Alaska, are also attributed to other states:
Louisiana - 89
Ohio - 103, 126
Vermont - 76, 84
Nevada - 14, 65, 69
Idaho - 50, 66, 70, 87
Nebraska - 127
Washington - 71
Wisconsin - 96, 98, 100, 128
Virginia - 67, 114, 115, 117, 137
Tennessee - 91, 122, 123, 124, 125
Maryland - 138, 139

This causes unexpected per state callback behaviors.
Please let me know if this is not the appropriate place to file this issue

Installing on Ubuntu?

I am trying to run the makefile in Ubuntu13.04. But I am getting errors. Any instructions on how to get this maps on Ubuntu? Thank you.

Here is the first error I am getting while running sudo ./Make

fs.js:427
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: ENOENT, no such file or directory ''
at Object.fs.openSync (fs.js:427:18)
at Object.fs.readFileSync (fs.js:284:15)
at inputJson (/usr/lib/node_modules/topojson/bin/topojson:207:30)
at pop (/usr/lib/node_modules/topojson/node_modules/queue-async/queue.js:51:14)
at Object.queue.defer (/usr/lib/node_modules/topojson/node_modules/queue-async/queue.js:25:9)
at /usr/lib/node_modules/topojson/bin/topojson:153:5
at Array.forEach (native)
at Object. (/usr/lib/node_modules/topojson/bin/topojson:152:8)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)

make streamflow data

I probably ought not be getting my feet wet with D3 via custom topojson, but here I am.

I've got things installed so that I can make us/us-10m.json but make all does not work.

I'd most particularly like to work with the watershed boundary data.

How do I roll my own make requests against the strream data? Only example I can find is the png in the samples of this us-atlas repo.

thanks!

prepublish script looking for toposimplify in wrong location?

On a fresh checkout and npm install with node v4.6.1 and npm v3.10.9 on OS X, the install process gets stuck looking for toposimplify at node_modules/topojson/node_modules/topojson-simplify/bin/toposimplify but it's at node_modules/topojson-simplify/bin/toposimplify.

I'm still new to node so I'm not sure what the issue is / why topojson-simplify was checked out at the top level instead of within topojson.

Output json file displays features upside down in tools such as QGIS and Felt

Steps to reproduce.

1 - Go to the README.md and download the counties-albers-10m.json file
2 - Open the file in Qgis or use Felt's online tool's 'upload anything' functionality.

CleanShot 2024-06-18 at 08 29 52

Everything is upside down.

Thoughts

I see in the observable notebook that it is using D3 for rendering, and it seems to put everything correctly side up, but is there a way I can make this work in a desktop GIS tool like QGIS?

It seems that all that needs to be done is flip the features across the x-axis (latitude line), but I'm unsure how best to do this.

Create zcta5 or zcta3 topojson?

Zipcodes are not geographic regions. Nevertheless, there are zipcode tabulation areas (ZCTAs) from the U.S. census. There are also several github projects to try to make those usable with geojson. For example, https://github.com/jgoodall/us-maps.

I also tried to cobble together some zcta5 topojson to display (actually I wanted zcta3). I ran into an issue, as jgoodall did.

It would be nice to have ZCTA5 (or for me ZCTA3) topojson somewhere.

2018 edition.

We should publish the 2018 edition (and possibly 2019).

County json

Looking for help on how to use us-atlas to create a JSON file that shows a state's counties. I want something like this (http://bl.ocks.org/mbostock/5349951) for Florida. I followed Mike's tutorial for a U.S. map, but I'm stuck at the state level. I'm not sure how to proceed.

Windows Support

I'm hoping to get a cbsa topojson file, and currently use a windows machine. How can I use this?

Support for city/town

I am trying to perform a data visualization with information about cities/towns, but I don't find any way how to extract such borders.
Are these information available in the original shapefile? Is it possible to extract in some ways these information?

Outdated Alaska county: Valdez–Cordova

Per Wikipedia:

Valdez–Cordova Census Area was a census area located in the state of Alaska, United States.[3] As of the 2010 census, the population was 9,636.[4] It was part of the Unorganized Borough and therefore had no borough seat. On January 2, 2019, it was abolished and replaced by the Chugach Census Area and the Copper River Census Area.[3]

I'm not seeing the old county in the latest Census data. Here are the new counties:
Copper River (02066)
Chugach (02063)

path of topo directory

I seemed to have installed everything successfully and ran "make" without problems. However, I can't see a "topo/" directory anywhere, just various stackings under "topojson/", none of which have the made JSON files. Can I get the path to the directory or any updates about how this is stacked?

Thank you!

Old County Data

County data reflects older maps and does not include several counties and equivalents, including the most recent addition "Petersburg, AK" with FIPS 02195

Connecticut planning regions

Just wanted to raise this for awareness. The state of Connecticut has asked the census bureau to use their county equivalent planning regions instead of counties for reporting data. The names, shapes, and FIPS codes of the planning regions are different from the previously used counties.

I believe this is taking effect in 2024. I am already seeing planning regions in some census data reports. I noticed this because when I tried to map the FIPS codes of the new data, nothing showed up for the state of Connecticut (because the topojson files have the old county FIPS codes).

I suspect this may cause issues going forward. Although I'll let someone more knowledgeable weigh in on that. My understanding is that the old county FIPS codes will no longer be used, but I may be mistaken.

Here's a full announcement with related data like shape files: https://www.ctdata.org/blog/geographic-resources-for-connecticuts-new-county-equivalent-geography

Non-projected?

It’d be nice to have a version that’s not projected.

following the readme instructions doesn't generate any files

Mac mavericks, with node v0.10.26, npm 1.4.3, and GNU make 3.81.

I feel crazy, because nobody else is reporting this?

  • npm install works with the PKG_CONFIG_PATH thing
  • make and make all do nothing. Spits out make: Nothing to be done for all

Is there a missing step somewhere?

edit: building single files works fine. e.g. make topo/us-states-10m.json is successful

LICENSE

Hi, I want to use this for a project I'm working on, but I need to know the licensing terms. Would you mind adding a license (like you have for d3 or topojson)?

Error when running make

Cloned the repo, ran npm install, then make, and got this error:

Makefile:249: *** mixed implicit and normal rules.  Stop.

I inspected the makefile and see that the offending block appears to be

shp/us/zipcodes.shp shp/%/tracts.shp shp/%/blockgroups.shp shp/%/blocks.shp:
    rm -rf $(basename $@) && mkdir -p $(basename $@) && unzip -d $(basename $@) $<
    for file in $(basename $@)/*; do chmod 644 $$file; mv $$file $(basename $@).$${file##*.}; done
    rmdir $(basename $@)
    touch $@

A quick googling shows some discussions about the mixing of paths with and without the % character, so perhaps that's the cause? I'm afraid I don't know enough about makefiles to offer a solution.

Makefile

Hi there!

To make the git clone work I made some adjustments as it follows:

  1. download v0.0.4 tar.gz released
  2. git clone repo(obvious)
  3. replace cloned Makefile content with tar gzipped version
  4. change the path of binary topojson - line 4
  5. replace cloned geomerge content with topomerge tar gzipped version (both bin dir)
  6. replace cloned geouniq content with topouniq tar gzipped version (both bin dir)

Now I can run make all, make topo/us-10m.json and so on.
Many thanks for your software.

ZipCode generation taking long time

Zip code generation is going on 36 hours. How long does this typically take? Wondering if I need to be patient but I'm guessing something must not be right. Thanks for the help.

Add/explain scale targets

The current 10m/1:10,000,000 scale is great, but it'd be nice to have an option for higher precision, especially as a basis for generating TopoJSON for individual states.

This seems to be the result of quantization and simplification. So, changing:

        --no-pre-quantization \
        --post-quantization=1e6 \
        --simplify=7e-7 \

to:

        --no-pre-quantization \
        --post-quantization=1e4 \
        --simplify-proportion=.5 \

results in more precise TopoJSON. But, I don't understand how the first set of arguments was derived from a 1:10,000,000 scale, or what I'd have to do to precisely define, say, a 1m or 100k scale.

Apologies if this information is already available in the docs, or via links. I'm definitely a newbie in this area.

Cairo error

I got a bit hung up on this. But anyone who gets:

Package cairo was not found in the pkg-config search path. Perhaps you should add the directory containing cairo.pc'
to the PKG_CONFIG_PATH environment variable
No package 'cairo' found
gyp: Call to './util/has_cairo_freetype.sh' returned exit status 0. while trying to load binding.gyp`

on npm install

needs to install Cairo, using

brew install cairo

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.