To obtain a TopoJSON file, you must first open up mapshaper. Import your file by hitting "select", and click on the ".shp", ".shx", "dbx.", and ".prj" files you want to use. Then, click submit. You may need to simplify so that the file size is smaller and will properly upload into Observable. To do so, hit the "simplify" button in the upper right corner and click "apply". A moveable scale at the top will appear, and moving it to the right will basically smooth the lines out and make it a less complicated file. Don't do it too much that it disrupts the borders of your shape and makes things unrecognizable, just enough to make it a smaller file. When you're done, click "export" in the top right corner and select GeoJSON or TopoJSON under "file format", then hit select. You are now ready to add the file into your notebook!
To upload a JSON file, after you have converted the .shp file into a .json file, select the paperclip icon in the top right, and click the plus sign in the popup. Then, select the .json file you want to use! To read the file, type the name of the file into the space between the quotation marks in the file above (you made need to delete some text). The spot is located where it says US_county_2020 (2).json in the line above. Then select the black play button to the right of the line above this!
The difference between a TopoJSON and a GeoJSON is that TopoJSON contains topological information, and borders are shared, so the boundaries between counties, for example, will be represented by a single, clean line. GeoJSON is based on a spaghetti model, so each area will have its own line, so the borders may not line up perfectly and could look messy.
Uploading a CSV file is very similar to uploading a JSON file! select the paperclip icon in the top right, and click the plus sign in the popup. Then, select the .csv file you want to use (you may need to convert a .dbf file into a .csv first)! To read the file, type the name of the file into the space between the quotation marks in the file above (you made need to delete some text). The spot is located where it says countyBirdCounts@1.csv in the line above. Then select the black play button to the right of the line above this!
To create a new variable from existing variables, simply type the column names (when you actually open the .csv file) of the variables you want to use into the space between the "{}" symbols, and separate each variable by commas. After the arrow, you can manipulate these variables however you want to create a new variable. For example, in the line above, I divided Join_Count (amount of eagles in a specific county) by Shape_Area (the area of that county) to find the density of eagles in that specific county. Normalization is important because it makes the data easier to read, doesn't allow certain units to overpower smaller sets of data which will avoid misleading chloropleth maps, and may show patterns!