So you want to publish your data online. You want it to look great, you want it to be useful and you want people to be able to search and filter it efficiently. Data types are critical to all of these functions, but how do you know when something is a valid type or not? How do you format your date column so it appears as a date? How do you get percentages to properly appear?
Read on, and let us know if you still have any questions!
Which file types are allowed on import?
Import a Data File:
- .csv (csv output from an excel file or see rfc 4180 for standard format)
- .xls (Excel 97 and later)
- .xlsx (2007 and later)
- Note: .csv is the optimal file format for upload. If you experience an error while importing a .xls or .xlsx file, try saving it as a .csv to eliminate Excel formatting that can sometimes cause errors.
Upload a Non-Data File:
- The following file types are allowed to be uploaded: accdb,. asc,. avi,. azw3,. bmp,. c,. css,. csv,. das,. dat,. db,. dbf,. dib,. doc,. docx,. dta,. dwg,. ecw,. eml,. fmw,. ged,. geojson,. gif,. gif,. gsheet,. ico,. ics,. indd,. jpeg,. jpg,. js,. json,. kml,. kmz,. log,. lyr,. md,. mdb,. mov,. mp3,. mp4,. mpg,. msg,. n3,. numbers,. ods,. odt,. one,. onepkg,. pages,. paint,. pb,. pdf,. png,. pps,. ppt,. pptx,. psd,. pxm,. rar,. rdf,. rtf,. sas,. sas7bcat,. sas7bdat,. sav,. sdf,. shp,. sql,. sig,. sketch,. snagproj,. tex,. tif,. tiff,. tmp,. tsv,. twbx,. txt,. wav,. wma,. wmf,. wmv,. wpd,. wps,. xlr,. xls,. xlsb,. xlsx,. xml,. xps,. zip. We only provide previews for types listed in this article.
Due to Socrata security policies, any other file extension not on this list will not be allowed to upload. It is possible to upload non-data files up to 10 GB.
Import Geospatial Data:
- .zip (shapefiles; the following files are required: .shp, .shx, .dbf, .prj)
- .kml (We do not support multiple features in a single layer. Technical terminology: we do not support heterogeneous children inside a multi geometry tag)
- .kmz (this a zipped .kml and follows the same import rules as above)
- .json (GeoJSON)
Link to External Data:
Connect with an ESRI Map Layer:
- URL to the RESTful endpoint for an individual map layer on an ArcGIS Server version 10.0 or above. You can read more about these connections here.
- In addition to ESRI Extension, Socrata has built out the Catalog Connector for ArcGIS Server. This new feature allows administrators to connect a public ArcGIS Server to your Socrata catalog and choose the layers to federate to your Socrata catalog as external datasets.
- Our platform supports Web Mercator projections via ESRI Extensions and will not convert other projections types.
We only try to detect specifically supported types on import. There are many other data types that we support but you'll have to either convert your columns after import or enter the data manually.
The following types are supported:
UTF-8 encoded text (generally alphanumeric text). Our system assumes that there is no text formatting.
Numbers: We directly use Java's BigDecimal parsing. For details see the documentation. If you're working with values that contain leading zeros that aren't importing correctly, visit this support article.
For negative numbers, the format should not contain any commas. -10000 will be read correctly but -10,000 will not.
You can also upload data as a percent or as money. These values will be uploaded as number columns with formatting applied so that they display as percents or money. The display can be changed by modifying the column formatting.
Dates are parsed by default in the American/Pacific (PST) timezone. You can explicitly specify a time zone by using the supported ISO 8601 subset. A 'Z' character is UTC, otherwise, the offset is [+-]HH:mm.
For inputs that don't specify a time of date, the resulting time is undefined. In other words, don't rely on it being anything consistent.
The accepted input formats are:
Supported ISO 8601 Subset
- yyyy-MM-dd['T']HH:mm:ssZ (e.g. "1920-01-22T00:00:00Z", "1920-01-22T00:00:00-10:00", or "1920-01-22 00:00:00Z")
- yyyy-MM-dd['T']HH:mm:ss (e.g. "1920-01-22T00:00:00" or "1920-01-22 00:00:00")
- yyyy-MM-dd['T']HH:mm (e.g. "1920-01-22T00:00")
- yyyy-MM-dd (e.g. "1920-01-22")
Supported non-ISO Dates
For dates other than the ISO subset we accept a date, optionally followed by a time, i.e.
Non-ISO dates are always parsed in the American date format locale (i.e. month, day, year). Months and days can be either single or double digit and may or may not be led with a '0'. Years can be either four digits (preferred) or two. If a year is two digits it will be assumed to be between 1951 and 2050: i.e. 1/2/75 would be January 2nd 1975, but 1/2/49 would be January 2nd 2049.
The accepted input formats are:
- MMM d, yyyy (e.g. "Jan 4, 1982")
- MMM d, yy (e.g. "Jan 4, 82")
- MMMM d, yyyy (e.g. "January 4, 1982")
- MMMM d, yy (e.g. "January 4, 82")
- M-d-yyyy (e.g. "1-4-1982")
- M/d/yyyy (e.g. "1/4/1982")
- M.d.yyyy (e.g. "1.4.1982")
- M-d-yy (e.g. "1-4-82")
- M/d/yy (e.g. "1/4/82")
- M.d.yy (e.g. "1.4.82")
Datasets on Socrata can store location in two different data types Location and Point. In the future, all datasets will use the point format.
Both location and point columns can be built "composite" column that's created by appending multiple values together. We accept the following types of composite location data for geolocation:
- Street Address (U.S. only)
- City (U.S. only)
- State (U.S. only, use the two-letter abbreviation)
- Zip Code (both 5 and 9 digits are accepted; U.S. only)
- Latitude and Longitude (All Locations)
In addition, you can upload location data to both location and point columns when the data is contained within an entire cell.
For location columns, the format will need to be: (lat, long)
For point columns, the format should be: POINT (long lat)
URLs support three different input formats. Only three URL schemes are acceptable: FTP, HTTP, and HTTPS. We use a custom regular expression to validate URLs. It should accept just about anything that you throw at it, but there's always a chance that it's missed something. Please note that since underscores are invalid characters in DNS records, we do not accept underscores. Also, note that only one URL can be entered in a cell.
- <a href="http://www.socrata.com/">Socrata</a>
- Socrata (http://www.socrata.com)
Valid false values:
Valid true values:
Legacy data types no longer available
There are two data types that are no longer available to be created but will continue to exist and work on current datasets, Photo and Document.
- Accepted file formats: .jpg, .png, .gif
- The following file types are allowed to be uploaded: accdb,. asc,. avi,. azw3,. bmp,. c,. css,. csv,. das,. dat,. db,. dbf,. dib,. doc,. docx,. dta,. dwg,. ecw,. eml,. fmw,. ged,. geojson,. gif,. gif,. gsheet,. ico,. ics,. indd,. jpeg,. jpg,. js,. json,. kml,. kmz,. log,. lyr,. md,. mdb,. mov,. mp3,. mp4,. mpg,. msg,. n3,. numbers,. ods,. odt,. one,. onepkg,. pages,. paint,. pb,. pdf,. png,. pps,. ppt,. pptx,. psd,. pxm,. rar,. rdf,. rtf,. sas,. sas7bcat,. sas7bdat,. sav,. sdf,. shp,. sql,. sig,. sketch,. snagproj,. tex,. tif,. tiff,. tmp,. tsv,. twbx,. txt,. wav,. wma,. wmf,. wmv,. wpd,. wps,. xlr,. xls,. xlsb,. xlsx,. xml,. xps,. zip.
NOTE: FOR DATASETS THAT HAVE DEPRECATED FEATURES, THE FEATURES WILL STILL FUNCTION. HOWEVER, THESE FEATURES WILL NOT BE AVAILABLE FOR ANY NEW DATASETS.