pythonsoda

Get schema using SODA api and python


I am using python to download a city's data. I want to get the schema with python (data types and names) for columns download with sodapy. I can get the data fine but is is all of type string. So, it would be nice to have data types so I could build a proper schema to load the data into.

On the website, they have data types laid out for the columns. https://data.muni.org/Housing-and-Homelessness/CAMA-Property-Inventory-Residential-with-Details/r3di-nq2j

There is so metadata at this url but it does not have the column info. https://data.muni.org/api/views/metadata/v1/r3di-nq2j


Solution

  • There may be a better way but this url returns a json response with the information.

    http://api.us.socrata.com/api/catalog/v1?ids=r3di-nq2j