You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/06/24 22:50:24 UTC

[GitHub] [incubator-superset] rusackas commented on issue #10083: How to replace existing geojson file in superset.

rusackas commented on issue #10083:
URL: https://github.com/apache/incubator-superset/issues/10083#issuecomment-649113568


   Hi @gyanranjanm!
   
   I'm assuming that we're talking about replacing the map data for the "country map" viz plugin here. I'm also curious what features you're looking to add to the map, but I'll focus on answering your question...
   
   I was able to take your attached file and make a drop-in replacement of the `india.geojson` file for that plugin. It's not ideal though. A couple of initial issues:
   
   1) The file is huge - the standard one is 457KB, but this new one is 76.6MB. That's a big payload, obviously.
   2) The boundaries of the geojson seem to lie far beyond India, meaning the country renders quite small in the viz plugin
   ![image](https://user-images.githubusercontent.com/812905/85634883-6d340580-b631-11ea-9cab-f2962e717940.png)
   
   That said, if you want to experiment with this yourself, you'll want to do the following:
   1) Clone the Superset-UI [repo](https://github.com/apache-superset/superset-ui)
   2) With your terminal, `cd` into that directory, and `yarn install`. A `yarn build` after that couldn't hurt ;)
   3) `cd` into wherever your locally running `incubator-superset` instance is, and then into `superset-frontend`
   4) type `npm link ../../the/relative/path/to/superset-ui/plugins/legacy-plugin-chart-country-map`
   5) server your local superset as normal with `npm run dev` or `npm run dev-server`
   
   That should put you into dev mode for that plugin. If you edit anything in the `legacy-plugin-chart-country-map/src` folder, you should see webpack rebuild, and see the changes reflected in your local superset.
   
   At that point, you should be able to replace the file at `legacy-plugin-chart-country-map/src/countries/india.geojson` and see your work.
   
   Once it works as planned, please feel free to open a PR on `superset-ui` if you feel it's something the community could use!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org