Comments (3)
Hey, thanks for creating an issue :)
The API will attempt to find the nearest zone to the coordinates supplied if they are not within a known zone.
If the coordinates are more than 50 km away from a known zone (like they clearly are in this case), the API attempts to get the caller location based on the server used to call the API.
So what happens here is that it's trying to guess where you're currently calling from, which might be why it's also changing from time to time depending on your setup.
The API documentation briefly mentions this, but we should probably make it more clear :)
⚠️ Auto fallback: If no zone is detected (or we don't have data for that area), the API will attempt to use your current location based on IP of the caller
from electricitymaps-contrib.
@madsnedergaard Thank you for the clarification, but the behaviour seems like a bug. The magic that the APIs are doing is not helpful in the context where a location is explicitly provided as lat/long or zone. Perhaps the current behaviour could be optional? Asking for data in one location and getting different location data as response definitely feels odd.
from electricitymaps-contrib.
That's a good point, we'll discuss it internally - while I agree with your solution (no server-detection if location is explicitly set), we might have other clients that are actually relying on that functionality. That makes it a bit more tricky to just change, but I'll see what we can do :)
from electricitymaps-contrib.
Related Issues (20)
- aggregated view CO2 sum seems strange, yearly CO2 sum probably not updated after emission factor correction HOT 8
- [Data Issue]: Upstream emissions for gas in Europe are not specified. HOT 10
- Nova Scotia (CA-NS): Near real-time data on e.g. load, wind, and imports (not lumped together!) and exports HOT 1
- ElectricityMaps crashes after switching to another tab while the app is loading HOT 1
- Consumption of imported nuclear missing from US-SW-PNM (and nearby zones) HOT 7
- Errors in SW USA zone boundaries
- [Data Issue]: CZ solar installed capacity
- [Data Issue]: Difference between production and consumption implies unexpectedly high electricity imports for Germany HOT 5
- Add an option to not show the nuclear energy in green HOT 5
- Potential issues with solar and wind layers on Android devices HOT 1
- [Data Issue]: IT-* zones are not getting parser data anymore HOT 1
- Battery capacity in Belgium
- Imports emissions doesn't account for zone vs country
- Net exchange is not translated HOT 2
- Precision of emission factors is misleading HOT 5
- Create easily citable SoMe replies to ideological debates
- AU-TAS-KI production parser down HOT 3
- ENTSO-E parser is failing for GB-NIR price data HOT 4
- Germany's solar load factor bug ? HOT 5
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 electricitymaps-contrib.