Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

convert .dat files to either .dta, .shp, .bdf, or .csv

Tags:

gis

dta

I have downloaded spatial data from the USGS website that comes in a .dat format, which I can't read in textedit either - it just says "../ofr041189it03/vat.adf". I am familiar with STATA, ArcGIS, and GeoDA, so I was hoping to convert it into a type that can be read by any of these programs (preferably STATA), but don't know how. Any ideas?

like image 637
Mere Avatar asked Jul 14 '12 12:07

Mere


People also ask

Is DAT same as CSV?

CSV literally means comma-separated values. Your . dat file is a CSV-file and the suffix is irrelevant as it is a text file in either case.

How do I convert a DAT file to a readable format?

Most DAT files contain text, so you can open them with text editors, like Notepad, Notepad++, VS Code, and so on. If you are sure the information contained in the DAT file is a video or audio, then your media player can open it. If it's a PDF, then Adobe Reader can open it, and so on.

How do I convert a .DAT file to CSV in Python?

You can convert a . dat file to a CSV file in Python in four simple steps: (1) Install the Pandas library, (2) import the Pandas library, (3) read the CSV file as DataFrame, and (4) write the DataFrame to the file.


1 Answers

Open a New Blank Excel file

In Excel

  1. Go to Data tab
  2. Select From Text
  3. Select the .dat file which you want to open(Note: Select "All files" in dropdown box)
  4. Click Import
  5. Check Delimited and click next
  6. Deselect the tab and select Other and give "|"(Tab symbol) then click next
  7. Click finish and Ok
like image 200
Saravanan Divin Avatar answered Oct 05 '22 09:10

Saravanan Divin