Socrata-py is capable of accepting all of the Geodata file formats that the platform is capable of accepting. These include ZIP archive (shapefile), JSON format (GeoJSON), GeoJSON format, Keyhole Markup Language (KML), Zipped Keyhole Markup Language (KMZ).
If you are attempting to upload a CSV or other text-based file, the platform will only accept the data in Well Known Text (WKT) format.
If you plan on using a Pandas DataFrame for pre-import data manipulation. There is another python package by the Pandas team, GeoPandas which is a data frame specifically for geodata. This data frame will help ensure that your geodata is in the correct format to be imported into the platform.
These are the geo-data types the platform is capable of accepting, formatted in WKT form. More information about WKT can also be found here
POINT (30 10)
MULTIPOINT ((10 40), (40 30), (20 20), (30 10))
LINESTRING (30 10, 10 30, 40 40)
MULTILINESTRING ((10 10, 20 20, 10 40),(40 40, 30 30, 40 20, 30 10))
POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))
MULTIPOLYGON (((30 20, 45 40, 10 40, 30 20)),((15 5, 40 10, 10 20, 5 10, 15 5)))
You can also use our Transform Library to change the data if this would better fit your use case.
Comments
Article is closed for comments.