How do you transform spatial data from a shapefile or feature class to TopoJSON or GeoJSON?
You can transform a shapefile or feature class to TopoJSON or GeoJSON by using online resources like mapshaper.org. You can drag or upload your .shp, .sbn, .prj, and .shx file into the website which you can then export into multiple different formats including TopoJSON and GeoJSON.
What is the difference between TopoJSON and GeoJSON formats?
TopoJSON and GeoJSON are both formats for storing geographic features. TopoJSON however, is more compact, which saves space on file size. It does this through using integers and also having shared boundaries between geometry only being represented once in the array, with both geometries sharing it.
How do you upload and read TopoJSON or GeoJSON files in ObservableHQ?
You can upload and read TopoJSON or GeoJSON files in observable by uploading them into the files panel. Once it is uploaded and in the file panel you can then replace the FileAttachment ("example.json")>json() with your own .json file so observable can then read it.
How do you upload and read CSV files in ObservableHQ?
uploading and reading CSV files in observable is extremely similar to doing the same with JSON files. You upload them into the files panel, and once it is uploaded you replace the csv_data FileAttachment with your .csv file that you uploaded into observable. The csv file is then able to be read by observable
How do you create a new variable from existing variables (e.g., population density), and why is normalization important?
To create a new variable from existing variables you first find the variables you want to use in your data and add them into the csv_data after the fileattachment like this .text(),({STATE, U7G001, U7G002, U7G003}). Once you have these inserted you can then use these variables to create new ones by using and arrow and then doing different math on the variables to create new ones, one of the ways you can do that is through taking the variables, one that is total and one that is just an amount of the total that are whole numbers and dividing them by each other and multiplying by 100 to create percentages of the total. I did that with my variables to create percentages of vacant houses by doing this => [STATE,[ U7G001, 100*U7G003/U7G001]]). Normalization is important to create a consistent and uniform average among the data that you are comparing. Without normalization you may be looking at a GDP per each country and bigger countries with more people will usually be much more wealthy looking, however in actuality that wealth is way more spread out. Using normalization like GDP per capita you then can create a more consistent variable where you have GDP per person which more accurately represents the wealth of a country. Normalization is important to make sure you don't have misleading or inconsistent maps.