Comments (3)
I was looking at this issue and it could be maybe closed, because for:
- all the memory values containing "GB" were fixed/removed on this commit
- test_read_format() is currently validating type conversion when reading values
Otherwise, maybe if the idea is to enforce strict floating point number format (e.g 4.0
instead of 4
), in that case probably checking int
conversion before float
could allow to check that:
>>> int('4.0')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: invalid literal for int() with base 10: '4.0'
>>> float('4.0')
4.0
and that change will impact all the float type fields of DeviceCarbonFootprintData.
Do you have any advice on this? if this issue is still valid I could add a test for that, fix all parsers that generate float values and updated CSV files.
from environmental-footprint-data.
This issue was more about checking all parsers to make sure that they do verify that the number they read is in GB and make the conversion if it's not the case (AFAIR there are a few cases for which the reported unit is not in GB)
from environmental-footprint-data.
Oh I see, thanks for the explanation.
Looking at the current data on boavizta-data-us.csv
indeed, there are some suspicious memory values:
>>> import csv
>>>
>>> with open('boavizta-data-us.csv', 'rt', encoding='utf-8') as data_file:
... reader = csv.DictReader(data_file)
... memory_values = [row['memory'] for row in reader if row['memory']]
...
>>> unique_values = list(set(memory_values))
>>> unique_values.sort(key=float)
>>> unique_values
['3.0', '4.0', '6.0', '8.0', '8', '12.0', '16.0', '16', '32.0', '32', '48.0', '64.0', '64', '128', '256']
for example, 256GB of RAM on a server could be normal but not for a smartphone:
>>> import csv
>>>
>>> with open('boavizta-data-us.csv', 'rt', encoding='utf-8') as data_file:
... reader = csv.DictReader(data_file)
... for row in reader:
... if row['memory'] and float(row['memory']) >= 128:
... print(row['manufacturer'], row['name'], row['subcategory'], row['memory'])
...
Apple iPhone 11 128GB Smartphone 128
Apple iPhone 11 256GB Smartphone 256
Apple iPhone 12 128GB Smartphone 128
Apple iPhone 12 256GB Smartphone 256
Apple iPhone 8 256GB Smartphone 256
Apple iPhone SE - Gen 2 128GB Smartphone 128
Apple iPhone SE - Gen 2 256GB Smartphone 256
Dell PowerEdge R830 Server 256
Dell PowerEdge R840 Server 128
Dell PowerEdge R930 Server 256
it seems that Apple's parser is incorrectly filling the memory
field with storage capacity from iPhones. Even if it isn't a unit/scale issue, the parser need to be reviewed.
from environmental-footprint-data.
Related Issues (20)
- Unify location names
- Add a script to automatically merge multiple .csv files and deal with duplicates HOT 1
- Unify screen size unit HOT 1
- Erroneous Dell's subcategory HOT 2
- Create Panasonic parser & spider
- Monitoring new data sources on Internet HOT 2
- Add manufacturing breakdown details HOT 3
- Add IBM PCF data to the database
- Create Philips spiders and parsers
- Add multi criteria impact data from available LCA
- Unify added date format
- add new available data from Samsung HOT 1
- 🙏 Please use comma for boavizta-data-fr.csv (instead of semicolons) HOT 2
- HP vs HPE
- Duplicated entries
- Names do not match model names in the device system
- Where is the data for calculating the cloud impact? HOT 1
- New data from Framework Laptop and VR Headsets
- Apple Vision Pro LCA
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 environmental-footprint-data.