Comments (9)
imports2 seems to be fully supported by Socrata. At least in their soda-java. https://github.com/socrata/soda-java/blob/master/src/main/java/com/socrata/api/SodaImporter.java#L33
from sodapy.
Yea, that'd be rad if you want to add a file upload endpoint! Here is the backstory on the import2 api if you're interested.
from sodapy.
Hey guys, I just had a good chat with @PeterAustinMoore from Socrata yesterday. Apparently the imports2
endpoint is the way forward. It's old, as @chrismetcalf pointed out, but the code behind it has been updated and it's what will likely be supported. An important caveat: it's not officially supported, and only used internally at this point, so use at your own risk!
He walked me through some sample code that you could construct by walking through the "create geospatial dataset" wizard on the web interface. It basically uploads a file as the first call, which returns a file id. You then make another request using that file ID to turn it into a dataset and import its data as rows. This request returns the /api/views/xxxx-xxxx.json
response that we've seen before.
For geospatial data, the /api/views/...
response contains a childViews
property. It's an array of the shapefile layers that were imported. Those layers are the actual data, and what you'd want to connect datasync or something else to. Alternatively, you can use the replace
methods on the imports2
endpoint.
It sounds like this is the intended creation process for any dataset, whether tabular, geospatial, or blobular. I just made up the word blobular but I'm going to stick with it. There's a method
querystring (I believe that's what it is) that has a few options.
Sounds like it's worth touching up the overall create()
method of this library, though it's definitely a breaking change, as it requires a file to use it. Any thoughts so far or info you guys know that I don't?
from sodapy.
Thanks for the thoughts @timwis. Great to know that imports2 won't disappear at some point. I think you generally covered what I added with #17. My goal was not to support shapefile imports though, just non-row based data. They sound like similar processes.
from sodapy.
I'm afraid that refactoring the existing create
might be squeezing too much distinct functionality into one method, and support the creation of an additional create method to upload and publish file-based datasets. I probably won't roll a new version of sodapy until the new create
can handle geospatial data as well, but the functionality of the current PR looks fine for a merge.
from sodapy.
Opening a new issue for shapefiles. This is not a pressing need for me at this point. Maybe someone else could pick it up.
from sodapy.
Hey all, jumping in late to the discussion, but let me know if you need help. It looks like we're going to officially expose the imports2
API to learn more about how people will use it while we design 3.0, so let me know if you have feedback or questions! 🎉
from sodapy.
@chrismetcalf expose as in document? :D :D
from sodapy.
@timwis Correct! No guarantees that everything on your wishlist will be in there, but at least it'll be something to start a discussion around
from sodapy.
Related Issues (20)
- `datasets()` no longer filters on domain
- Missing tag - 1.5.3 HOT 1
- Drop support for python2 by EOL in 2020
- [documentation] List of Eligible Domains is Out of Date
- limit=None reverts to default
- Issue with upsert/replace HOT 5
- Feature request: Option to disable the throttling limit warning HOT 2
- support automatic pagination HOT 1
- Dependabot couldn't authenticate with https://pypi.python.org/simple/
- Dependabot couldn't authenticate with https://pypi.python.org/simple/
- Support for Socrata Headers? HOT 3
- Documentation: Include `timeout` param in client example
- get_all() has inconsistent pagination HOT 6
- Delete By Row ID Not Working HOT 2
- SoQL query support for get_all() HOT 3
- Optional client.get "limit" defaults to 1000. Need limit=none HOT 1
- Needs update: Example 01: Basic Queries HOT 1
- `get_all()` does not paginate correctly, returning duplicate rows HOT 2
- Apply date filter in where field
- This repository will be archived on Aug 31 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sodapy.