README
02 December, 2021
TGVE ·

This is a React Component ES Module that can be embedded in your React applications. This is an npm package output of TGVE (eAtlas) project.
Currently these variables can be passed to the eAtlas app, each (except
objects) can be passed as an environment variable like
REACT_APP_LAYER_NAME or when using eAtlas as a component
<Eatlas layerName="geojson">. As of version 1.3.5-beta.0, they can
also be passed to the TGVE as URL query parameters. For instance
localhost:3000?dark=false.
The exception is that leftSidebarContent cannot be passed as an
environment variable. For more on passing variables to a React app and
the prefix of REACT_App_ please see React docs
here.
As of version 1.3.4-beta.1 these API variables can be passed to TGVE:
data: valid geojson object. If a valid GeoJSON object is provided bothdefaultURLandgeographyURLwill be ignored, which also meansgeographyColumnwould be ignored, too.defaultURL: which returns a valid geojson object whenfetched. It can be used to fetch CSVs which is converted togeojsonby eAtlas after fetching.geographyURL: which returns a validgeojsondataset. If this variable is provided, data is fetched separately along withdefaultURL, eAtlas uses thegeographyColumnto join them. eAtlas does this oth on initialization and whenresetbutton is pressed.geographyColumn: a column name which is shared between data within thedefaultURLandgeographyURLor a mapping between the two. If a mapping is provided it must be in this format:defaultURLColumnName:geographyURLColumnName. This is the joining column that will result in dynamically generatinggeojsondata for eAtlas to consume. If a valid column name is not provided TGVE will fail to load any data to the given geography.column: if provided, and if the geometry is of particular type which would need a column, it would be used. Defaults on to the second column as often first column is an ID of sort.layerName: if provided, and if the given name is in the list of DeckGL layers supported by eAtlas, will be passed to generate the layer with the name given.dark: by defaultbaseui/basewebis set to dark, you can change the theme to other (e.g. light)leftSidebarContent: is based on React standard children. This is where users can add their own UI and more, though this requires competent React concepts. A simple use would be to pass plain text description of data/project etc. Please see TGVE documentations.viewport: TGVE’s main functionality is to auto-adjust the viewport (see DeckGL docs). However, the initial viewport can be set using this JSON parameter. The default values are:{longitude: -1.6362, latitude: 53.8321, zoom: 10, pitch: 55, bearing: 0}. If any of these are missing, they will be populated from these default values.hideChartGeneratorboolean value which would hide the sidebar component which generates charts from the data.hideChartsboolean value which would hide all charts. This takes priority overhideChartGeneratorparameter.
None of the above is necessary and in the current release “Add data” button will allow loading data into eAtlas.
See the main repo for more about the project.
Using github pages
See the main repo
guide for
more details but you can use a template
(tgve/eatlas-template) repo
to publish your data using eAtlas.
Development
See the main repo for more details but the package is a fork from a
create-react-app boilerplate.
Tests
The package follows create-react-app testing kits and uses mainly
jest. Run npm run test.
Change log
1.3.5-beta.0- The TGVE now accepts the API variables as URL query parameters.
1.3.4.beta.4- Minor issues and post tgver package Tests
- Path layer API in
1.3.4.beta.0- API value
hideChartGeneratoris one of the few from the wider and potentiallyhideSidebar. - Added basic version of “screenshot” or save. The future plan for this is a full analytic report (PDF) generation.
- Minor fixes and changes
- API value
1.3.3-beta.0- More APIs as TGVE is in showcase driven development.
- Added
viewportAPI JSON variable.
1.3.2-beta.0- Better history management and respects host paths.
1.3.1-beta.0- Preparing to remove the
betatag. - TGVE has now been migrated to its organisation on github.com
- Added two new API variables (
dark,leftSidebarContent) - Lots of improvements and minor fixes
- Preparing to remove the
1.3.0-beta.2- Minor fix for initial analysis of data column name.
1.1.0-beta.0- support for separating data from geography.
- minor improvements elsewhere