Data समझना: Collect, Store, Process
Data क्या है?
Data raw facts और figures का संग्रह है — numbers, शब्द, माप, observations, images या आवाज़ें। अकेले data का ज़्यादा मतलब नहीं होता। Organise और process करने पर यह information बनता है जो कुछ समझने या फ़ैसला लेने में मदद करती है।
Data क्यों ज़रूरी है
Data के प्रकार
Structured data
- Rows और columns में organised
- Search और analyse करना आसान
- Examples: marks register, bank statement, railway timetable, spreadsheets
Unstructured data
- कोई fixed format नहीं
- Analyse करने के लिए ख़ास tools
- Examples: photos, videos, voice notes, emails, social-media posts
Data qualitative (वर्णनात्मक: रंग, grade, शहर) या quantitative (संख्यात्मक: ऊँचाई, price, temperature) भी होता है। Quantitative data discrete (गिना हुआ: students की संख्या) या continuous (मापा हुआ: ऊँचाई 162.5 cm) होता है।
| Roll | Name | House | Height_cm | Siblings |
|---|---|---|---|---|
| 1 | Isha | Blue | 158.5 | 1 |
| 2 | Kunal | Red | 166 | 2 |
| 3 | Meher | Green | 152.3 | 0 |
Data collection
Data collection यानी सही sources से facts इकट्ठा करना ताकि उनका analysis हो सके। पहले तय करें क्या data चाहिए और क्यों।
Primary data
- आप ख़ुद सीधे इकट्ठा करते हैं
- Surveys और questionnaires (Google Forms)
- Interviews, observation, experiments
- Sensors: weather station, fitness band
- आपके उद्देश्य के लिए सटीक, पर समय लगता है
Secondary data
- किसी और का पहले से इकट्ठा किया
- सरकारी portals (data.gov.in), census
- Reports, newspapers, research papers
- Company records, websites
- जल्दी और सस्ता, पर पूरी तरह fit न भी हो
Data storage
इकट्ठा data सुरक्षित store करना ज़रूरी है ताकि बाद में use हो सके। छोटा data files (text, CSV, spreadsheet) में; बड़ा या shared data databases (MySQL, जो Unit 4 में पढ़ेंगे) में रखा जाता है। Storage local devices (HDD, SSD, pen drive) या cloud (Google Drive, OneDrive, company servers) पर हो सकता है।
📁 survey_project/ ├── raw_responses.csv # जैसा इकट्ठा हुआ वैसा data ├── clean_data.csv # errors हटाने के बाद ├── analysis.py # processing का Python program └── report.pdf # charts के साथ final information
Backup copy रखें, raw data कभी overwrite न करें, files के नाम dates के साथ साफ़ रखें, और personal data को passwords से बचाएँ।
Data processing
Data processing वे operations हैं जो raw data को useful information में बदलते हैं।
| Operation | Example |
|---|---|
| Validation / cleaning | ख़ाली या असंभव value हटाना (age = 250) |
| Sorting | Students को marks से क्रम में रखना |
| Classification | House या grade से group करना |
| Calculation | Total, average, percentage |
| Summarisation | Class result: pass %, topper |
| Reporting | Principal के लिए charts और tables |
Python में data साफ़ और process करना
असली survey data गड़बड़ होता है: extra spaces, numbers की जगह words, ख़ाली और असंभव values। Python इसे साफ़ कर सकता है:
# Raw survey data: hours of screen time per day
responses = ['3', '5', ' 2', 'four', '6', '', '3', '25']
clean = []
for r in responses:
r = r.strip()
if r.isdigit() and 0 <= int(r) <= 24: # keep only valid hours
clean.append(int(r))
print('Raw responses :', len(responses))
print('Valid values :', clean)
print('Average hours :', round(sum(clean) / len(clean), 2))Data को information में बदलना:
# Data -> information: classify readings
readings = {'Mon': 41, 'Tue': 38, 'Wed': 44, 'Thu': 36, 'Fri': 45}
for day, temp in readings.items():
label = 'Heatwave' if temp >= 40 else 'Normal'
print(day, temp, label)
hot = [d for d, t in readings.items() if t >= 40]
print('Heatwave days:', len(hot), hot)सारांश और practice
- Data = raw facts; information = processed, अर्थपूर्ण data।
- Structured vs unstructured; qualitative vs quantitative (discrete/continuous)।
- Primary data आप इकट्ठा करते हैं; secondary पहले से मौजूद होता है।
- Processing: collect → clean → organise → analyse → present।
हर एक को primary/secondary और structured/unstructured में बाँटें: (a) Classmates के लिए आपका बनाया Google Form (b) Census of India की tables (c) Science fair की photos (d) आपके school की attendance spreadsheet।
Answers: (a) primary, structured (b) secondary, structured (c) primary, unstructured (d) आपके लिए secondary (school ने इकट्ठा किया), structured।
